Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

YOKOGAWA Romania Modbus

YEF-RO Regional Engineering Centre


How to …. Configure Modbus Communication

DISCLAIMER

THIS DOCUMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND WHATSOEVER, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES REGARDING MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR ACCURACY OF DATA.

IN NO EVENT SHALL YEF-RO BE LIABLE FOR ANY LOSS, EXPENSE OR DAMAGE ARISING OUT OF OR IN
CONNECTION WITH THE USE OF OR RELIANCE UPON THE INFORMATION IN THIS DOCUMENT.

WHENEVER IN DOUBT OR WANT MORE INFORMATION REMEMBER TO ALWAYS CHECK THE MANUAL!

Page 1 of 18
MODBUS is an application layer messaging protocol, positioned at level 7 of the OSI
model, which provides client/server communication between devices connected on different types
of buses or networks. Modbus protocol can be implemented using the following:
• TCP/IP over Ethernet
• Asynchronous serial transmission over a variety of media (i.e. RS-232, RS-422/485, etc.)

Modbus over TCP/IP is a real-time client/server communication protocol used for devices
connected on a TCP/IP Ethernet network.
Modbus RTU is a Master-Slaves protocol and is implemented using asynchronous serial
transmission. A master-slave type system has one node (the master node) that issues explicit
commands to one of the "slave" nodes and processes responses. Slave nodes will not typically
transmit data without a request from the master node, and do not communicate with other slaves.

Modbus communication:
- Serial communication modules ALR111, ALR121
- Ethernet communication module: ALE111

1. Serial communication

1.1 Software Configuration

1.1.1 Adding an ALR121 card – click NODE1 folder/Create New/ IOM

Page 2 of 18
1.1.2 Communication parameters

Example :

□RS23 □RS42 ■RS48


1 Interface Type
2 2 5
2 Wiring at Device end ■2wire □4wire
4 Baud. Rates (bps) □1200 □2400 □4800 □9600 ■19200
5 Databits ■8 □7
6 Stopbits ■1 □2
7 Parity □None □Odd ■Even
8 2/4 wire Setting □4 wire ■ 2wire
Response Timeout time
9 □---- ■Configurable timeout
(sec.)

Note: When 19200 bps is specified, No Parity bit cannot be set (Parity ≠ None).

Page 3 of 18
Transmission Specification:

Item Description Project Default Remark


Settings
Interface RS-422 / RS485 RS422 or RS485

Transmission method Half Duplex Half Duplex


Synchronization method Asynchronous (Start Asynchronous
–Stop (Start –Stop
Synchronization) Synchronization)
Baud rate 1200, 2400, 4800, 19200
9600, 19200 bps
Transmission procedure Modbus protocol Modbus Protocol
(RTU mode) (RTU)
Binary Binary
Data type Start bit 1 1
Data bit 8 8
Parity bit None, Even, Odd Even (*1)
Stop bit 1 1
Time Transmission 1000 ms 1000 ms
monitoring enable
monitoring
time
Reception 10 ms 10 ms
character
interval
monitoring
time
Text frame Start of text None None
End of text None None
XON/XOFF flow control No No
RS control No No (*1)
DR check Yes Yes (*1)
CD check No No (*1)
No response time 0 to 99 seconds 4 (*1)
Number of communication 0 to 99 times 4 (*1)
retries upon error
Recovery communication 0 to 999 seconds 30 (*1)
time interval
Transmission wait time 1 second 1 second

Note: *1 This settings can be changed from the property dialog box of the card.

Page 4 of 18
Setting Items on Communication I/O Builder :
- Element - the element numbers are displayed for reference only, they cannot be set.
- Buffer – this item sets the buffer size used by a program.
- Program Name – this item has the following format: Kt-n-sProgramName
K: FIO identifier
t: System number (Specify 1.)
n: Node number
s: Slot number
ProgramName: MODBUS
- Size - this item sets the data size (data length) necessary in the processing of a single
communication. The size is set in word units.
- Port – The port that can be set is either 1 or 2.
- IP Address – No need for IP address to be set
- Station - The station numbers that can be set are 1 to 255.
- Device&Address - this sets the contents of data to be collected from subsystem.
- Data Type - This sets data type of the subsystem data.
- Reverse - Set whether to reverse the bit/word arrangement between the FCS and the
subsystem.
- Scan - Set whether to read the communication I/O analog data into the communication
I/O data buffer at the beginning of high-speed scan of the FCS.
- Label - The name of the function block I/O terminal.

1.2 Hardware Configuration

1.2.1 Cable Connection

For ALR111:[D-sub 9 pin connection]

For ALR121:
● RS-485: [Point- to –Point communication]: 4 wire connection
● RS-485: [Point to Point or Multipoint communication]: 2 wire connection

Page 5 of 18
RS-485: [Point- to –Point communication]: 2 wire connection

RS-485: [Multipoint communication]: 2 wire connection

ALR121 Subsystem-1 Subsystem-2 Subsystem-n

Page 6 of 18
RS-485: [Point- to –Point communication]: 4 wire connection

The following table shows the connector specification of the ALR121 card.

Page 7 of 18
2. Ethernet communication

2.1 Software Configuration

2.1.1 Adding an ALE111 card – right click NODE1 folder /Create New/IOM

Communication Parameters Setting:

Page 8 of 18
Transmission Specification:

Item Description Project Default


Settings
Connection Device FMODBUS FMODBUS
IP Address
Subnet Mask As per project requirement
Default Gateway
Response Timeout This item sets the time for 4
detecting no response
Number of Retries upon This item sets the number of 1
response retries performed when a
communication error occurs.

Interval of connection This item sets the time interval 30


retries between communication
recovery retries.

Option 1 In the case of the Modbus/TCP 502


PLC, make sure to set port
number “502"
Option 2
Option 3
Option 4
Command No command is set No Command is
Set

2.1.2 Data format

Page 9 of 18
2.1.3 CommDataWW & WBTagDef

Database example:

Page 10 of 18
Setting Items on Communication I/O Builder :
- Element - the element numbers are displayed for reference only, they cannot be set.
- Buffer – this item sets the buffer size used by a program.
- Program Name – this item has the following format: Kt-n-sProgramName
K: FIO identifier
t: System number (Specify 1.)
n: Node number
s: Slot number
ProgramName: FMODBUS
- Size - this item sets the data size (data length) necessary in the processing of a single
communication. The size is set in word units.
- Port – The port is set to 1.
- IP Address – This item sets the IP address of the subsystem.
- Station - This item sets the station number of the subsystem.
- Device&Address - this sets the contents of data to be collected from subsystem.
- Data Type - This sets data type of the subsystem data.
- Reverse - This item specifies whether or not to reverse the bit or word sequences within
the FCS and in the subsystem data.
- Scan - Set whether to read the communication I/O analog data into the communication
I/O data buffer at the beginning of high-speed scan of the FCS.
- Label - The name of the function block I/O terminal.

CommDataWW:

Page 11 of 18
CommDataWW / WBTagDef : DO

Page 12 of 18
CommDataWW / WBTagDef DI (Bitpacked)

Page 13 of 18
CommDataWW / WBTagDef : DI (Boolean)

Page 14 of 18
CommDataWW / WBTagDef : AI

Page 15 of 18
CommDataWW / WBTagDef : AI & DI

Page 16 of 18
2.1.4 Configuring register calls

Page 17 of 18
3. Other consideration

One FCS can accommodate:


- up to 8 ALE111/ALR111/ALR121(4 pairs in duplicate configuration) modules for standard
type.
- up to 16 ALE111/ALR111/ALR121(8 pairs in duplicate configuration) modules for extended
type.
Amount of data which can be communicated is depending on type of controller:
- LFCS2, KFCS, FFCS-L – 4000 words /FCS (16bits = 1 word).
- FFCS-V – 8000 word/FCS (16bits = 1 word).

Capacity/Limitations of ALR121 card:


- maximum number of words for each ALR121 is 1000 (16 bits = 1 word)
- maximum number of Analogue I/O data points that can be handled by one ALR121 card:
- 1000 x 16 bits – 16 bits Integer
- 500 x 32 bits – 32 bits Integer or Floating point (IEEE754 Coding format)
- maximum number of calls handled by one ALR121: 30
- Maximum number of data addresses that can be handled by one call:
- for analogue input and analogue output: 125 words (each address has 16 bits)
- for discrete input and discrete output :8 word (128 bits)

Page 18 of 18

You might also like