1

I have a system running TwinCAT with an EtherCAT master and several EtherCAT slaves. In some occasions the EtherCAT slaves are storing an Emergency (EMCY) message in their mailbox. On my system, I run a C++ program. From within that program I want to read the mailbox and get the EMCY messages either cyclically or whenever there is a new message.

My regular method of reading Process Data Objects (PDO) did not work, as the mailbox could not be assigned to a PDO. Also going a detour of reading the mailbox via Python code (pyads) was of no avail yet, as I also did not manage to do so. I'd be grateful for any solutions, examples or hints to the correct direction.

Fabia__n
  • 11
  • 1

1 Answers1

0

It is possible to communicate with the mailbox of a certain EtherCAT slave via ADS. You can find out the NetId and the Port in the IO-Configuration of your TwinCAT-Project.

  • The ADS Net ID is the same as the NetID of an EtherCAT device.

  • The ADS port is the same as the fixed address of an EtherCAT device (see EtherCAT Adr).

What's unclear for me and needs further investigation is the Index-Group and Index-Offset for the mailbox communication service. Maybe Beckhoff-Infosys can help you with that.

Gauss3k
  • 141
  • 3