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
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.
dScaleFactorLREAL1
Scaling factor to be applied on path
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 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).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 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: