Programmable Relay ● User Manual for ELC, EXM and PR Series 174 2020 v6.0 ● © Rievtech Co.,
Ltd. ● www.rievtech.com
Modbus Read Write
Description of function
This function block is for Ethernet PLC which have a built-
in webserver. This block is used when the CPU is to act as
a Modbus Master (Client).
If the CPU does not have a built-in webserver, then please
use the standard Modbus Read and Modbus Write blocks
above.
When activated by a high signal on the En pin, this block
will enable the CPU to communicate via RS232 or RS485
or Ethernet as a Modbus Master (Client). If the connection
to the Slave (Server) device is established, then the output
pin of this block will be set high.
A high signal at the En input will
enable the Modbus Read Write
block to be activated.
Resets the block with a high signal
on the R pin. The CPU will be
disconnected from the Slave. Input
R has priority over input En.
Communicate Parameters
Comm Type:
o Com 0 (RS232 or PRO485)
o Com 1 (Expansion RS485)
o Com 2 (Built-in RS485
o Ethernet (Channels 1 to 8)
Com 0, 1 or 2 Settings:
o BPS: Baud Rate
o Data Bits: 5, 6, 7 or 8
o Stop Bits: 1, 1.5 or 2
o Parity Bit: None, Odd, Even,
Mark or Space
Ethernet Settings:
o Remote: 1 to 8
o Local CPU: Client
(Master) or Server
(Slave)
Protocol:
o Modbus RTU or
Modbus/TCP
Timeout: Connection timeout in
seconds.
TCP/UDP: Use TCP or UDP
Modbus Type: Standard or
Custom (See Parameter 2
below)
Slave Address: Default is 1
Data Register Index: High/Low
or Low/High (Word Swapped)
Command (Modbus Function):
o 01 Read Coil (0x)
o 02 Read Discrete Input (1x)
o 03 Read Input Registers (4x)
o 04 Read Holding Registers
(3x)
o 15 Write Multiple Coil
o 16 Write Multiple Registers
Register Address: Start register
Count: Number of registers
Auto:
o For Modbus Commands 01
and 02, options are:
Q – Physical outputs
F – Digital Flags
o For Modbus Command 03,
options are:
AF- Analogue flags