For the purpose of this post we’ll use SOMANET COM EtherCAT controller board. Our goal is to:

  • generate SII binaries from ESI files,
  • write SII contents to a slave and
  • print EEPROM content in a human-readable format.

Prerequisites

  1. SOMANET COM EtherCAT as a communication module along with SOMANET Core C22.

    #somanet #c22 #ethercat #synapticon

    A photo posted by Marko (@ce_la_vii) on

  2. Installed IgH EtherCAT Master for Linux. Synapticon has prepared an installer for EtherCAT master drive that you can download from here.
  3. siitool developed by fjeschke at Synapticon. This tool will help us generate SSI binaries and view EtherCAT EEPROM content in a human-readable format.

Generate SII binaries from ESI files

Use siitool to generate binary from the existing Somanet_CiA402-single.xml like in the example or any other ESI file:

$ ./siitool -o esi.bin Somanet_CiA402-single.xml

Write SII contents to a slave

Use ethercat tool to write the generated binary to EEPROM of the first EtherCAT slave on the bus:

$ ethercat sii_write -p 0 esi.bin

The ethercat command-line tool already comes with commands for reading the EEPROM content. For example ethercat xml generates slave information XML and ethercat sii_read outputs slave’s SSI contents in a binary or a textual representation. You can also use siitool -p flag to print SII contents in a human-readable format:

$ ethercat sii_read > esi.bin
$ ./siitool -p esi.bin

which prints identity, default mailbox settings, supported mailboxes, EEPROM size and version, FMMU, SM, TxPDO, RxPDO etc.