Modbus Utility

Modbus Utility Document
Version 1.0.3 [May,05,2005]

What is Modbus ?

What is SCADA ?

Quick Configuration

Please refer to the Quick Configuration guide to help you quickly configure the I-7188E -MTCP and let it can begin to work soon.

Software Linking to Modbus/TCP controller

Most SCADA and HMI software provides documents showing how to link to Modbus/TCP devices. We have recorded set-up and operation documents (including pictures) for some of the more popular SCADA software. You can refer these documents to understand fully at a glance.

Software | Document
Citect | Linking\Citect.pdf
iFix | Linking\iFix.pdf
Indusoft | Linking\Indusoft.pdf
SteepleChase VLC | Linking\VLC.pdf

Features of the I-7188E -MTCP

The Modbus/TCP default firmware lets an I-7188E controller become not only a procotol converter but also has other functions. Besides linking to Modbus/RTU devices, it can also link to other non-Modbus/RTU devcies. Please refer to Features of default Modbus firmware for more detail information.

Designing custom I-7188E -MTCP

When you get an I-7188E -MTCPcontroller, it already has the default Modbus firmware installed in the Flash memory. The firmware allows an I-7188E become a single-Modbus/TCP to multi-Modbus/RTU converter.

If the default firmware doesn't suit your requirments, we also provide a Modbus SDK (software develop kit) allowing you to add addinational functions to permit the I-7188E -MTCP become a Modbus/TCP controller that can operate separately from a PC or HMI.

To modify the firmware, please refer to
CD:\Napdos\Modbus\Demo\7188e\Bc\
or download the lastest files from our FTP site
ftp://ftp.icpdas.com/pub/cd/8000cd/napdos/modbus/

For more programming information, please refer to
CD:\Napdos\7188e\document\7188Ess.pdf

Typical applications

An I-7188E -MTCP has may functions, we list several typical applications. Please refer to this list to correctly adjust the the settings of the I-7188E -MTCP.


Quick Configuration

When you first connect/install an I-7188E -MTCP, you need to adjust each setting to suit your requirements. You only need to do this once.

Step 1. Configure the network settings (IP, Mask, Gateway) for the I-7188E -MTCP controllers.

To Use the Configuration Wizard, you must first install PCDiag.
( CDROM:\Napdos\7188e\TCP\PCDiag\Setup\Setup.exe )

Step 2. Connect to an I-7188E -MTCP controller via Ethernet.

Replace the default IP address with the IP address that you used in step 1. then click [Connect]. After connecting to the I-7188E -MTCP, the Modbus Utility will give detailed information regarding system settings, COM port settings, etc.

Step 3. Adjust system settings.

____

The Modbus firmware (MBTCP_7E.exe) allows an I-7188E become a single-Modbus/TCP to multi-Modbus/RTU converter. The Modbus station number is a very important parameter. It is used to recognize different Modbus stations. But the I-7188E -MTCP does not have any hardware design such as dip-switch or jump allowing you to set the Modbus station number (or called NetID). You must use the Modbus Utility to set some parameters regarding to Modbus station number. System settings include follows:

Net ID (Default = 1):
if the Modbus station number in a Modbus/TCP request (from PC or HMI) matches the Net ID, the request is passed to the Modbus kernel. Then Modbus kernel will then respond and send the internal registers to the Modbus/TCP client ( PC or HMI).

Default Modbus firmware only provides the following information:

AI[0]=0x7188
AO[0]=0x1234
DI[1]=1
DO[0]=1

The content of all other registers is zero.

When you use the Modbus SDK to develop your custom Modbus firmware, you can assign greater information to user-defined internel registers of the I-7188E -MTCP. Therefore the Modbus/TCP client can send a request (the Modbus station number must equal the Net ID) to obtain the information.

Stations per COM port (Default = 10):
This value is used to decide how many Modbus/RTU stations can one I-7188E COM port control. That also means the value can decide which COM the Modbus/TCP request will be passed to.

When click the "Set" button, the Utility shows the the gateway mapping.

