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 the path preprocessing and is inserted typically in the data flow before SMC_CheckVelocities .

Note

SMC_BlockSearch requires the position values from SMC_­BlockSearchPos , that must be executed previously.

InOut:

Scope

Name

Type

Initial

Comment

Inout

ePos

SMC_BlockSearchPos

Position information. Requires connection to output ePos of SMC_BlockSearchSavePos

Input

bExecute

BOOL

FALSE

Risign edge: Enables the function block

bAbort

BOOL

FALSE

TRUE: Aborts the processing of the function block

bAppend

BOOL

FALSE

FALSE: Starts emptying poqDataOut on a rising edge at bExecute

poqDataIn

POINTER TO SMC_OUTQUEUE

NULL

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 block

nSizeOutQueue

UDINT

0

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

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

bDone

BOOL

FALSE

TRUE: input date from poqDataIn have been precessed fully. After that, the function block performs no action until a reset is detected. When bExecute is set to FALSE, bDone is reset to FALSE.

bBusy

BOOL

FALSE

TRUE: Function block in execution

bError

BOOL

FALSE

TRUE: Error has occurred

wErrorID

SMC_ERROR

0

Error identification

Possible values

  • SMC_BS_SAVEDPOS_NOT_REACHED: Stored position has not been found. Prob­ably 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

NULL

Pointer to data of structure SMC_OUTQUEUE containing the path elements of type SMC_GEOINFO that have been processed