Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
18 views

Modbus TCP

The document provides instructions for configuring an OPC server to communicate with Modbus TCP devices. It describes defining devices, folders, and data items in a hierarchical address space tree. Device definition requires settings like the name, IP address, port, and timeouts. Folders and data items organize tags and allow hierarchical browsing of registers and coils from Modbus devices. Optimization parameters configure how the server reads registers from devices in the most efficient manner.

Uploaded by

Jorge Valdivia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Modbus TCP

The document provides instructions for configuring an OPC server to communicate with Modbus TCP devices. It describes defining devices, folders, and data items in a hierarchical address space tree. Device definition requires settings like the name, IP address, port, and timeouts. Folders and data items organize tags and allow hierarchical browsing of registers and coils from Modbus devices. Optimization parameters configure how the server reads registers from devices in the most efficient manner.

Uploaded by

Jorge Valdivia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

User Manual

OPC Server
ModbusTCP
Configuration Manual

UMHMIMo2EA
1st Edition, 08/2010
Modbus TCP OPC Server Table of Contents

Table of Contents
Chapter 1 Hardware Settings............................................................................................3
1-1 Data Type Description ............................................................................................4
1-2 Signal Type of Modbus PLC ...................................................................................4
1-3 Cable Diagram........................................................................................................5
Chapter 2 Editing Configuration.......................................................................................7
2-1 Modbus Communication Setting.............................................................................8
2-1-1 Device Define...............................................................................................9
2-1-2 Folder Define..............................................................................................12
2-1-3 Data Item Define ........................................................................................14

2
Chapter 1 Hardware Settings
Modbus TCP OPC Server Hardware Settings

1-1 Data Type Description

OPC Server Data Type Description


Bool Single bit
Int Signed 16 bit value
Dint Signed 32 bit value
UINT Unsigned 16 bit value
UDINT Unsigned 32 bit value
Real 32 bit floating point value
String String type with “Null” character
at the end
BCD 2 Byte (BCD)
LBCD 4 Byte (BCD)

1-2 Signal Type of Modbus PLC

Signal types Meaning Access Data type Address


DI Input Coil Read Only Bool Start from 10001
DO Output Coil Read / Write Bool Start from 00001
Bool,Real,Int,
AI Input Register Read Only Uint,Dint,Udint, Start from 30001
String、BCD、LBCD
Bool、Real,Int,
AO Output Register Read / Write Uint,Dint,Udint, Start from 40001
String、BCD、LBCD

4
Hardware Settings Modbus TCP OPC Server

1-3 Cable Diagram

The devices which use Modbus TCP communication protocol based on Ethernet
platform. General speaking, you can use the cross over Ethernet cable or HUB and easily
let the PC connect to the Modbus devices. The hardware cable diagram is as follows:

Lots of devices use Modbus TCP Protocol, but the cable diagram of each device may
differ from another.

Straight Through Crossover


Cable Cable
PLC/HMI PLC/HMI

RJ-45 RJ-45 RJ-45 RJ-45


PIN PIN PIN PIN

1 Tx+ 1 Rc+ 1 Rx+ 3 Tx+

2 Tx- 2 Rc- 2 Rc- 6 Tx-

3 Rc+ 3 Tx+ 3 Tx+ 1 Rc+

6 Rc- 6 Tx- 6 Tx- 2 Rc-

5
Modbus TCP OPC Server Hardware Settings

6
Hardware Settings Modbus TCP OPC Server

Chapter 2 Editing Configuration

7
Modbus TCP OPC Server Creating a New Configuration

2-1 Modbus Communication Setting

Sample
A device using Modbus TCP protocol and stands the slave side.

The Address Space tree control in the Configurator, shown in the figure below, sets the
properties and connection parameters for the following items:
• Devices
• Folders
• Data Items

Data items can be organized hierarchically. It is similar to organizing directories and


files on your computer's hard disk. The Modbus OPC Server offers several levels of
hierarchy. The Configurator module uses the terms “Folder” and “Data Item”. A folder can
contain additional folders and also data items. The data items are always the branches in
the tree control hierarchy.
The hierarchical structure of the folders and data items helps to organize the devices
and tags, as shown below.

8
Creating a New Configuration Modbus TCP OPC Server

2-1-1 Device Define

Every device is connected to particular port, so it logically creates the second level in
the Address Space tree. Each device is represented by its symbolic name, and is
uniquely identified by the Address value. It is impossible to have two devices with the same
address connected to one port.
Setting up a device requires configuration of its unique address, type, timeouts and
optimization parameters, as shown in the figure below.

1. Select Port Æ Edit Æ New Æ Device


2. You can also press [Ctrl+D] as the shortcut to create a Device.

9
Modbus TCP OPC Server Creating a New Configuration

Device define operation platform

Item Description
Specify a name of the new device. The special
symbols such as ‘+’、’/’、’*、’-‘ are not allowed.
The number must match the network IP address setting
of the device.
The port connected with the device. (Usually, the
number is 502 in Modbus TCP)
The Unit Identifier must match the station number.
There is a group of six predefined standard device types
enhanced with Other (Any) and Custom options. A
device with the most limited parameters and the lowest
performance is called the Other (Any) alternative.
Timeout parameters (separately for reading and
writing data) specify the period of time (in
milliseconds) the server will wait for a response
from the device:
Read/Write: Amount of time (in
milliseconds) the OPC server will wait for a
response (read/write) from the device.
Timeouts to Suspend: The number of

