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
Comment
Inout
ePos
Position information. Requires connection to output
ePos
of SMC_BlockSearchSavePosInput
bExecute
BOOL
Risign edge: Enables the function block
bAbort
BOOL
TRUE
: Aborts the processing of the function blockbAppend
BOOL
FALSE
: Starts emptyingpoqDataOut
on a rising edge atbExecute
poqDataIn
POINTER TO SMC_OUTQUEUE
Pointer to data of structure SMC_OUTQUEUE containing the path objects of typ SMC_GEOINFO, that are interpolated.
bStartFromSavedPos
BOOL
TRUE
: Enables the function block to shorten the path from start up to the position, that is stored in SMC_BlockSearchPos .FALSE
: Disables the function blocknSizeOutQueue
UDINT
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.pbyBufferOutQueue
POINTER TO ARRAY [0..0] OF SMC_GEOINFO
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
bDone
BOOL
TRUE
: input date frompoqDataIn
have been precessed fully. After that, the function block performs no action until a reset is detected. WhenbExecute
is set toFALSE
,bDone
is reset toFALSE
.bBusy
BOOL
TRUE
: Function block in executionbError
BOOL
TRUE
: Error has occurredwErrorID
SMC_ERROR
Error identification
Possible values
SMC_BS_SAVEDPOS_NOT_REACHED
: Stored position has not been found. Probably wrong path.SMC_BS_NO_POS_STORED
:ePos
contains no stored position. Possible cause is that SMC_BlockSearchSavePos was not executed or in a wrong way.
poqDataOut
POINTER TO SMC_OUTQUEUE
Pointer to data of structure SMC_OUTQUEUE containing the path elements of type SMC_GEOINFO that have been processed
Structure: