SaCoSone.GENSET_Communication_m_en_1.7
3 Modbus ASCII protocol
3.1 General
The communication setup is: 9600 baud, 8 databits, 1 stopbit, no parity.
The Modbus protocol accepts one command (Function Code 03) for reading
analogue and digital input values one at a time, or as a block of up to 32 in-
puts.
The following chapter describes the commands in the Modbus protocol,
which are implemented, and how they work.
3.2 Protocol Description
The ASCII and RTU version of the Modbus protocol is used, where the
CMS/DM works as Modbus slave.
All data bytes will be converted to 2-ASCII characters (hex-values). Thus,
when below is referred to “bytes“ or “words“, these will fill out 2 or 4 charac-
ters, respectively in the protocol. The general “message frame format“ has
the following outlook:
[:] [SLAVE] [FCT] [DATA] [CHECKSUM] [CR] [LF]
– [:] 1 char. Begin of frame
– [SLAVE] 2 char. Modbus slave address (Selected on DIP-switch
at Display Module)
– [FCT] 2 char. Function code
– [DATA] n X 2 chars data.
– [CHECKSUM] 2 char checksum (LRC)
– [CR] 1 char CR
– [LF] 1 char LF (end of frame)
The following function codes (FCT) is accepted:
– 03H: Read n words at specific address.
– 10H: Write n words at specific address.
In response to the message frame, the slave (CMS) must answer with ap-
propriate data. If this is not possible, a package with the most important bit
in FCT set to 1 will be returned, followed by an exception code, where the
following is supported:
– 01: Illegal function
– 02: Illegal data address
– 03: Illegal data value
– 06: BUSY. Message rejected