FB_GetDeviceIdentificationEx

FB_GetDeviceIdentificationEx 1:

The function block reads the device ID. Allows longer strings for hardware model and hardware serial number than FB_GetDeviceIdentification.

FB_GetDeviceIdentificationEx 2: Inputs

VAR_INPUT
    bExecute  : BOOL;
    tTimeout  : TIME := DEFAULT_ADS_TIMEOUT;
    sNetId    : T_AmsNetId;
END_VAR

Name

Type

Description

bExecute

BOOL

The function block is enabled by a positive edge at this input.

tTimeout

TIME 

States the length of the timeout that may not be exceeded by execution of the ADS command.

sNetId

T_AmsNetID

A string with the network address of the TwinCAT computer whose device information is to be read can be specified here. For the local computer an empty string may be specified.

FB_GetDeviceIdentificationEx 3: Outputs

VAR_OUTPUT
    bBusy      : BOOL;
    bError     : BOOL;
    nErrorID   : UDINT;
    stDevIdent : ST_DeviceIdentificationEx;
END_VAR

Name

Type

Description

bBusy

BOOL

When the function block is enabled, this output is set and remains set until a feedback is received.

bError

BOOL

If an error occurs during the transmission of the command, this output is set after the bBusy output is reset.

nErrorID

UDINT

Returns the ADS error number when the bError output is set.

stDevIdent

ST_DeviceIdentificationEx

Returns the device ID

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_Utilities (System)