10
Creating a New Configuration Modbus TCP OPC Server

consecutive read/write attempts that


timeout before the OPC server will suspend
communication with the device.
Suspend Period: Amount of time the OPC
server will wait before attempting to
reconnect to the device. Note: The
Suspend Period setting can be decreased
to reconnect faster with a device that has
been restarted, but this will cause the OPC
server to generate more network traffic
while a device is down.
Delay: Amount of time (in milliseconds)
between read attempts.
The server tries to optimize the communication
with the devices by requesting as much data as
possible in one message. Consecutive registers
are merged together into one request for
efficiency. The server also can read registers
that are not really requested, if this allows it to
join two blocks of requested registers. The
numbers entered under Optimizations specify
the maximum block length of adjacent unused
data.
The Device Parameters directory contains the
list of custom device types. Device parameters
influence the behavior and performance of the
server for the device.
All of the groups and data items under this
device are in the simulation mode. Simulation
function will simulate the real communication
situation between devices and OPC Server.
Please see
“UMHMIOPCEA.pdf”.

Apply: Saves all changes specified in the


properties dialog box.
Reset: Undo the setting configuration
Add New: Add the new Device

11
Modbus TCP OPC Server Creating a New Configuration

2-1-2 Folder Define

Folders can be used to group items logically. You can configure as many folders as
required. Each folder can even have subfolders. The Modbus OPC Server supports up to
three folder levels. The use of folders is not required.
If desirable, the configuration could just contain data items without any folders. But most
likely this will only be useful if the application does not demand too many persistent tags.

Select [ Device ] or [ Folder ] on the Tree View. Press the right key of the mouse and select
[New ]Æ [Fold]

12
Creating a New Configuration Modbus TCP OPC Server

Folder define Operation Platform

Item Description
Specify a name of the new folder. The
special symbols such as ‘+’、/、*、- are not
allowed.
All of the data items under this group are in
the simulation mode. Simulation function will
simulate the real communication situation
between devices and OPC Server.
Please see
“UMHMIOPCEA.pdf”.

Apply: Saves all changes specified in the


properties dialog box.
Reset: Undo the setting configuration
Add New: Add the new Folder

13
Modbus TCP OPC Server Creating a New Configuration

2-1-3 Data Item Define

A Data Item represents a register in the device or a range of registers. A symbolic


name and description is associated with the data item. An OPC client can obtain the data
item description.
The actual OPC item name (tag) is compounded from the Address Space root, the names
of the folder and its subfolders, and the name of the data item. Data items can be located
in any folder, even in the root of the address space.
The steps to create the data item (tag) are as below.
Select [ Device ] or [ Folder ], Press the right button of the mouse, it will show you the
Popup menu. Then select [New] Æ [Data Item]

14
Creating a New Configuration Modbus TCP OPC Server

Then define the data Items, the picture is as below:

Item Description
Specify a name of the new data item. The special
symbols such as ‘+’、’/’、’*、’-‘ are not allowed.
Description of Data Item
Register/ Replay Type: Output Coil, Input Coil, Input
Register and Output Register.
Look for more information in Chapter 1
Data Type:
Output Coil、Input Coil Æ Bool
Input Register、Output Register ÆInt、UINT
String Æ When selecting String type, you must specify
the data length
From the starting address to access the data by block,
not point to point to access the data. It could speed up
the communication speed. You do not have to define a
lot of items to get the values. Using [ Vector ] function
will let OPC server put the values into the arrays.
This value specifies the data item address (register
number) in the device data space.
Note: The starting address of Modbus OPC Server

15
Modbus TCP OPC Server Creating a New Configuration

starts with 1. If the starting address of the equipment is


0, then add 1 to be the correct address
If the data type is UINT, you can choose the number of
bits and analyze the value and put into this item. Bit#
means the starting Bit No. Count means the constant
Bits number.
To get the data value converted according to a
prescribed form, choose one of the predefined or
user-defined conversions.
Simulation function will simulate the real communication
situation between devices and OPC Server. Executing
“Monitor View” or press F12 as the shortcut, the “Tag
Value” will keep changing for testing the connecting
situation.
To test the client functionality, choose a Simulation
Signal from the Signal drop-down list and check the
Simulate check box. All levels in the Address Space
(port, device, folder, data item) support the process of
simulation (Simulate check box). The parent list in the
tree is superior; it has a higher priority when deciding to
simulate the data item or not. In other words, a data
item is simulated, if it itself has a simulation selected, or
if any of its parents has the Simulate check box
checked. (It may be simulated even if its Simulate check
box stays unchecked)
If checked, the data item will offer constant parameter
value, because Manual setting is of the highest priority.
The changes in the configuration take effect only when
the server reloads the configuration (on startup).
Apply: Saves all changes specified in the properties
dialog box.
Reset: Undo the setting configuration
Add New: Add the new Data Item

16

You might also like