SMC_BlockSearch (FB)ΒΆ
FUNCTION_BLOCK SMC_BlockSearch
This function block shortens the path from start up to
the position that is stored in SMC_BlockSearchPos.
From this position, the original path is put on.
SMC_BlockSearch runs in the context of path preprocessing
and is typically inserted right before SMC_CheckVelocities.
Note
SMC_BlockSearch requires the position values from
SMC_BlockSearchSavePos, which must have been executed before.
Note
The element to restart with is identified by its sourceline number. So, there will be ambiguities when dealing with subprograms (we will restart with the first element holding the correct sourceline number, which, in general, is part of the main program).
- InOut:
Scope
Name
Type
Initial
Comment
Inout
ePosPosition information. Requires connection to output
ePosof SMC_BlockSearchSavePosInput
bExecuteBOOLFALSE
Risign edge: Enables the function block
bAbortBOOLFALSE
TRUE: Aborts the processing of the function blockbAppendBOOLFALSE
FALSE: Starts emptyingpoqDataOuton a rising edge atbExecutepoqDataInPOINTER TO SMC_OUTQUEUE
NULL
Pointer to data of structure SMC_OUTQUEUE containing the path objects of typ SMC_GEOINFO, that are interpolated.
bStartFromSavedPosBOOLTRUE: Enables the function block to shorten the path from start up to the position, that is stored in SMC_BlockSearchPos .FALSE: Disables the function blocknSizeOutQueueUDINT0
Size in bytes of the data buffer
pbyBufferOutQueue, in which the path elements are copied. If the value is set, it may not be changed except after a reset.pbyBufferOutQueuePOINTER TO ARRAY [0..0] OF SMC_GEOINFO
NULL
Pointer to the first byte of the storage area created for the path elements. If the value is set, it may not be changed except after a reset.
Output
bDoneBOOLFALSE
TRUE: input date frompoqDataInhave been precessed fully. After that, the function block performs no action until a reset is detected. WhenbExecuteis set toFALSE,bDoneis reset toFALSE.bBusyBOOLFALSE
TRUE: Function block in executionbErrorBOOLFALSE
TRUE: Error has occurredwErrorIDSMC_ERROR0
Error identification
Possible values
SMC_BS_SAVEDPOS_NOT_REACHED: Stored position has not been found. Probably wrong path.SMC_BS_NO_POS_STORED:ePoscontains no stored position. Possible cause is that SMC_BlockSearchSavePos was not executed or in a wrong way.
poqDataOutPOINTER TO SMC_OUTQUEUE
NULL
Pointer to data of structure SMC_OUTQUEUE containing the path elements of type SMC_GEOINFO that have been processed
Structure: