SMC_ScaleQueue3D (FB)ΒΆ
FUNCTION_BLOCK SMC_ScaleQueue3D
This function will stretch the path contained in
poqDataIn
by factor fScaleFactor
.
The input variable poqDataIn is a pointer to the structure
SMC_OUTQUEUE , which describes the path to get scaled.
At first, the initialization value FALSE
of
input variable bEnable
will bar the scaling 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.
- 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.
dScaleFactor
LREAL
1
Scaling factor to be applied on path
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
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
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: