Encapsulated Interface Transport (FC43) This function provides an easy access to the CANopen object dictionary. More details can be found in the following documentations: Modbus Application Protocol Specification V1.1b3 CAN in Automation (CiA) 309-2, Interfacing CANopen with TCP/IP - Part 2: Modbus/TCP mapping Note For parts of the messages of the Encapsulated Interface Transport another type of endianness applies (see General). Request and Response definition Name Length Example/Range Slave Address 1 Byte Function Code 1 byte 2Bh (43d) MEI type 1 byte 0Dh (13d) Protocol option fields 2 to 5 bytes Address and data fields N bytes CRC 2 Bytes Protocol option fields: Name Length Example/Range Protocol control 1 to 2 bytes Refer to description Reserved field 1 byte Always 0 (Optional) Counter byte 1 byte (Optional) Network ID 1 byte (Optional) Encoded data 1 byte Protocol control: The protocol control field contains the flags needed to control the message protocol. The protocol control bytes is defined as follows in case the value of the "Extend flag" is set (otherwise Byte 2 gets dropped) : The most significant bit (MSB) is bit 0 for protocol control byte 1, and bit 8 for protocol control byte 2. The least significant bit (LSB) is bit 7 for protocol control byte 1, and bit 15 for protocol control byte 2. Bit Field name Description 0 Extend flag This bit is used when the object dictionary data set is larger than what fits in one Modbus command. The data set is then extended over multiple Modbus messages, each message being a fragment of the data set. "0" = No multiple message transaction, or end of multiple message transaction; "1" = Part of a multiple message transaction 1 Extend protocol control Length of protocol control, the value "0" indicates a length of 1 byte, the value "1" a length of 2 byte 2 Counter byte option This bit is set to 1 to indicate that the counter byte field is used in this message. If this bit is set to 0 the counter byte does not exist in this message. 3 and 4 Reserved 0 5 Network ID option Not supported, must be "0". 6 Encoded data option Not supported, must be "0". 7 Access flag This bit indicates the access method of the request command, "0" = read, "1" = write 8 to 15 Reserved 0 Address and data fields The address and data fields are defined in the following table: Field name Byte size and order Example / range Node ID 1 byte 01h to 7Fh Index 1 byte, high 0000h to FFFFh 1 byte, low Sub-index 1 byte 00h to FFh Starting address 1 byte, high 0000h to FFFFh 1 byte, low Number of data values 1 byte, high 0000h to 00FDh 1 byte, low Read/write data n byte The data are encoded as written in chapter General Example In order to read out the object 6042h:00h (16 bit value), the master needs to send out the following message(all values in hexadecimal representation, Slave-Id of the controller is "5") Request Response As additional example, the following sequence of Modbus messages from master to slave can be used to start a motor: Set 6060 = 2 (velocity mode) Request Response Set 2031 = 03E8 (1000 mA) Request Response Set 6040 = 0 Request Response Set 6040 = 0x80 Request Response Set 6040 = 0x06 Request Response Set 6040 = 0x07 Request Response Set 6040 = 0x0F Request Response Now following two examples of reading an object: Read 6041h:00 Request Response Read 6061h:00 Request Response Error reaction In case of an error, the following message will be sent: Name Length Example value Slave Address 1 Byte Function code 1 byte 2Bh +80h (171d = 43d + 128d) (indicates error) Modbus exception code 1 byte FFh (extended exception) Extended exception length 2 bytes 6 MEI type 1 byte 0Dh Exception code 1 byte CEh Error code 4 bytes CANopen error code CRC 2 Bytes In case an not supported control option bit is set, the following error message will be sent: Name Length Example value Slave Address 1 Byte Function code 1 byte 2Bh +80h (171d = 43d + 128d) (indicates error) Modbus exception code 1 byte FFh (extended exception) Extended exception length 2 bytes 2 + length of Supported protocol control MEI type 1 byte 0Dh Exception code 1 byte AEh Supported protocol control 1 or 2 bytes See following table CRC 2 Bytes Bit Field name Description 0 Extend flag This bit is used when the object dictionary data set is larger than what fits in one Modbus command. The data set is then extended over multiple Modbus messages, each message being a fragment of the data set. "0" = No multiple message transaction, or end of multiple message transaction; "1" = Part of a multiple message transaction 1 Extend protocol control Length of protocol control, the value "0" indicates a length of 1 byte, the value "1" a length of 2 byte 2 Counter byte option This bit is set to 1 to indicate that the counter byte field is used in this message. If this bit is set to 0 the counter byte does not exist in this message. 3 and 4 Reserved 0 5 Network ID option Not supported, must be "0". 6 Encoded data option Not supported, must be "0". 7 Access flag This bit indicates the access method of the request command, "0" = read, "1" = write 8 to 15 Reserved 0 The following example shows an error in case of a wrong request. The requests reads the object 6061h:00 with a length of 2 byte, but the object is 1 byte long, actually: Request Response
Encapsulated Interface Transport (FC43) This function provides an easy access to the CANopen object dictionary. More details can be found in the following documentations: Modbus Application Protocol Specification V1.1b3 CAN in Automation (CiA) 309-2, Interfacing CANopen with TCP/IP - Part 2: Modbus/TCP mapping Note For parts of the messages of the Encapsulated Interface Transport another type of endianness applies (see General). Request and Response definition Name Length Example/Range Slave Address 1 Byte Function Code 1 byte 2Bh (43d) MEI type 1 byte 0Dh (13d) Protocol option fields 2 to 5 bytes Address and data fields N bytes CRC 2 Bytes Protocol option fields: Name Length Example/Range Protocol control 1 to 2 bytes Refer to description Reserved field 1 byte Always 0 (Optional) Counter byte 1 byte (Optional) Network ID 1 byte (Optional) Encoded data 1 byte Protocol control: The protocol control field contains the flags needed to control the message protocol. The protocol control bytes is defined as follows in case the value of the "Extend flag" is set (otherwise Byte 2 gets dropped) : The most significant bit (MSB) is bit 0 for protocol control byte 1, and bit 8 for protocol control byte 2. The least significant bit (LSB) is bit 7 for protocol control byte 1, and bit 15 for protocol control byte 2. Bit Field name Description 0 Extend flag This bit is used when the object dictionary data set is larger than what fits in one Modbus command. The data set is then extended over multiple Modbus messages, each message being a fragment of the data set. "0" = No multiple message transaction, or end of multiple message transaction; "1" = Part of a multiple message transaction 1 Extend protocol control Length of protocol control, the value "0" indicates a length of 1 byte, the value "1" a length of 2 byte 2 Counter byte option This bit is set to 1 to indicate that the counter byte field is used in this message. If this bit is set to 0 the counter byte does not exist in this message. 3 and 4 Reserved 0 5 Network ID option Not supported, must be "0". 6 Encoded data option Not supported, must be "0". 7 Access flag This bit indicates the access method of the request command, "0" = read, "1" = write 8 to 15 Reserved 0 Address and data fields The address and data fields are defined in the following table: Field name Byte size and order Example / range Node ID 1 byte 01h to 7Fh Index 1 byte, high 0000h to FFFFh 1 byte, low Sub-index 1 byte 00h to FFh Starting address 1 byte, high 0000h to FFFFh 1 byte, low Number of data values 1 byte, high 0000h to 00FDh 1 byte, low Read/write data n byte The data are encoded as written in chapter General Example In order to read out the object 6042h:00h (16 bit value), the master needs to send out the following message(all values in hexadecimal representation, Slave-Id of the controller is "5") Request Response As additional example, the following sequence of Modbus messages from master to slave can be used to start a motor: Set 6060 = 2 (velocity mode) Request Response Set 2031 = 03E8 (1000 mA) Request Response Set 6040 = 0 Request Response Set 6040 = 0x80 Request Response Set 6040 = 0x06 Request Response Set 6040 = 0x07 Request Response Set 6040 = 0x0F Request Response Now following two examples of reading an object: Read 6041h:00 Request Response Read 6061h:00 Request Response Error reaction In case of an error, the following message will be sent: Name Length Example value Slave Address 1 Byte Function code 1 byte 2Bh +80h (171d = 43d + 128d) (indicates error) Modbus exception code 1 byte FFh (extended exception) Extended exception length 2 bytes 6 MEI type 1 byte 0Dh Exception code 1 byte CEh Error code 4 bytes CANopen error code CRC 2 Bytes In case an not supported control option bit is set, the following error message will be sent: Name Length Example value Slave Address 1 Byte Function code 1 byte 2Bh +80h (171d = 43d + 128d) (indicates error) Modbus exception code 1 byte FFh (extended exception) Extended exception length 2 bytes 2 + length of Supported protocol control MEI type 1 byte 0Dh Exception code 1 byte AEh Supported protocol control 1 or 2 bytes See following table CRC 2 Bytes Bit Field name Description 0 Extend flag This bit is used when the object dictionary data set is larger than what fits in one Modbus command. The data set is then extended over multiple Modbus messages, each message being a fragment of the data set. "0" = No multiple message transaction, or end of multiple message transaction; "1" = Part of a multiple message transaction 1 Extend protocol control Length of protocol control, the value "0" indicates a length of 1 byte, the value "1" a length of 2 byte 2 Counter byte option This bit is set to 1 to indicate that the counter byte field is used in this message. If this bit is set to 0 the counter byte does not exist in this message. 3 and 4 Reserved 0 5 Network ID option Not supported, must be "0". 6 Encoded data option Not supported, must be "0". 7 Access flag This bit indicates the access method of the request command, "0" = read, "1" = write 8 to 15 Reserved 0 The following example shows an error in case of a wrong request. The requests reads the object 6061h:00 with a length of 2 byte, but the object is 1 byte long, actually: Request Response
Error reaction In case of an error, the following message will be sent: Name Length Example value Slave Address 1 Byte Function code 1 byte 2Bh +80h (171d = 43d + 128d) (indicates error) Modbus exception code 1 byte FFh (extended exception) Extended exception length 2 bytes 6 MEI type 1 byte 0Dh Exception code 1 byte CEh Error code 4 bytes CANopen error code CRC 2 Bytes In case an not supported control option bit is set, the following error message will be sent: Name Length Example value Slave Address 1 Byte Function code 1 byte 2Bh +80h (171d = 43d + 128d) (indicates error) Modbus exception code 1 byte FFh (extended exception) Extended exception length 2 bytes 2 + length of Supported protocol control MEI type 1 byte 0Dh Exception code 1 byte AEh Supported protocol control 1 or 2 bytes See following table CRC 2 Bytes Bit Field name Description 0 Extend flag This bit is used when the object dictionary data set is larger than what fits in one Modbus command. The data set is then extended over multiple Modbus messages, each message being a fragment of the data set. "0" = No multiple message transaction, or end of multiple message transaction; "1" = Part of a multiple message transaction 1 Extend protocol control Length of protocol control, the value "0" indicates a length of 1 byte, the value "1" a length of 2 byte 2 Counter byte option This bit is set to 1 to indicate that the counter byte field is used in this message. If this bit is set to 0 the counter byte does not exist in this message. 3 and 4 Reserved 0 5 Network ID option Not supported, must be "0". 6 Encoded data option Not supported, must be "0". 7 Access flag This bit indicates the access method of the request command, "0" = read, "1" = write 8 to 15 Reserved 0 The following example shows an error in case of a wrong request. The requests reads the object 6061h:00 with a length of 2 byte, but the object is 1 byte long, actually: Request Response