Ethernet protocol description
Frame
Frame is composed by 4 fields:
Node ID | Header | Config data | Cyclic data (optional) | CRC | |||
---|---|---|---|---|---|---|---|
Reserved | subsystem | Address | Command | Pending frame | |||
12 bits | 4 bits | 12 bits | 3 bits | 1 bit | 4 word | 0 - 32 word | 1 word |
Node ID. It is used to identify the destination device.
Value from 1 to 15 points to an axis whereas value 0 points to communication parameters.- Header. It includes the master and slave commands
- Config data. Contains data from configuration access. If data is higher than 4 words, fragmentation is applied (see below).
- Cyclic data. Contains data from cyclic access. This field is by default disabled.
CRC. CRC-CCITT (XModem) polynomial is used.
CRC parameter Value Width 16 bits Polynomial 0x1021 Initial value (seed) 0x0000
Configuration access
Configuration access is the name used to identify acyclic / asynchronous requests from master to slave. This access type doesn't use the cyclic data field.
Frame | |||
---|---|---|---|
Node ID | Header | Config data | CRC |
1 word | 1 word | 4 word | 1 word |
Addressing
Address field from the header is used to indicate the register to be accessed of the servo drive dictionary. The maximum supported registers are 2048 (11 bits) so the first bit of the field is reserved for future use and must be kept to 0.
Min register address | Max register address |
---|---|
0 | 2047 (0x7FF) |
Commands
The protocol is based on master-slave communication and all the commands sent by a master are confirmed by the slave, indicating the result of the operation. So every configuration is composed by two frames: Request from master to slave, and reply from slave to master. The available commands are:
Master commands
Read Access 0b001. It is used to get a value from a drive register. Slave must reply with an ACK or Error on read (see below)
Simple read example
Read access to register 0x10
NodeID Header Config data CRC Reserved Subsystem Address Command Pending frame 0x000 0x1 0x010 0b001 0 0 https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 0x 01 00 02 01 00 00 00 00 00 00 00 00 XX XX Write Access 0b010. It is used to set a value of a drive register. Slave must reply with an ACK or Error on write (see below)
Simple write example
Write access to register 0x10
NodeID Header Config data CRC Reserved Subsystem Address Command Pending frame 0x000 0x1 0x010 0b010 0 0x0006000000000000 https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 0x 01 00 04 01 06 00 00 00 00 00 00 00 XX XX Get info command 0b000. It is used to obtain all the information of a register available on the MCB slave. Slave will reply with an ACK or Error. Data field from slave is coded in the next way:
LSB (bits) 0..7 8..13 14..15 16..18 18..63 MSB (bits) Size Data type Cyclic type Access type Reserved Number of bytes INT16 → 0 Config → 0 READ → 3 UINT16 → 1 INT32 → 2 Cyclic Tx (drive to master) → 1 WRITE → 5 UINT32 → 3 FLOAT → 4 Cyclic Rx (master to drive) → 2 READ/WRITE → 7 STRING → 5 Get info example
Getting information of register 0x011
Master request
Header Config data CRC Address Command Pending frame 0x011 0b000 0 0x0000000000000000 https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 0x01100000000000000000XXXX Slave reply
Header Config data CRC Address Command Pending frame 0x011 0b011 0 0x4102000300000000 https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 0x01164102000300000000XXXX Idle command 0b111. It is used every time the master needs to send a frame without any configuration access.
Slave commands
ACK access 0b011. Indicates that the request has been processed correctly
Simple read example
Successful reply to read access on register 0x10
Header Config data CRC Address Command Pending frame 0x010 0b011 0 0x0006000000000000 https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 0x01060006000000000000XXXX Error on read 0b101. Indicates that the read request has not been executed correctly. Config data includes an error code to indicate the reason.
Simple error on read
Error reply to read access on register 0x10
Header Config data CRC Address Command Pending frame 0x010 0b101 0 0x0607001000000000 https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 0x01090607001000000000XXXX Error on write 0b110. Indicates that the read request has not been executed correctly. Config data includes an error code to indicate the reason.
Simple error on write
Error reply to write access on register 0x10
Header Config data CRC Address Command Pending frame 0x010 0b110 0 0x0607001000000000 https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 0x010C0607001000000000XXXX - Idle command 0b111. It is used to indicate that slave reply is still being processed. It is used if configuration access is done when cyclic mode is enabled. See configuration access over cyclic section.
Error access codes
The possible error codes when a wrong access is detected are:
Error brief | Error code | Example description |
---|---|---|
Unsupported access | 0x06010000 | Try to write a read only register |
Register doesn't exist | 0x06020000 | Register address doesn't exist into dictionary |
General error | 0x08000000 | Undefined error has been detected |
CRC error | 0x08010040 | A CRC error has been detected |
Invalid command | 0x08010030 | Unknown command for the slave |
Data field
Data field contains the data from a read or write request. It is sent word by word (independent of the used physical layer) and in LSW (least significant word first). Whenever it is possible, the words are sent in MSB (Most significant bit first).
Example
Data 1311768467463790320 (0x123456789ABCDEF0) is sent in this order through data field:
0xDEF0 9ABC 5678 1234
Data extension
If the data field is higher than 4 words (for example for ID registers that contains strings) the message might be extended to up to 256 words.
An extended configuration frame is generated indicated by the pending frame bit. When this bit is enabled, the first word of the configurration data contains the extended data number of bytes.
Read example
Reading the 0x0B2 register (Monitor Data):
Header | Config data | CRC | ||
---|---|---|---|---|
Address | Command | Extended | ||
0x0B2 | 0b001 | 0 | 0x0000000000000000 | https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 |
0x0100 B202 0000 0000 0000 0000 XXXX |
reply from slave:
Header | Config data | CRC | Extended data | ||
---|---|---|---|---|---|
Address | Command | Extended | |||
0x0B2 | 0b111 | 1 | 0x00000000000000C8 | https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 | 200 bytes of data |
The complete command: 0x0100 0FB2 00C8 0000 0000 0000 XXXX ...
By default, the slave will try to send 512 bytes of extended data, but this behavior is configurable through request frame, writing the amount of bytes to receive as extended part in the config data:
Write example
Master request to read 854 bytes of extended data:
Header | Config data | CRC | ||
---|---|---|---|---|
Address | Command | Extended | ||
0x0B2 | 0x1 | 0x0 | 0x0000000000000356 | https://novantamotion.atlassian.net/wiki/spaces/SS/pages/54497599 |
The complete command: 0x0001 0FB2 0356 0000 0000 0000 XXXX