Accessing to the AL STATUS Register of an EtherCAT Slave

Updated May 8, 2023

Reported In

Software

  • LabVIEW 2017 Full

Driver

  • NI-Industrial Communications for EtherCAT

Other

Third-party EtherCAT slave device

Issue Details

I have a third-party EtherCAT device and I would like to access to the information contained in its AL STATUS register. How can I do it?

Solution

The AL STATUS register is a 16-bit register containing:
  • the Actual State of the Device State Machine (Init State, Request Bootstrap State, etc...) (bits 0:3)
  • an Error Ind flag indicating if the device is in the requested State or less, or if the State changed as result of a local action (bit 4)
  • a Device Identification flag (bit 5)
  • a Reserved field (bits 6:15)
You can use an Invoke Node wired to the EtherCAT Slave Refnum in order to access to a specific part of its AL STATUS register. In particular the GetState method of the IndComECAT Slave Class returns the slaveState Ring, which express the EtherCAT slave device state (bits 0:3 of the AL STATUS Register).



 

Additional Information

There are no explicit methods for accessing the remaining part of the AL STATUS register. The Error Ind flag (bit 4), can be inferred from the content of the AL STATUS CODE register: in fact, as indicated here whenever the requested state is not acknowledged by the slave, the slave sets the Error Ind flag in the AL STATUS register and writes an error code to the AL STATUS CODE register which, by default, is zero. The Error Ind flag content of the AL STATUS register can therefore be considered as 1 whenever the AL STATUS CODE register is different from 0, so you can induce the content of the Error Ind flag from the statusCode returned from the GetState method.