Step 4. Adjust the COM port settings

Enable Mode (Default = Modbus/RTU):
I-7188E COM ports can be configured as follows:

  1. VxComm (Virtual COM):
    Enable VxComm. Remote application program can use Virtual COM (need to install the VxComm Driver) or connect to TCP/IP port 10000 + n to access the 7188E COM port via Ethernet. At VxComm mode, the COM port can link to any serial device.
  2. Modbus/RTU Gateway:
    Enable protocol gateway function to convert Modbus/TCP to Modbus/RTU. At Modbus/RTU mode, the COM port can only link to Modbus/RTU slave devices.
  3. Programming:
    Disable communication of the COM port. Users must use C language under Xserver structure to develop a program for the 7188E to access the COM port. At Programming mode, the COM port can link to any serial device.
  4. UpLink:
    Enable the COM port to be a Modbus/RTU slave port.

  5. Debug port
    The Modbus kernel prints out some messages
    while communicating with Modbus clients or
    masters.
    The messages includes
    (0) receives Modbus request
    response to Modbus clients or masters
    (1) by passes Modbus request to COM port
    (2) Send Modbus request to COM port
    (3) Check Modbus response from COM port
    (4) Send Modbus response to Modbus client or     masters

Data format of Modbus/RTU
There are several kinds of data format used in the Modbus/RTU protocol, you must change it to suit the Modbus/RTU devices that connect to the COM port.

8 data bits, none parity, 1 stop bits
8 data bits, none parity, 2 stop bits
8 data bits, odd parity, 1 stop bits
8 data bits, even parity, 1 stop bits (Default)

Note: When an I-7188E -MTCP receives a Modbus/TCP request that not to its inerternal registers, it first decides which COM port to send the request. Modbus/RTU must be enabled for this COM port , otherwise the request will be discarded.

Timeout (Default = 200 ms ):
After finishing data transmission, the system begins to count time, if timeout expires, the system stop receiving responses.

Step 5. Save all settings

After clicking [Save], the Modbus Utility generates one record file (default file is called Modbus_7E.ini). You can run the Modbus Utility to load the record file to review all settings of specific I-7188E -MTCP. If you forget to sotre these settings, you can still obtain the information for the I-7188E -MTCP via Ethernet.

All configuration requirements are now complete and you can begin to use the I-7188E -MTCP.


Default Firmware Features

Features of default Modbus firmware

When you buy an I-7188E -MTCP controller, it already has the default Modbus firmware installed in Flash memory. The default firmware has the follows features:

  • Converts single Modbus/TCP to multi Modbus/RTU

    • The I-7188E -MTCP is a Modbus/TCP gateway. It can easily upgrade many Modbus/RTU devices to have Ethernet communication ability.

  • Supports VxComm technique for every COM port of controllers

    If serial devices don't support Modbus/RTU, you can still access these devices. But need to install VxComm driver on host PCs and assign a COM port number to link to the remote COM port (of I-7188E -MTCP). After that, serial clients can access these remote serial devices via the Ethernet by using the standard RS-232 functions.

  • Allowed multi-client (or master) access simultaneously

    • Different I-7188E -MTCP controller supports diffent client numbers connect to. Please refer to our FAQ on web for more detail.

    http://www.icpdas.com/faq/7188e/ech003.htm

  • Firmware modifiable

    We provide the Modbus SDK allowing users to develop their custom Modbus firmware.

Belows are the structure and the flow chart of the default Modbus firmware.


Modbus SDK ( in C language )

