SMC_RecomputeABCSlopes (FB)ΒΆ
FUNCTION_BLOCK SMC_RecomputeABCSlopes
Recomputes the slopes of the additional axes A,B,C so that a smooth movement results.
The slope at the end of elemnt i is set as
(AddAxisValue(i+1) - AddAxisValue(i-1)) / (ElementLength(i) + ElementLength(i+1)).
At a stop, the slope is either set to zero, or set so that the interpolation of
the additional axis is linear, depending on the input modeAtStop.
- InOut:
Scope
Name
Type
Initial
Comment
Input
bExecuteBOOLStarts on the rising edge
poqDataInPOINTER TO SMC_OUTQUEUE
Input path queue
nSizeOutQueueUDINTThe size of
pbyBufferOutQueuein bytespbyBufferOutQueuePOINTER TO ARRAY [0..0] OF SMC_GEOINFO
The buffer for the output queue
dAngleTolLREAL0.001
The angle tolerence (in angular degrees) to detect stops between elements
modeNoStopDetermines how the slope is set at element transitions without a stop. The default is SET_SMOOTH_CARDINAL.
modeAtStopDetermines how the slope is set at element transitions with a stop. The default, due to compatibility with older versions, is SET_ZERO.
Output
bDoneBOOLIndicates the entire input path has been processed
bBusyBOOLIndicates the function block is still busy processing
bErrorBOOLAn error has occurred
wErrorIDSMC_ERRORError-ID
poqDataOutPOINTER TO SMC_OUTQUEUE
The queue for the output path
Structure: