FB_GetDeviceIdentification
The block reads the device ID.
Obsolete functionality For longer hardware model and hardware serial number strings the block FB_GetDeviceIdentificationEx has to be used. |
VAR_INPUT
VAR_INPUT
bExecute : BOOL;
tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
sNetId : T_AmsNetId;
END_VAR
bExecute: the block is activated by a positive edge at this input.
tTimeout: States the length of the timeout that may not be exceeded by execution of the ADS command.
sNetId: This parameter can be used to specify the AmsNetID of the TwinCAT computer whose device ID is to be read (type: T_AmsNetID). If it is to be run on the local computer, an empty string can be entered.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrorId : UDINT;
stDevIdent : ST_DeviceIdentification;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
bError: If an error should occur during the transfer of the command, then this output is set once the bBusy output was reset.
nErrorId: Supplies the ADS error number when the bError output is set.
stDevIdent: Provides the device ID (type: ST_DeviceIdentification)
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) |