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 - bExecute- BOOL- FALSE - Execution starts on the rising edge. - bAbort- BOOL- FALSE - If - TRUE, the current processing of this function block is aborted- bAppend- BOOL- FALSE - As long as this input remains - FALSE,- poqDataOutQueuewill be cleared at each reset. As long as it remains- TRUE, newly incoming data will be written to the end of the DataOutQueue.- poqDataIn- POINTER TO SMC_OUTQUEUE - SMC_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 ).- dMaxAcc- LREAL- 0 - This input variable gives the maximum acceleration value permissible for circular arcs. A value equal to 0 will cause no check to be done. - dMaxAccJump- LREAL- 0 - 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. - nSizeOutQueue- UDINT- 0 - 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).- pbyBufferOutQueue- POINTER TO ARRAY [0..0] OF SMC_GEOINFO - SMC_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 - bDone- BOOL- FALSE - This variable will be set to - TRUEas soon as the input data from- poqDataInhas been processed completely. Thereafter, the module will not perform any further actions until it gets reset. If input- bExecuteis- FALSE,- bDonewill be reset to- FALSE.- bBusy- BOOL- FALSE - TRUEwhile execution of function block is not finished- bError- BOOL- FALSE - Signals that an error has occurred within the function block - wErrorID- SMC_ERROR- SMC_NO_ERROR - Error identification - poqDataOut- POINTER TO SMC_OUTQUEUE - SMC_NULL - This output points on the SMC_OUTQUEUE structure managing the new SMC_GEOINFO objects. 
Structure: