Você está na página 1de 28

Engineering Division

Subsystem Configuration
(Modbus)

Yokogawa India Limited

YOKOGAWA INDIA LIMITED


Subsystem Configuration -Modbus
Topics covered:
 Modbus Protocol
 Modbus Device & Address
 Modbus Data types.
 Modbus communication module configuration
 Communication Module Set items
 Modbus I/O mapping
 Input/Output Scaling
 Modbus I/O map Generation
 Modbus communication Architecture
 4-Wire/2Wire Modbus configuration
 Modbus communication module status details

YOKOGAWA INDIA LIMITED Page.2


Subsystem Configuration -Modbus
Modbus Protocol:
MODBUS is a commonly used industrial communications protocol. It was
originally designed for Modicon (Schneider Electric) PLCs but has become
widely used by many industrial networks.

Modbus Device & Address :


 The FCS can communicate with a subsystem by using Modbus RTU protocol
via ALR121 (RS-422/ RS-485) communication module
 The Modbus PLC internal data are called devices.

• Bit device : This refers to data where each bit has a meaning. An
internal relay is equivalent to a bit device.
• Word device : This refers to data where a word unit (1 word = 16 bits)
contains the meaning. A holding register is equivalent to a word device.

 MODBUS Communication area on the subsystem is organized mainly into :

• INPUT COIL AREA (00000 – 09999)


• INPUT RELAY AREA (10000 – 19999)
• INPUT REGISTER AREA (30001 – 39999)
• HOLDING REGISTER AREA (40001 - 49999)

YOKOGAWA INDIA LIMITED Page.3


Subsystem Configuration -Modbus
Modbus Device & Address :
 Modbus protocol function codes, which are supported by Centum CS3000.
 MODBUS PLC, addresses have the following structure
<Function code> + <device type> + <address of the device>
Device Address MODBUS Protocol Function Code
(HEX)
Input Register Functio MODBUS PLC Address in Read Write
Code Device MODBUS
PLC Device
A 0F
COIL 0 01
B XXXXX 05
INPUT RELAY A 1 XXXXX 02 Not Applicable
INPUT REGISTER A 3 XXXXX 04 Not Applicable

HOLDING A 10
REGISTER
4 03
B XXXXX 06

 Modbus function code details:

YOKOGAWA INDIA LIMITED Page.4


Subsystem Configuration -Modbus

Function code:
A:
Read: Read a packet of data designated on the Communication I/O Builder in word
units.
Write: Write a packet of data designated on the Communication I/O Builder. With
readback.
B:
Read: Read a packet of data designated on the Communication I/O Builder in word
units.
Write: Only write the changed single bit device or single word device to the
subsystem. With readback.

Readback function:
When there is read back, FCS reads the status of the devices designated in the
Communication I/O Builder back, then compare them with those stored in the I/O
image of FCS. The communication packet to write to the designated devices of
Modbus PLC is sent when discrepancy is detected.

YOKOGAWA INDIA LIMITED Page.5


Subsystem Configuration -Modbus
Modbus Data :
 Define the type of data to be acquired from/written to the connected
subsystem.
 Data Type contains the following options; the data types can be selected
vary with the subsystem used.
• Input (16-Bit Signed)
• Input (32-Bit Signed)
• Input (16-Bit Unsigned)
• Input (32-Bit Unsigned)
• Input (32-Bit Floating)
• Output (16-Bit Signed)
• Output (32-Bit Signed)
• Output (16-Bit Unsigned)
• Output (32-Bit Unsigned)
• Output (32-Bit Floating)
• Input (Discrete)
• Output (Discrete)

YOKOGAWA INDIA LIMITED Page.6


Subsystem Configuration -Modbus
Communication Module configuration :

Select serial
communication

Select
Communication
module

Select for
Redundant card

YOKOGAWA INDIA LIMITED Page.7


Subsystem Configuration -Modbus
Communication Module configuration :

Select Modbus

YOKOGAWA INDIA LIMITED Page.8


Subsystem Configuration -Modbus
Communication Module configuration :

Select Baud rate

Transmission
Select Parity bit request

Select stop bit


Data set ready

Reception carrier
detection

Connection method
of the ALR121 (2-

wire/4-wire) . All items are


explained in the
next slide.

YOKOGAWA INDIA LIMITED Page.9


Subsystem Configuration -Modbus
Communication Module Set items :
 Communication Error Process set items on communication card
 Response Timeout :
• This item sets the time for detecting no response from the Subsystem.
• The time is set in units of seconds.
• The recommended setting is 4.
 Number of Retries Upon Response Timeout :
• This item sets the number of retries performed when a communication
error occurs.
• The recommended setting is 1.
 Interval of Connection Retries :
• This item sets the time interval between checking for communication
recovery with the station that has generated a communication error.
• The time interval is set in units of seconds.
• The recommended setting is 30.
 Inter-Character Time-Out Value :
• This item specifies the time for monitoring the interval between
characters during reception.
• An error occurs if the set time is exceeded.
• The time is set in units of ms.
• The recommended setting is 10.

YOKOGAWA INDIA LIMITED Page.10


Subsystem Configuration -Modbus
Modbus I/O mapping :
 To communicate with subsystems, first assign a storage area for
communication data for each subsystem connected.

YOKOGAWA INDIA LIMITED Page.11


Subsystem Configuration -Modbus
Modbus I/O mapping :
 Setting Items on Communication I/O Builder

 Element- With respect to the address of the subsystem data buffer, the
element numbers are displayed on Communication I/O Builder. The
element number is not for set, only for display
 Buffer- This sets the buffer for the communicated data. This is a required
setting item of the Communication I/O Builder

YOKOGAWA INDIA LIMITED Page.12


Subsystem Configuration -Modbus
Modbus I/O mapping :
 Program Name- Set the unit number, slot number and MODBUS as program
name in the following format:
• Kt-n-sProgramName
• K : FIO identifier
• t : System number (Specify 1.)
• n : Node number
• s : Slot number
• Program Name : MODBUS
 Size -This item sets the data size (data length) from the head address set
in “Device & Address.”
• For MODBUS PLC the setting ranges are limited as follows
• For analog input and analog output: 1 to 124 words
• For discrete input and discrete output: 1 to 8 words
 Station-This sets the station number of the MODBUS PLC. The station
numbers that can be set are 1 to 255.

YOKOGAWA INDIA LIMITED Page.13


Subsystem Configuration -Modbus
Modbus I/O mapping :
 Device & Address - Set the head address of MODBUS PLC data
 Data Type -This sets data type of the subsystem data
 Reverse- This sets whether or not to make the bit arrangement in FCS in
reverse order of the subsystem data. The following settings can be
selected:
• Bits [ Yes/ No]

 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.
• The default value Scan setting is 1 Second.
 Service Comment -A text comment can be set.
 Label- The name of the function block I/O terminal can be set as a user-
defined label.
YOKOGAWA INDIA LIMITED Page.14
Subsystem Configuration -Modbus
Modbus I/O map Generation :
 Accessing subsystem data varies according to the type of communication
module used

YOKOGAWA INDIA LIMITED Page.15


Subsystem Configuration -Modbus
Modbus I/O map Generation :
 Correspondence between a %WW element (16-bit data) and %WB
elements (1-bit data)

YOKOGAWA INDIA LIMITED Page.16


Subsystem Configuration -Modbus
Scaling :
The Linear Transformation of the analog data (PV) into the form of an integer
data within the specific integer range (Modbus Range).

Why Scaling is required?

YOKOGAWA INDIA LIMITED Page.17


Subsystem Configuration -Modbus
Scaling :
Accessing subsystem analog input data : Data conversion is necessary at DCS for
representation on the engineering scale
• PV(DCS) = PV (Subsystem) × GAIN + BIAS

TAG_1
PVI

IN

%WW0001

Subsystem
[Analog Input]
16 Bit data

YOKOGAWA INDIA LIMITED Page.18


Subsystem Configuration -Modbus

 The Gain and Bias can be calculated using the formula

Gain =

Bias =

where Rmax = Maximum Instrument Scale Value


Rmin = Minimum Instrument Scale Value
Pmax = Maximum Modbus Range
Pmin = Minimum Modbus Range

YOKOGAWA INDIA LIMITED Page.19


Subsystem Configuration -Modbus
Modbus communication Architecture :
HIS

Redundant V-net

Field Control Station

TRICONEX Tricon TRICONEX Tricon

ALR121

Modbus-RTU
Dual Redundant Link

YOKOGAWA INDIA LIMITED Page.20


Subsystem Configuration -Modbus
4-Wire Modbus configuration RS485 :
YOKOGAWA TRICONEX TRICONEX
CS3000 SYSTEM TRICON SYSTEM TRICON SYSTEM

ALR121 TB95 TB95


LPT2/RPT2
LPT2/RPT2
11
TX+ RX+
12
TX- RX-
13
RX+ TX+
R1
14
RX- TX-
15
SG SG

FG

TX+ Send Data


R1:Termination Resistor

TX- Send Data


RX+ Receive Data
RX- Receive Data
SG Signal Ground
FG Frame Ground

YOKOGAWA INDIA LIMITED Page.21


Subsystem Configuration -Modbus
2-Wire Modbus configuration RS485 :
YOKOGAWA TRICONEX TRICONEX
CS3000 SYSTEM TRICON SYSTEM TRICON SYSTEM

ALR121 TB95 TB95


LPT2/RPT2
LPT2/RPT2

TX+ 12 RX-

RX+ 14 TX-

TX- 11 RX+

RX- TX+
13

SG SG
15
FG

TX+ Send Data


R1:Termination Resistor

TX- Send Data


RX+ Receive Data
RX- Receive Data
SG Signal Ground
FG Frame Ground

YOKOGAWA INDIA LIMITED Page.22


Subsystem Configuration -Modbus
2-Wire Modbus configuration RS232C :

TX Send Data
RX Receive Data
GND Signal Ground

YOKOGAWA INDIA LIMITED Page.23


Subsystem Configuration -Modbus
Modbus communication module status :
 The ALR121 are serial communication modules that are installed to the
node unit for ESB bus is 10 pole terminal block for two RS-422 or RS-485
ports (5 poles/port)
 LED Display Indications:
●STATUS :
This LED turns on (green colour) when the self diagnosis has
been completed normally and the hardware is ready, otherwise it
is turned off.
ACT :
When the module is operating normal, LED is ON (green colour)
otherwise it is turned off.
DX :
This LED turns on(green colour) when module is configured for
dual-redundant operation.
SND-1 & 2:
This LED turns on (green colour)during data transmission,
otherwise it is turned off. The status is as per the Communication
port basis.
RCV-1 & 2:
This LED turns on (green colour) during data reception, otherwise
it is turned off. The status is as per the Communication port basis.
YOKOGAWA INDIA LIMITED Page.24
Subsystem Configuration -Modbus

Tips for establishing the communication:


 Check for communication cable pin configuration.
 Check for the communication parameters are set properly in
DCS and subsystem side like Baud rate, Parity, 2wire/4wire,
Station no (Slave address), IP address (Ethernet) and
communication Error Process set items.
 Appropriate program name has to be selected in the WW
builder for the respective subsystem.
 No Mismatch in the Function code, Data type and Modbus
address.
 Ensure spare words, which are allocated between each packet
of data is not more which may cause error in communication.

YOKOGAWA INDIA LIMITED Page.25


Subsystem Configuration -Modbus

Tips for Modbus IO Mapping:


 Check for required information in available in the database like
Tag name, analog PV range, Modbus range, Modbus address,
AI/AO/DI/DO, Slave address.
 Calculate the number for words including analog and digital
(<1000) for estimating the buffer size and packet data size.
 Check for the consecutive address is available, which makes
mapping easier. If the address are not consecutive then we
have to take in care in allocating right WW address.
 While allocating the packet data size in the WW builder,
ensure that number of words not crossing 124 for analog and
8 for digital.
 Leave some spare words (10-20%) between each packet of
data for future changes.
 If all the 16 bits are not used in the discrete input data, it is
better not configure the unused bits in WB builder, as the WB
builder can accommodate only 1000 tags.

YOKOGAWA INDIA LIMITED Page.26


Subsystem Configuration -Modbus

Error Codes:
 A3B0 : No Response
 A3B1 : Inappropriate station number
 A3B5 : Too many communication processing points
 A3B6 : Write to a read-only device occurred
 A3C3 : Function code error
 A3C2 : Address error

YOKOGAWA INDIA LIMITED Page.27


Thank you

YOKOGAWA INDIA LIMITED Page.28

Você também pode gostar