SMC_LimitDynamics (FB)¶
FUNCTION_BLOCK SMC_LimitDynamics
The function block reduces the velocity and acceleration/deceleration
of the path so that the resulting velocities, accelerations and
decelerations of the cartesian and additional axes do not exceed the
input values dMaxVel
, dMaxAcc
and dMaxDec
.
Note
SMC_LimitDynamics
was renamed and was previously named
SMC_LimitAddAxisDynamics
.
Using SMC_LimitDynamics
Assignment of input poqDataIn
Typically, poqDataOut
of the previous function block is fed to the
input poqDataIn
. That can be an instance of the function block
SMC_NCDecoder or SMC_SmoothPath.
Allocating memory for the preprocessing of the path elements
If the function block is executed, memory is needed, in which the processing elements are copied. The memory area must be able to hold at least five SMC_GEOINFO objects. If the memory is too small, the function block performs no actions. The memory is declared in the IEC program as an array of objects of type SMC_GEOINFO.
PROGRAM Path
VAR
buf2: ARRAY[1..50] OF SMC_GeoInfo;
END_VAR
Feeding the allocated memory area
The size of the memory is determined by the operator SIZEOF in the implementation
of the IEC program and is fed to the input nSizeOutQueue
. The address of the
memory is defined with the operator ADR and is fed to the input pbyBufferOutQueue
.

- InOut:
Scope
Name
Type
Comment
Input
bExecute
BOOL
Execution starts on the rising edge.
bAbort
BOOL
TRUE
: Aborts the processing of the function blockbAppend
BOOL
FALSE
: Starts emptyingpoqDataOut
on a rising edge atbExecute
poqDataIn
POINTER TO SMC_OUTQUEUE
Pointer to data of structure SMC_OUTQUEUE containing the path objects of typ SMC_GEOINFO.
wAxis
WORD
Bit field of the axes on that the operation is executed:
X: Bit 0
Y: Bit 1
Z: Bit 2
A: Bit 3
B: Bit 4
C: Bit 5
P: Bit 6
Q: Bit 7
U: Bit 8
V: Bit 9
W: Bit 10
Example: 16#0104 causes limitation of Z and U
dMaxVel
LREAL
Maximum speed value for the defined axes
dMaxAccDec
LREAL
Maximum acceleration or deceleration value for the defined axes
bIncludePathSettings
BOOL
TRUE
: Limits the velocity, acceleration or deceleration (F, E +, E-) on the values defined indMaxVel
anddMaxAccDec
nSizeOutQueue
UDINT
Size in bytes of the data buffer
pbyBufferOutQueue
, in which the path elements are copied. If the value is set, it may not be changed except after a reset.pbyBufferOutQueue
POINTER TO ARRAY [0..0] OF SMC_GEOINFO
Pointer to the first byte of the storage area created for the path elements. If the value is set, it may not be changed except after a reset.
bStrictlyHoldAccDecABC
BOOL
If
TRUE
, the maximal accelerations and decelerations of A, B, C are strictly held. Otherwise, we use a heuristic that may lead to quicker profiles, but occasionally violate the A/B/C-acceleration-limit, if A/B/C move quickly while there is an ac- / deceleration on the path.Output
bDone
BOOL
TRUE
: input date frompoqDataIn
have been precessed fully. After that, the function block performs no action until a reset is detected. WhenbExecute
is set toFALSE
,bDone
is reset toFALSE
.bBusy
BOOL
TRUE
: Function block in executionbError
BOOL
TRUE
: Error has occurredwErrorID
SMC_ERROR
Error identification
poqDataOut
POINTER TO SMC_OUTQUEUE
Pointer to data of structure SMC_OUTQUEUE containing the path elements of typ SMC_GEOINFO.
Structure: