SMC_TranslateQueue3D (FB)ΒΆ
FUNCTION_BLOCK SMC_TranslateQueue3D
This function will translate the path stored in poqDataIn
to the vector given by vec, which is of structure type SMC_VECTOR3D .
The input variable poqDataIn is a pointer to the
structurer SMC_OUTQUEUE, which describes the path to get rotated.
The initialization value FALSE of input variable bEnable will
bar the rotation of the path.
As soon as bEnable is set to TRUE all SMC_GEOINFO objects
found in poqDataIn will be processed.
When bEnable is reset to FALSE, the module will
not execute any further modifications.
The initialization of input variable bReset with FALSE effects,
that the SMC_GEOINFO objects currently found in poqDataIn will
not get rotated, but only those that will be added.
As, during the processing, a sudden change of the characteristic
parameter vec of the translation might cause the path to be broken,
modifications to the corresponding input will not be taken into account,
until SMC_OUTQUEUE will be empty at poqDataIn
or until a Reset (bReset) will be done.
- InOut:
Scope
Name
Type
Initial
Comment
Input
bExecuteBOOLFALSE
While
TRUE, the function block is activebAppendBOOLFALSE
If
FALSEat a rising edge ofbExecute, the output queuepoqDataOutis emptied.poqDataInPOINTER TO SMC_OUTQUEUE
NULL
Pointer on a sufficiently large, free data area (buffer) that is allocated in the IEC application.
vecSMC_VECTOR3DnSizeOutQueueUDINT0
This variable contains the size of the data buffer, the list of SMC_GEOINFO structure objects will be written to. This buffer must be at least five times as big as a SMC_GEOINFO structure itself. Otherwise, SMC_NCDecoder will 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 of SMC_GeoInfoThe appropriate buffer size will then be retrieved by use of the operator
sizeof(ExampleBuf).pbyBufferOutQueuePOINTER TO ARRAY [0..0] OF SMC_GEOINFO
NULL
Size of the buffer in byte
Output
bDoneBOOLFALSE
This variable will be set to
TRUEas soon as the input data ofpoqDataInhas been processed completely. Thereafter the module will not perform any further actions until it will be reset. If inputbExecuteisFALSE,bDonewill be reset toFALSE.bBusyBOOLFALSE
TRUE, while 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
Pointer to resulting SMC_OUTQUEUE
Structure: