DUEMMEGI
MCP 4 – User's manual
Contatto
2.1.4- Communication Protocol
Set the communication protocols to be used for each port of MCP 4. COM1 is the communication port on the
front panel (RS232), COM2 and COM4 are on the terminal block (RS485), COM3 is the special port under
the terminal cover on bottom left side (e.g. for WEBS module connected by a flat cable) and LAN1 is the
Ethernet port (MCP4/ETH only); on the ETH port, both MODBUS TCP/IP and RTU will be activated
(automatic detection). The directives are the followings (FXPXT can be omitted because however activated):
COM1
= (FXPXT,
MODBUS
)
// RS232
COM2
= (FXPXT,
MODBUS
)
// RS485
COM3
= (FXPXT,
MODBUS
)
// Dedicated port (WEBS)
COM4
= (FXPXT,
MODBUS
)
// RS485
LAN1
= (FXPXT,
MODBUS
)
// ETH port
The available options for all 4 COM ports (COM3 through WEBS module) are the following:
FXPT
proprietary protocol, always active even if not specified
MODBUS
MODBUS RTU protocol: full correspondence between the number of the Word specified in
the Master MODBUS driver and the number of the Words listed in the RAM map in this own
manual. This is the preferred option.
MODBUS-
MODBUS RTU protocol: the number of the Word specified in the Master MODBUS driver
must be increased by 1 in respect to what listed in the RAM map in this own manual. For
compatibility only when replacing a MCP Plus with a MCP 4 in old installations.
MODBUS MASTER
MCP 4, by the just described directive, behaves as a SLAVE device in a MODBUS network. Alternatively, the
MODBUS
MASTER
mode can be activated for MCP 4, exclusively on COM4, using the following directive:
MODBUS
a (T, Vm) = ( Wx, n,
Ry
, \
........... )
where:
a
is the address (in the range 1 to 31) of the MODBUS SLAVE node to communicate with
T
is the communication timeout in milliseconds; if omitted, the default is 1000 (1 second)
Vm
is the virtual point that is activated if the slave “a” does not answer to MCP 4; this parameter
is optional and can be omitted. The cumulative point V2017 is always available, see paragraph 1.2
x
is the number of the first MODBUS Word to be read/written
n
is the number of Words to be read/written
y
is the starting number of MCP register where the Words have to be stored
The same directive allows the writing of the specified Words when the value of the related register is modified
(by program, script, supervisor, etc.). If more blocks of non consecutive Words have to be read/written on the
same MODBUS peripheral device, more lines can be added as follows:
MODBUS
a (T, Vm) = ( Wx, n,
Ry
, \
Wj, m,
Rk
, \
........... )
Note: if MODBUS MASTER has been activated, all SLAVE protocols (FXPXT included) on COM4 will be deactivated.
To communicate with more MODBUS peripheral devices, add a directive for each SLAVE address as in the
following example; the timeout MUST be the same for all nodes.
MODBUS
1 (500) = ( W0, 10,
R101
, \
W100, 10,
R111
)
MODBUS
2 (500) = ( W0, 10,
R121
, \
W100, 10,
R131
)
MODBUS
3 (500) = ( W0, 10,
R141
, \
W100, 10,
R151
)
MODBUS
4 (500) = ( W0, 10,
R161
, \
W100, 10,
R171
)
DUEMMEGI
s.r.l. - Via Longhena, 4 – 20139 MILANO
Tel. 02/57300377 - Fax 02/55213686 –
www.duemmegi.it
Rel.: 1.2 October 2018
Page 9 of 87