If the default firmware doesn't totally suit your requirments. You can use Modbus SDK to modify the default firmware to add extra functions. The Modbus SDK has below features:

  • Supports extra user-defined command protocol (TCP/IP)

    • Modbus/TCP protocol supports 2 basic data format (bit and 2-byte integer). It means if clients (or called masters) don't support Modbus/TCP or you need other format data (for example: string of floating value), I-7188Es (with default firmware) cannot communicate with them. Using this feature, you can develop your special command protocol to transfer any format of data.

  • Register based programming method (easy to use)

    • Modbus library supports 4 internal register tables (iMemory_AI, iMemory_AO, iMemory_DI, iMemory_DO), you can use these to store specific information. When Modbus/TCP clients request to I-7188E, Modbus kernel will response information from these 4 tables.

  • Provides user-defined registers

    • The 4 internal register tables are all open to users. You need to assign these tables by yourself.

  • Can link to Modbus/RTU slave devices

    By using function ModbusMaster2Slave (declared in MBTCP_7E.h), Modbus/RTU devices can be easily integrated to internal registers of I-7188Es. An I-7188E polling every Modbus/RTU devices and put every necessary information to internal registers. Clients only ask the I-7188E to get all information of Modbus/RTU devices. That reduces loading of Clients.

  • Can link to non-Modbus/RTU serial devices

    • Some serial devices don't support Modbus/RTU. We provide functions to let I-7188E -MTCP access serial devices. You can put information to internal registers of it. Thus, the non-Modbus serial devices can also support Modbus/TCP.

  • Supports X boards

    You can choose one suitable Xboard to add on an I-7188EX to be on board I/Os.

  • Xserver SDK compatible

    Modbus SDK is based on Xserver SDK. To lear more programming skills, you can refer demos of Xserver. To get information of demos of Xserver, please refer to

    CD:\Napdso\7188e\TCP\Xserver\Xserver.htm

Below is structure of Modbus SDK


Application connection

Typical applications

Basic application 1: protocol converter

An I-7188E -MTCP runs a default firmware to become a single Modbus/TCP to multi-Modbus/RTU converter. You can simply use the Modbus Utility to configure the device and then set connection between SCADA , HMI software and the I-7188E.

Basic application 2: protocol converter with VxComm technique

An I-7188E -MTCP is also be able to link to serial devices that don't support Modbus/RTU. To use this function, you will need to install VxComm driver on host PCs. After installation, you will be able to access the remote COM ports via the standard serial driver.

Advanced application 1: Modbus/TCP controller

Using the Modbus SDK, users can develop their own custom Modbus firmware, allowing extra functions, integration of serial devices and a Xboard to the Modbus/TCP kernel. Thus an I-7188E can become a powerful controller.

Advanced application 2: Modbus/TCP controller with VxComm technique

When an I-7188E -MTCP links same hardware devices as Advanced application 1 link to, if any devices connectd to certain COM ports are not integrated into your custom firmware, you are still able to access the COM ports via the standard serial driver. In order to do this, you must install the VxComm driver on the host PCs.


Quick Configuration

Document reversion history

Ver. 1.0.0 [Mar,14,2003] First release.

Ver. 1.0.1 [Oct,11,2003]
Change description "Station/COM port" to "Stations per COM port" of Quick Configuration.

Ver. 1.0.2 [Nov,25,2003]
Change comment of "Enable Mode" in "Quick Configuration".
Change comment of "Timeout" in "Quick Configuration".

Ver. 1.0.3 [May,05,2005]
When COM port is set to Modbus/RTU gateway, the mapping between station number of
the Modbus/RTU device and the COM port is changed. Thus change the comment of
"Station Per COM port" in "Quick Configuration".


What is Modbus ?

何謂 Modbus ?

何謂 Modbus 通訊協定?

Modbus 是由 MODICON 公司在 1979 發展出來的一套通訊協定。它具有標準化、採開放式架構的特性，而且廣泛地被工業自動化產所使用的通訊協定。透過 Modbus，SCADA 和 HMI 軟體可以很容易地將許多串列設備整合在一起。

何謂 Modbus/TCP 通訊協定?

Modbus/TCP 是 Modbus 的一種變形。它在 1999 年被發展出來，讓 SCADA/HMI 也可以透過 Modbus/TCP 存取網路上的設備。

哪些軟體支援 Modbus 和 Modbus/TCP ?

大部分的 SCADA ( Supervisor Control And Data Acuisition ) 軟體和 HMI 都支援 Modbus 通訊協定，例如：

