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 TRUE as soon as the input data from poqDataIn has been processed completely. The function block will not perform any further actions until it gets reset. |
bBusy |
BOOL |
FALSE |
TRUE while 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:
|
|
segCurrentSegment |
Description of the current segment |
|||
dTime |
LREAL |
Total (summed) interpolation time over all segments output so far. |