Contatto
MCP 4 – User's manual
DUEMMEGI
11- MODBUS COMMUNICATION PROTOCOL
11.1- Abstract
MCP Plus can interface to external world through MODBUS RTU protocol. This protocol is integrated into
MCP 4 and coexist, if enabled by the PROTOCOL directive (see related paragraph), together to the FXP XT
proprietary protocol as described previously; this means:
MCP Plus will answer according to the MODBUS protocol, if enabled, to any MODBUS requests
MCP Plus will answer according to the proprietary FXP XT protocol to any FXP XT requests
This chapter will describe some traces about using of MODBUS protocol.
The communication parameters for MODBUS protocol implemented into MCP 4 are the followings:
1 start bit
8 data bits
no parity
1 or 2 stop bits (automatic detection)
The baud rate may be set as previously described to the following values: 2400, 4800, 9600, 19200, 38400,
57600, 115200 baud.
MCP 4 always acts as slave (it is a MODBUS peripheral unit)
; this means that it
only answers to the requests of a MASTER MODBUS DEVICE.
In a MODBUS networks each peripheral device must its own address (normally named “station address”); the
address of MCP 4 has to be set by the ADDRESS function as described in the related paragraph.
To localize the input and output points, virtual points, registers, etc., refer to the external RAM memory
described in a previous chapter or, better, refer to the tables listed in the following pages.
11.2- Supported MODBUS functions
MCP 4 supports, in SLAVE mode, the following MODBUS functions:
Function code
Description
1
Read output table
2
Read input table
3
Read registers (RAM memory)
4
Read analog input
5
Force single digital output point
6
Preset single register
16
Preset multiple registers
17
Report device type
In MASTER mode, MCP 4 uses MODBUS functions 3, 4 and 16 only.
11.3- Example of MODBUS functions
This paragraph shows some examples of MODBUS functions (request and answer) among the most used; in
these paragraphs it is meant that MCP 4, in a MODBUS system, is a SLAVE device, thus it answers to the
queries of a MASTER device.
The following examples are useful to identify the MODBUS functions to be used when communicating with
MCP 4; the current MODBUS drivers implemented in many common devices (PLC, supervision software for
PC, videoterminals, etc.) normally provide a development platform and a user interface which dramatically
simplify the setting up in respect of the description that will be made in the following paragraphs. In practice
Page 70 of 87
Rel.: 1.2 October 2018
DUEMMEGI
s.r.l. - Via Longhena, 4 – 20139 MILANO
Tel. 02/57300377 - Fax 02/55213686 –
www.duemmegi.it