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

VAR_INPUT
    bExecute          : BOOL;
    tTimeOut          : TIME;
END_VAR

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

bTimeOut: ADS Timeout-Delay

VAR_IN_OUT

VAR_IN_OUT
    sNciToPlc           : NCTOPLC_NCICHANNEL_REF;
END_VAR

sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only accessed for reading. (type: NCTOPLC_NCICHANNEL_REF)

VAR_OUTPUT

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

Voraussetzungen

Entwicklungsumgebung

Zielplattform

Einzubindende SPS Bibliotheken

Classic Dialect Interpreter: TwinCAT V3.1.0

GST Interpreter: TwinCAT V3.1.4024.20

PC oder CX (x86 oder x64)

Tc2_NCI