How is the Modbus comms message formatted for the Controller?

Submitted by glx25v on Fri, 08/17/2018 - 17:29

Units with Modbus are P6100, P8100, P4100,  2300, 6600, 8600, 4400, 6400 and MLC 9000-B220. The N6100, 6120, N8100 and N4100 have West ASCII comms protocol as standard, although a special version is available with Modbus instead. These units have a suffix S09 in their model code.

All of these models use the Modbus RTU comms protocol over an RS485 physical layer.

Each byte of the message is made up of 8 data bits 1 start bit, 1 stop bit and an optional parity bit.

Each message is followed by a 2 byte CRC16. A message is terminated solely by a delay of more than 3 character lengths at the given baud rate, and any character received after such a delay is treated as a potential address at the start of a new message.
 

Example 1:

Below is the outgoing message and the response from any discrete West Controller with Modbus comms (all values in Hex)

To read the current PV of address 1.
01,03,00,01,00,01,D5,CA {Outbound}
01,03,02,00,19,79,8E {response}

Breakdown of the outbound message
01 = Modbus Address
03 = Modbus Function code
00,01 = Address of 1st Word (parameter) (high, Low byte)
00,01 = Number of Words (high, Low byte)
D5,CA = CRC

Breakdown of the response to the message
01 = Modbus Address
03 = Modbus Function code
02 = Number of bytes in the return data
00,19 = 1st (and in this case only)Value
79,8E = CRC


Example 2:

Below is the outgoing message and the response from a West MLC9000-B220 (all values in Hex)

To read the current PV of loop 1 module 1 at address 97dec (61hex).
61,03,00,19,00,01,5C,6D {Outbound}
61,03,02,00,19,(CRC) {response}

Breakdown of the outbound message
61 = Modbus Address
03 = Modbus Function code
00,19 = Address of 1st Word (parameter) (high, Low byte)
00,01 = Number of Words (high, Low byte)
5C,6D = CRC

Breakdown of the response to the message
61 = Modbus Address
03 = Modbus Function code
02 = Number of bytes in the return data
00,19 = 1st (and in this case only)Value
CRC = Cyclic Redundancy Check (CRC) determined by the value returned

In this example, the data value is 19h which = 25dec. The value of CRC will of course depend upon the actual value of the PV.


N Series: For those units with S09 suffix, a supplement to the standard manual is available which contains full details of the Modbus commands for these units. Click here to go to the manuals page.