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
Initial
Comment
Input
bExecuteBOOLFALSE
Execution starts on the rising edge.
bAbortBOOLFALSE
TRUE: Aborts the processing of the function blockbAppendBOOLFALSE
FALSE: Starts emptyingpoqDataOuton a rising edge atbExecutepoqDataInPOINTER TO SMC_OUTQUEUE
NULL
Pointer to data of structure SMC_OUTQUEUE containing the path objects of typ SMC_GEOINFO.
wAxisWORDBit 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
dMaxVelLREAL0
Maximum speed value for the defined axes
dMaxAccDecLREAL0
Maximum acceleration or deceleration value for the defined axes
bIncludePathSettingsBOOLFALSE
TRUE: Limits the velocity, acceleration or deceleration (F, E +, E-) on the values defined indMaxVelanddMaxAccDecnSizeOutQueueUDINT0
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.pbyBufferOutQueuePOINTER TO ARRAY [0..0] OF SMC_GEOINFO
NULL
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.
bStrictlyHoldAccDecABCBOOLFALSE
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
bDoneBOOLFALSE
TRUE: input date frompoqDataInhave been precessed fully. After that, the function block performs no action until a reset is detected. WhenbExecuteis set toFALSE,bDoneis reset toFALSE.bBusyBOOLFALSE
TRUE: Function block in executionbErrorBOOLFALSE
TRUE: Error has occurredwErrorIDSMC_ERRORSMC_NO_ERROR
Error identification
poqDataOutPOINTER TO SMC_OUTQUEUE
NULL
Pointer to data of structure SMC_OUTQUEUE containing the path elements of typ SMC_GEOINFO.
Structure: