SMC_LimitCircularVelocity (FB)ΒΆ
FUNCTION_BLOCK SMC_LimitCircularVelocity
This function block limits the path velocities of circular elements depending on the radius.
For a more general function block that limits the path velocity for all kinds of path elements, please see SMC_LimitDynamics.
In order to limit the acceleration to a prescribed value,
the velocity of the arc at the transition sqrt(a*r) must not
be exceeded.
The function block controls the transition between two elements (line on
circular arc, circular arc on line or circular arc on circular arc)
and adapts the end velocity of the first element so that the
acceleration jump will not exceed the value dMaxAccJump.
Furthermore, the function block limits the acceleration in
X and Y to the value dMaxAcc.
- InOut:
Scope
Name
Type
Initial
Comment
Input
bExecuteBOOLFALSE
Execution starts on the rising edge.
bAbortBOOLFALSE
If
TRUE, the current processing of this function block is abortedbAppendBOOLFALSE
As long as this input remains
FALSE,poqDataOutQueuewill be cleared at each reset. As long as it remainsTRUE, newly incoming data will be written to the end of the DataOutQueue.poqDataInPOINTER TO SMC_OUTQUEUE
NULL
This variable points to the SMC_OUTQUEUE structure object, which contains the SMC_GEOINFO objects of the path; typically it points on the output
poqDataOutof the preceding module (e.g. the SMC_NCDecoder ).dMaxAccLREAL0
This input variable gives the maximum acceleration value permissible for circular arcs. A value equal to 0 will cause no check to be done.
dMaxAccJumpLREAL0
This input variable gives the maximum acceleration jump for a transition of two objects. A value equal to 0 will cause no check to be done.
nSizeOutQueueUDINT0
This variable contains the size of the data buffer, the list of SMC_GEOINFO structure objects will be written to. This buffer must be able to hold at least five SMC_GEOINFO objects. Otherwise,
SMC_LimitCircularVelocitywill not execute any actions at all. Its size may be predefined, but may be modified later only during a reset. It is recommended to create the buffer as described by the example below:ExampleBuf: ARRAY[1..50] of SMC_GeoInfo.The correct buffer size will then be retrieved by use of the operator
sizeof(ExampleBuf).pbyBufferOutQueuePOINTER TO ARRAY [0..0] OF SMC_GEOINFO
NULL
This input must point to the first byte of the memory area that is allocated for the SMC_OUTQUEUE structure. This area must be at least as big as defined in
nSizeOutQueue. Typically the allocation of the memory buffer is done in the declaration part of the IEC-program by defining an array of SMC_GEOINFO (e.g.BUF: ARRAY[1..50] OF SMC_GEOINFO; for a buffer that can store 50 path elements). The value may be predefined, but may be modified later on only during a reset.Output
bDoneBOOLFALSE
This variable will be set to
TRUEas soon as the input data frompoqDataInhas been processed completely. Thereafter, the module will not perform any further actions until it gets reset. If inputbExecuteisFALSE,bDonewill be reset toFALSE.bBusyBOOLFALSE
TRUEwhile execution of function block is not finishedbErrorBOOLFALSE
Signals that an error has occurred within the function block
wErrorIDSMC_ERRORSMC_NO_ERROR
Error identification
poqDataOutPOINTER TO SMC_OUTQUEUE
NULL
This output points on the SMC_OUTQUEUE structure managing the new SMC_GEOINFO objects.
Structure: