F_ConvMasterDevStateToString
The function F_ConvMasterDevStateToString supplies the drive status of the EtherCAT Master as a string.
VAR_INPUT
VAR_INPUT
nState : WORD;
END_VAR
nstate: Device status of the EtherCAT Master can be linked as DevState in the System Manager from the inputs of the EtherCAT Master to the PLC
0x0001 = Link error
0x0002 = I/O locked after link error (I/O reset
required)
0x0004 = Link error (redundancy adapter)
0x0008 = Missing one frame (redundancy
mode)
0x0010 = Out of send resources (I/O reset
required)
0x0020 = Watchdog triggered
0x0040 = Ethernet driver (miniport) not
found
0x0080 = I/O reset active
0x0100 = At least one device in 'INIT'
state
0x0200 = At least one device in 'PRE-OP'
state
0x0400 = At least one device in
'SAFE-OP' state
0x0800 = At least one device indicates an error
state
0x1000 = DC not in sync
Requirements
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.10.0 or higher | PC or CX (x86) | TcEtherCAT.lib |
TwinCAT v2.10.0 Build >= 1301 or higher | CX (ARM) |