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.

ItpGetBlocksearchData 2: Inputs

VAR_INPUT
    bExecute          : BOOL;
    tTimeOut          : TIME;
END_VAR

Name

Type

Description

bExecute

BOOL

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

tTimeOut

TIME

ADS Timeout-Delay

ItpGetBlocksearchData 3:/ItpGetBlocksearchData 4: Inputs/Outputs

VAR_IN_OUT
    sNciToPlc           : NCTOPLC_NCICHANNEL_REF;
END_VAR

Name

Type

Description

sNciToPlc

NCTOPLC_NCICHANNEL_REF

The structure of the cyclic channel interface from the NCI to the PLC. This structure is read-only (type: NCTOPLC_NCICHANNEL_REF).

ItpGetBlocksearchData 5: Outputs

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

Name

Type

Description

bBusy

BOOL

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

BOOL

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

UDINT

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

ST_ItpBlockSearchData

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;(* indicates whether Retrace is active*)
    bRetraceBackward  : BOOL;(* indicates whether backward movement took place on the path*)
END_STRUCT
END_TYPE