SlaveDiagnostics
Displays the diagnostics information of EtherCAT slaves' state. For further details, see KINGSTAR Analysis Console > Diagnostic Tool.
NOTE: Below APIs are only available in certain states, please refer to the Available State(s) column to see its availability.
Name | Type | Meaning |
Available State(s) |
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FixedAddress | USHORT | The fixed address of a slave. Set by the master during startup. Values start at 1001 and follow the link order. |
>= Init |
|||||||||||||||||||||||||||
Type[64] | char | The device type of a slave. |
>= Init |
|||||||||||||||||||||||||||
Name[64] | char | The name of a slave. |
>= Init |
|||||||||||||||||||||||||||
DeviceType | UINT | The device type of a slave. |
>= Init |
|||||||||||||||||||||||||||
VendorId | UINT | The vendor ID of a slave. |
>= Init |
|||||||||||||||||||||||||||
ProductCode | UINT | The product code of a slave. |
>= Init |
|||||||||||||||||||||||||||
RevisionNo | UINT | The revision number of a slave. |
>= Init |
|||||||||||||||||||||||||||
SerialNo | UINT | The serial number of a slave. |
>= Init |
|||||||||||||||||||||||||||
MailboxIn | USHORT | The size of a slave's input mailbox buffer. 128 - 512 bytes are moderate. The size under 32 bytes is small. |
>= Init |
|||||||||||||||||||||||||||
MailboxOut | USHORT | The size of a slave's output mailbox buffer. 128 - 512 bytes are moderate. The size under 32 bytes is small. |
>= Init |
|||||||||||||||||||||||||||
LinkStatus | BYTE |
The EtherCAT link of a slave. The meaning of Link Status bits:
|
>= Init |
|||||||||||||||||||||||||||
LinkPreset | BYTE |
Reports the expected physical link on ports 1, 2, and 3 of a slave. The processing order is port 0→3→1→2. m
|
>= Init |
|||||||||||||||||||||||||||
Flags | BYTE |
Provides additional topology information about a slave.
|
>= Init |
|||||||||||||||||||||||||||
StationAddress | USHORT | Commonly called Alias address. It can be written by the master and is stored in the slave EEPROM. This value is kept when powering off and can be used to differentiate identical slaves. |
>= Init |
|||||||||||||||||||||||||||
DlStatus | USHORT | The EtherCAT loop state of each port. |
OP |
|||||||||||||||||||||||||||
AlStatus | USHORT |
The EtherCAT state plus an alarm bit. Bits 0-3: an EtherCAT state. Bit 4: alarm. |
>= Init |
|||||||||||||||||||||||||||
AlControl | USHORT | Controls the EtherCAT state machine. The master requests the state changes by writing to the AL Control register, and then the slave indicates its state in the AL Status register. From AL Control you can see the EtherCAT state of the slave. For example, 8 means the master requests the Operational state (Op), and the slave reflects its state as Op. |
>= Init |
|||||||||||||||||||||||||||
AlStatusCode | USHORT | AL Status Code. It displays the error code that indicates last time the problem the slave ran into. The error code list can be checked at the EtherCAT AL Status codes page. |
>= Init |
|||||||||||||||||||||||||||
LinkConnStatus | BYTE |
Reports the actual link status on each port of a slave.
NOTE: The processing order is port 0→3→1→2. |
>= Init |
|||||||||||||||||||||||||||
LinkConnControl | BYTE |
The value of the register 0x0101 of a slave. Bit 0 and 1: Loop Control port 0. Bit 2 and 3: Loop Control port 1. Bit 4 and 5: Loop Control port 2. Bit 6 and 7: Loop Control port 3.
The values of a loop control of a port: 00: Auto: the port state is determined by the link state. The port is open when there is a link. It is closed when there is no link. 01: Auto Close: the port state is determined by the link state. If there is no link, the port is closed. If a link is created, the port won't be open automatically unless the master makes an explicit request. 10: Open: the port is always open. If there is no link, the outgoing EtherCAT frames are lost. 11: Close: the port is always closed. If there is a link, the incoming EtherCAT frames won't be received. |
OP |
|||||||||||||||||||||||||||
PortAddress | USHORT |
The fixed address of the device expected to be connected to each port.
PortAddress[0]: The fixed address of the device connected to port 0 PortAddress[1]: The fixed address of the device connected to port 1 PortAddress[2]: The fixed address of the device connected to port 2 PortAddress[3]: The fixed address of the device connected to port 3 |
>= Init |
|||||||||||||||||||||||||||
FrameCrc | BYTE |
The Ethernet frame error count for each port.
FrameCrc[0]: The Ethernet frame error count of port 0 FrameCrc[1]: The Ethernet frame error count of port 1 FrameCrc[2]: The Ethernet frame error count of port 2 FrameCrc[3]: The Ethernet frame error count of port 3 |
OP |
|||||||||||||||||||||||||||
PhyCrc | BYTE |
The physical layer communication error count for each port.
PhyCrc[0]: The physical layer communication error count of port 0 PhyCrc[1]: The physical layer communication error count of port 1 PhyCrc[2]: The physical layer communication error count of port 2 PhyCrc[3]: The physical layer communication error count of port 3 |
OP |
|||||||||||||||||||||||||||
LostLink | BYTE |
Lost link count for each port. EtherCAT devices increment a Lost Link Counter in case of loss of physical link with neighboring devices.
LostLink[0]: The lost link count of port 0 LostLink[1]: The lost link count of port 1 LostLink[2]: The lost link count of port 2 LostLink[3]: The lost link count of port 3 |
OP |
|||||||||||||||||||||||||||
CyclicWc | UINT |
The number of cycles the datagram which is responsible for processing data exchange of the slave was received back with an invalid working counter. |
OP |
|||||||||||||||||||||||||||
NotPresent | UINT |
The number of times the master lost the physical link with the slave. |
>= Offline |
|||||||||||||||||||||||||||
AbnormalState | UINT | The number of times the slave leave its state autonomously to a lower state without the master requests. |
>= Offline |
NOTE: All the EtherCAT states and their transition order are listed below:
-
Offline → Init → Pre-Operational (PreOP) → Safe-Operational(SafeOP) → Operational (OP)
-
Offline → Init → Boot
For more information about all the states, please refer to EthercatState.