Citect, ICONICS, iFIX, InduSoft, Intouch, Entivity Studio, Entivity Live, Entivity VLC, Trace Mode, Wizcon, Wonderware…等等。

使用 Modbus 和 Modbus/TCP 有什麼好處?

1. 完全開放，不需授權費
2. 廣泛地被 SCADA 和 HMI 軟體支援
3. 容易使用
4. 不同的設備容易整合在一起
5. 發展系統的時程縮短，成本降低
6. 豐富的資源

Modbus 資源

http://www.modicon.com
Modbus 原創公司 MODICON 的網站

http://www.modbus.org
Modbus 社群網站

http://www.winsite.com/bin/Info?3088
免費的 Modbus (RTU/ASCII) 或是 Modbus/TCP ActiveX 元件

http://www.pmcrae.freeserve.co.uk/readregu.html
Linux 上 Modbus/RTU 通訊的範例程式碼 (C )


What is Modbus ?

What is Modbus protocol?

Modbus is a communication protocol developed by MODICON Inc. in 1979. It's a standard, truly open and the most widely used network communication protocol in industrial automation field. SCADA and HMI software can easily integrate serial devices together via Modbus protocol.

What is Modbus/TCP protocol?

Modbus/TCP protocol is a variant of Modbus protocol. It was developed in 1999 to allow Internet community access Ethernet devices.

What software supports Modbus and Modbus/TCP protocol?

Most of SCADA ( Supervisor Control And Data Acuisition ) and HMI software support Modbus. For example:
Citect, ICONICS, iFIX, InduSoft, Intouch, Entivity Studio, Entivity Live, Entivity VLC, Trace Mode, Wizcon, Wonderware... etc

What are the benefits of using Modbus and Modbus/TCP?

1. Openness, no license fees.
2. Widely supported by SCADA and HMI software
3. Easy to use
4. Easily integrate variant devices
5. Low development cost
6. Widely knowledge resource

Modbus Resource

http://www.modicon.com
Web page of original Modbus protocol inventor, MODICON Inc.

http://www.modbus.org
A community for Modbus users of Modbus users

http://www.winsite.com/bin/Info?3088
ActiveX freeware to communicate with equipments via Modbus (RTU/ASCII) or Modbus/TCP

http://www.pmcrae.freeserve.co.uk/readregu.html
Example C code for Linux Modbus/RTU communication


What is Modbus ?

何謂 SCADA ?

何謂 SCADA ?

凡是具有系統監控和資料擷取功能的軟體，都可以稱之為 SCADA (Supervisor Control And Data Acqusition) 軟體。它是架構在 PC 之上的生產自動化及控制系統。

此類型軟體的應用範圍很廣，舉凡電力系統、水利系統、石油、化工、汽車業都是其應用領域。不同領域應用，所需的功能也不儘相同，但是它們都具有以下的基本特色：

  • 圖形操作介面
  • 系統狀態動態模擬
  • 即時和歷史資
  • 料趨勢曲線顯示
  • 警報處理系統
  • 資料擷取與記錄
  • 資料分析
  • 報表輸出

SCADA 連結硬體設備

SCADA 軟體和硬體設備連結的方式，大約可歸納成三類：

  • 標準的通訊協定

    工業界常用的標準通訊協定有

    ARCNET, CAN Bus, Device Net, Lon Works, Modbus, Profibus

    SCADA 軟體和硬體設備，只要使用相同的通訊協定，兩者就可以直接溝通，不需再安裝其他額外的驅動程式。

  • 標準的資料交換介面

    工業界比較普遍的資料交換介面有

    DDE (Dynamic Data Exchange)

    OPC (OLE for Process Control)

    使用標準的資料交換介面，SCADA 軟體以間接的方式，透過DDE 和 OPC 內部的資料交換中心 (Data exchange center)，和硬體設備溝通。這種方式的優點在於：不管硬體設備是否使用使用標準的通訊協定，硬體製造商只需提供一套 DDE 或 OPC 的驅動程式，即可支援大部分的 SCADA 軟體。

  • 原生驅動程式 (Native driver)

    • 原生驅動程式是指針對某一特定硬體、目標設計的驅動程式。這種方式，優點是執行效能比使用標準的資料交換介面好，但缺點是相容性並不好，硬體製造商必須針對特定的 SCADA 軟體提供特定的驅動程式。

以上三種方式，只要使用其中任意一種，即可將 SCADA 軟體和硬體設備結合起來。其通訊的架構如下圖：

知名的 SCADA 軟體

Citect, ICONICS, iFix, InduSoft, Intouch, Entivity Studio, Entivity Live, Entivity VLC, Trace Mode, Wizcon, Wonderware, ...等等。

ICPDAS 提供的資源

  • 標準的通訊協定

Modbus/RTU 和 Modbus/TCP

ISaGRAF 嵌入式控制器

I-8417, I-8817, I-8437, I-8837, I-7188XG, I-7188EG

Modbus/TCP 嵌入式控制器

I-8431 -MTCP, I-8831 -MTCP
I-7188E -MTCP

  • 標準的資料交換介面 (免費)

    • OPC Server (NAPOPC DA Server)

    DDE Server (DCON_DDE)

  • 原生驅動程式 (Native driver) (免費)

    DLL (DCON_DLL)

    ActiveX 元件 (DCON_ActiveX)

    Labview 驅動程式 (DCON_Labview)

    InduSoft 驅動程式 (DCON_InduSoft)


What is Modbus ?

What is SCADA ?

What is SCADA ?

SCADA stands for S upervisor C ontrol A nd D ata A cqusition. It is a production automation and control system based on PCs. It is wildly used in many fields: e.g. power generation, water system, oil industry, chemistry, automobile industry. Different fields require different functions, but they all have the following features:

  • Graphic interface
  • Process simulation
  • Real time and historic trend logging
  • Alarm system
  • Data acquisition and recording
  • Data analysis
  • Report generation

SCADA software accesses to hardware devices

Methods that SCADA software uses to access to hardware devices can be easily classified into the following:

  • Standard communication protocol

    Common communication protocols used in the industrial field are:

    ARCNET, CAN Bus, Device Net, Lon Works, Modbus, Profibus

    If SCADA software and hardware devices use the same communication protocol, they can talk to each other without any extra software drivers.

  • Standard data exchange interface

    Common data exchange interfaces used in the industrial field are:

    DDE (Dynamic Data Exchange)

    OPC (OLE for Process Control)

    Using standard data exchange interfaces, SCADA software can indirectly communicate with hardware devices via DDE and OPC data exchange center. The advantage is that no matter hardware device supports standard communication protocols or not, manufacturers only need to provide one DDE or OPC driver in order to support most SCADA softwares.

  • Native driver

    • A driver that has been developed for a specific device or purpose is called "Native Driver". The advantages of using a native driver is that you can improve the execution process compared to using a standard data exchange interface. The main drawback is lack of compatibility as manufacturers need to provide specific drivers for specific SCADA softwares.

Using one of above methods, you can combine SCADA software and hardware devices. The communication structure is:

Famous SCADA software

Citect, ICONICS, iFix, InduSoft, Intouch, Entivity Studio, Entivity Live, Entivity VLC, Trace Mode, Wizcon, Wonderware, ...etc.

Resource from ICPDAS

  • Standard communication protocol

    • Modbus/RTU and Modbus/TCP

    ISaGRAF embedded controllers

    I-8417, I-8817, I-8437, I-8837, I-7188XG, I-7188EG

    Modbus/TCP embedded controllers

    I-8431 -MTCP, I-8831 -MTCP
    I-7188E -MTCP

  • Standard data exchange interface (Free)

    OPC Server (NAPOPC DA Server)

    • DDE Server (DCON_DDE)

  • Native driver (Free)

    DLL (DCON_DLL)

    ActiveX component (DCON_ActiveX)

    Bundled driver for Labview (DCON_Labview)

    Bundled driver for InduSoft (DCON_InduSoft)