ItpGetBlocksearchData

ItpGetBlocksearchData 1:

The function block ItpGetBlocksearchData reads the current position on the path. Usually this command is called at standstill. Subsequently ItpBlockSearch can be used to set the interpreter to the position stored in sBlockSearchData.

VAR_INPUT
bExecute          : BOOL;
tTimeOut          : TIME;
END_VAR

bExecute: The command is triggered by a rising edge at this input.

bTimeOut: ADS Timeout-Delay

VAR_IN_OUT
sNciToPlc         : NciChannelToPlc;
END_VAR

sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only accessed for reading. See NciChannelToPlc

VAR_OUTPUT
bBusy             : BOOL;
bErr              : BOOL;
nErrId            : UDINT;
sBlockSearchData  : ST_ItpBlockSearchData;
END_VAR

bBusy: Remains TRUE until the function block has executed a command request, but no longer than the time specified at the 'Timeout' input. While Busy = TRUE, no new command will be accepted at the inputs.

bErr: Becomes TRUE if an error occurs during command execution. The command-specific error code is contained in ‘nErrId’. Is reset to FALSE by the execution of a command at the inputs.

nErrId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error documentation or in the NC error documentation (error codes above 0x4000).

sBlockSearchData: Contains information on the current position on the path.

TYPE ST_ItpBlockSearchData :
STRUCT
fLength           : LREAL;(* remaining distance of actual movement block in percent*)
nBlockNo          : UDINT;(* number of the actual block *)
nBlockCounter     : UDINT;(* counter value of the actual block *)
bIsRetrace        : BOOL;(* e.g. by activ Retrace *)
bRetraceBackward  : BOOL;(* e.g. by activ Retrace Backward *)
END_STRUCT
END_TYPE