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
structure 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
bExecute
BOOL
FALSE
While
TRUE
, the function block is activebAppend
BOOL
FALSE
If
FALSE
at a rising edge ofbExecute
, the output queuepoqDataOut
is emptied.poqDataIn
POINTER TO SMC_OUTQUEUE
SMC_NULL
Pointer on a sufficiently large, free data area (buffer) that is allocated in the IEC application.
vec
SMC_VECTOR3D
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 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_GeoInfo
The appropriate buffer size will then be retrieved by use of the operator
sizeof(ExampleBuf)
.pbyBufferOutQueue
POINTER TO ARRAY [0..0] OF SMC_GEOINFO
SMC_NULL
Size of the buffer in byte
Output
bDone
BOOL
FALSE
This variable will be set to
TRUE
as soon as the input data ofpoqDataIn
has been processed completely. Thereafter the module will not perform any further actions until it will be reset. If inputbExecute
isFALSE
,bDone
will be reset toFALSE
.bBusy
BOOL
FALSE
TRUE
, while execution of function block is not finishedbError
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
Pointer to resulting SMC_OUTQUEUE
Structure: