SMC_SegmentAnalyzer (FB)ΒΆ
FUNCTION_BLOCK SMC_SegmentAnalyzer
This function block analyzes the different segments (acceleration
constant velocity, deceleration) of a CNC path,
independently of the interpolator function block.
With every call, the SMC_SegmentAnalyzer outputs basic information
about the current path segment and adds up the time that will be needed
for its interpolation.
Restrictions:
The complete path must fit into the input path queue.
The execution on the output path queue by the next
function block (usually SMC_Interpolator ) may only begin, when
SMC_SegmentAnalyzer has analyzed the queue completely.
- InOut:
Scope
Name
Type
Initial
Comment
Input
bExecuteBOOLFALSE
With a rising edge, the function block gets active
poqDataInPOINTER TO SMC_OUTQUEUE
0
Input path queue
iVelModeTRAPEZOID
Velocity mode (same as SMC_Interpolator )
dwIpoTimeDWORD0
Cycle time of the interpolation task (same as SMC_Interpolator )
bMFunctionsPreAcknowledgedBOOLFALSE
If the input is set to
TRUE, every M-function is acknowledged in advance. If the input is set toFALSE, M-functions cause a stop, but they are acknowledged immediately.dJerkMaxLREAL0
The magnitude of the maximum allowed jerk (same as SMC_Interpolator ).
Output
bDoneBOOLFALSE
This output will be set to
TRUEas soon as the input data frompoqDataInhas been processed completely. The function block will not perform any further actions until it gets reset.bBusyBOOLFALSE
TRUEwhile execution of function block is not finishedbErrorBOOLFALSE
It signals that an error has occurred within the function block
wErrorIDSMC_ERRORSMC_NO_ERROR
Error identification:
SMC_SA_QUEUE_NOT_IN_BUFFERSMC_SA_QUEUE_CHANGED_DURING_OP
segCurrentSegmentDescription of the current segment
dTimeLREALTotal (summed) interpolation time over all segments output so far.
Structure: