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 - bExecute- BOOL- FALSE - With a rising edge, the function block gets active - poqDataIn- POINTER TO SMC_OUTQUEUE - 0 - Input path queue - iVelMode- TRAPEZOID - Velocity mode (same as SMC_Interpolator ) - dwIpoTime- DWORD- 0 - Cycle time of the interpolation task (same as SMC_Interpolator ) - bMFunctionsPreAcknowledged- BOOL- FALSE - If the input is set to - TRUE, every M-function is acknowledged in advance. If the input is set to- FALSE, M-functions cause a stop, but they are acknowledged immediately.- dJerkMax- LREAL- 0 - The magnitude of the maximum allowed jerk (same as SMC_Interpolator ). - Output - bDone- BOOL- FALSE - This output will be set to - TRUEas soon as the input data from- poqDataInhas been processed completely. The function block will not perform any further actions until it gets reset.- bBusy- BOOL- FALSE - TRUEwhile execution of function block is not finished- bError- BOOL- FALSE - It signals that an error has occurred within the function block - wErrorID- SMC_ERROR- SMC_NO_ERROR - Error identification: - SMC_SA_QUEUE_NOT_IN_BUFFER
- SMC_SA_QUEUE_CHANGED_DURING_OP
 - segCurrentSegment- Description of the current segment - dTime- LREAL- Total (summed) interpolation time over all segments output so far. 
Structure:
