Modbus Utility

何謂 Modbus ?

何謂 SCADA ?

快速設定

請參考 快速設定 ，幫助您快速地設定好 I-8000E -MTCP 的各項設定，讓它可以很快地開始工作。

類比模組的 Range Code

Modbus 協定並不提供浮點數的資料格式( 例如：+ 1.23, - 4.56, 59.12, ..., 等等)。

它只提供 2 bytes 整數型態的資料格式 (範圍: - 32768 ~ + 32767)。所以，使用類比模組時，您還需要一個公式來轉換整數和浮點數。大部分的 SCADA 軟體都有提供這類轉換的功能，轉換公式為：

fValue_Input = iValue_Input / 32767 * fMaxValue

iValue_Output = fValue_Output / fMaxValue * 32767

fValue_Input: 類比輸入模組讀到的值 (浮點數型態)
iValue_Input: 由 Modbus 協定傳回的值 (整數型態)
iValue_Output: 傳給 Modbus 協定的值 (整數型態)
fValue_Output: 類比輸出模組欲輸出的值 (浮點數型態)
fMaxValue: 類比模組最大輸出/入範圍

類比模組可以有不同的的輸出/入範圍，請參考 range code 表中詳細的資料。

Range Code for Analog Modules

軟體連結到 I-8000 Modbus/TCP 控制器

雖然大部分的 SCADA 和 HMI 軟體都有提供連結到 Modbus/TCP 設備的說明文件，但是我們還是把其中幾個軟體的操作步驟的細節和畫面記錄下來，讓您一目了然。

軟體名稱 | 文件
Citect | Linking\Citect.pdf
iFix | Linking\iFix.pdf
Indusoft | Linking\Indusoft.pdf
SteepleChase VLC | Linking\VLC.pdf

I-8000E -MTCP 的特色

I-8000E -MTCP 的預設程式，除了提供連結到 I/O 的功能，還有其他的功能。除了一般的 Modbus/RTU 設備之外，也可以連接其他非 Modbus/RTU 的串列設備。請參考 預設 Modbus 程式的特色 中的詳細說明。

設計特殊的 I-8000E -MTCP 程式

I-8000E -MTCP 出貨時，記憶體裡面已經安裝一個預設的 Modbus 程式。可以使 I-8000E 成為一個支援 Modbus/TCP 的 I/O 設備。

如果，預設的 Modbus 程式無法完全符合您的需求，我們提供 Modbus 的 軟體開發工具 (SDK) ，讓您可以自行修改程式，增加額外、特殊的功能，使 I-8000E -MTCP 變成一個不需要靠 PC 也可以獨立工作的 Modbus/TCP 控制器。

欲修改 Modbus 程式增加額外、特殊的功能，請參考光碟片裡的範例程式
CD:\Napdos\Modbus\Demo\8000e\Bc\
或者從我們的 FTP 站下載最新的資料
ftp://ftp.icpdas.com/pub/cd/8000cd/napdos/modbus/

關於更多開發 I-8000E 程式的技巧，請參考下面的文件
CD:\Napdos\843x883x\document\8000Ess.pdf

典型的應用

I-8000E -MTCP 的功能很多，可以區分成幾個比較典型的應用，請參考這些應用類型來調整 I-8000E -MTCP 的設定。


Quick Configuration

快速設定

當您第一次安裝 I-8000E -MTCP 時，您必須將每一項設定調整成符合您的需求。這個設定的動作只要做一次即可。

Step 1. 設定 I-8000E -MTCP 的網路設定值 (IP, Mask, Gateway)

您必須先安裝 PCDiag，才能使用 Configure Wizard
( CDROM:\Napdos\7188e\TCP\PCDiag\Setup\Setup.exe )

Step 2. 透過網路連結到 I-8000E -MTCP

將預設的 IP 值更改成在 Step 1 中設定給 I-8000E -MTCP 的 IP 值，按 [Connect] 連結上 I-8000E -MTCP 之後，Modbus Utility 就可以讀出關於 I-8000E -MTCP 的重要資訊 (例如：系統設定，I/O 模組設定…等等 )。

Step 3. 調整類比模組

部份類比模組 (I-8017H, I-8024) 可以將每一個 channel 設成不同的輸出/入 的範圍。您可以在畫面的右手邊的 Range Code 區域設定這項屬性。

Step 4. 將所有設定儲存起來

按完工具列上的 [Save] 之後，Modbus Utility 會在 PC 上產生一個記錄檔 (預設檔名是 Modbus_8E.ini 和 Modbus_8E.txt)。

有兩種方式可在沒連接上 I-8000E -MTCP 時，以離線 (off-line) 的方式，將記錄檔叫出來，再次檢閱特定控制器的設定值。

  1. 使用 Modbus Utility：載入 *.ini
  2. 使用文字編輯器：載入*.txt

假如您忘了將 I-8000E -MTCP 的設定值儲存起來，還是可以透過網路，連接上 I-8000E -MTCP，將其設定值讀出來。

到此為止，I-8000E 的所有設定已經完成。您已經可以開始將它當成一個 Modbus/TCP I/O 設備來使用了。


Range Code for Analog Modules

Update: 2006/06/14 by Kevin

Type Selection
Module | Available Type
All DI, DO, DIO modules | DIO
I-8080 | Counter / Frequency
I-7013, I-7033, I-87013, I-87015 | RTD Input
I-8017H | V or Current Input
I-7017, I-87017 | mV, V or Current Input
I-7011, I-7018, I-87018 | mV, V or Current Input Thermocouple Input
I-7021 | Analog Output
I-7022 | Analog Output
I-7024, I-87024 | Analog Output
I-8024 | Analog Output

Type 40 (for all DI, DO, DIO modules)
Range Code (Hex) | Data Format | Max value | Min value
40 | Input Range | N/A | N/A
 | Decimal unit | N/A | N/A
 | 2's Complement HEX unit | N/A | N/A

Type 80 (for Counter/Frequency modules)
Range Code (Hex) | Data Format | Max value | Min value
80 | Mode 0 : Pulse/Direction Counter | +2147483647 | -2147483648
 | Decimal unit | +2147483648 | -2147483648
 | 2's Complement HEX unit | 7FFFFFFF | 80000000
 | Mode 1:Up/Down Counter | +2147483647 | -2147483648
 | Decimal unit | +2147483648 | -2147483648
 | 2's Complement HEX unit | 7FFFFFFF | 80000000
 | Mode 2 : Frequency | 450000 | 0
 | Decimal unit | 450000 | 0
 | 2's Complement HEX unit | 6DDD0 | 00000000
 | Mode 3 : Up Counter | +4294967295 | 0
 | Decimal unit | +4294967295 | 0
 | 2's Complement HEX unit | FFFFFFFF | 00000000

Type 00 to 06 Definition (for I-7011, I-7018, I-87018)
Range Code (Hex) | Data Format | Max value | Min value
00 | Input Range | -15.0 mV | -15.0 mV
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
01 | Input Range | +50.0 mV | -50.0 mV
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
02 | Input Range | +100.0 mV | -100.0 mV
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
03 | Input Range | +500.0 mV | -500.0 mV
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
04 | Input Range | +1.0 V | -1.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
05 (Default) | Input Range | +2.5V | -2.5V
 | Decimal unit | +100.00 | -100.00
 | 2's Complement HEX unit | 7FFF | 8000
06 | Input Range | +20.0 mA | -20.0 mA
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000

Type 05 to 09 Definition (for I-8017H)
Range Code (Hex) | Data Format | Max value | Min value
05 | Input Range | +2.5 V | -2.5 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
06 | Input Range | +20.0 mA | -20.0 mA
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
07 | Input Range | +1.25 V | -1.25 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
08 (Default) | Input Range | +10.0 V | -10.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
09 | Input Range | +5.0 V | -5.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000

Type 08 to 0D Definition (for I-7017, I-87017)
Range Code (Hex) | Data Format | Max value | Min value
08 (Default) | Input Range | +10.0 V | -10.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
09 | Input Range | +5.0 V | -5.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
0A | Input Range | +1.0 V | -1.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
0B | Input Range | +500.0 mV | -500.0 mV
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
0C | Input Range | +150.0 mV | -150.0 mV
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
0D | Input Range (with 125 ohms resistor) | +20.0 mA | -20.0 mA
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000

Thermocouple Type Definition (for I-7011, I-7018, I-87018)
Range Code (Hex) | Thermocouple Type | Data Format | Max Value | Min Value
0E | J Type | Input Range (Celsius) | +760.0 | -210.0
 |  | Decimal unit | +32767 | -9054
 |  | 2's Complement HEX unit | 7FFF | DCA2
0F | K Type | Input Range (Celsius) | +1372.0 | -270.0
 |  | Engineer Unit | +32767 | -6448
 |  | 2's Complement HEX | 7FFF | E6D0
10 | T Type | Input Range (Celsius) | +400.0 | -270.0
 |  | Decimal unit | +32767 | -22118
 |  | 2's Complement HEX unit | 7FFF | A99A
11 | E Type | Input Range (Celsius) | +1000.0 | -270.0
 |  | Decimal unit | +32767 | -8847
 |  | 2's Complement HEX unit | 7FFF | DD71
12 | R Type | Input Range (Celsius) | +1768.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
13 | S Type | Input Range (Celsius) | +1768.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
14 | B Type | Input Range (Celsius) | +1820.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
15 | N Type | Input Range (Celsius) | +1300.0 | -270.0
 |  | Decimal unit | +32767 | -6805
 |  | 2's Complement HEX unit | 7FFF | E56B
16 | C Type | Input Range (Celsius) | +2320.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
17 | L Type | Input Range (Celsius) | +800.0 | -200.0
 |  | Decimal unit | +32767 | -8192
 |  | 2's Complement HEX unit | 7FFF | E000
18 | M Type | Input Range (Celsius) | +100.0 | -200.0
 |  | Decimal unit | +16384 | -32768
 |  | 2's Complement HEX unit | 4000 | 8000
19 | L Type DIN43710 | Input Range (Celsius) | +900.0 | -200.0
 |  | Decimal unit | +32767 | -7281
 |  | 2's Complement HEX unit | 7FFF | E38F

RTD Type Definition (for I-7013, I-7033, I-87013)
Range Code (Hex) | RTD Type | Data Format | Max Value | Min Value
20 (Default) | Platinum 100 a = 0.00385 | Input Range (Celsius) | +100.0 | -100.0
 |  | Decimal unit | +32767 | -32768
 |  | 2's Complement HEX unit | 7FFF | 8000
21 | Platinum 100 a = 0.00385 | Input Range (Celsius) | +100.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
22 | Platinum 100 a = 0.00385 | Input Range (Celsius) | +200.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
23 | Platinum 100 a = 0.00385 | Input Range (Celsius) | +600.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
24 | Platinum 100 a = 0.003916 | Input Range (Celsius) | +100.0 | -100.0
 |  | Decimal unit | +32767 | -32768
 |  | 2's Complement HEX unit | 7FFF | 8000
25 | Platinum 100 a = 0.003916 | Input Range (Celsius) | +100.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
26 | Platinum 100 a = 0.003916 | Input Range (Celsius) | +200.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
27 | Platinum 100 a = 0.003916 | Input Range (Celsius) | +600.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
28 | Nickel 120 | Input Range (Celsius) | +100.0 | -80.0
 |  | Decimal unit | +32767 | -26214
 |  | 2's Complement HEX unit | 7FFF | 999A
29 | Nickel 120 | Input Range (Celsius) | +100.0 | +0.0
 |  | Decimal unit | +32767 | +0
 |  | 2's Complement HEX unit | 7FFF | 0000
2A | Platinum 1000 a = 0.00385 | Input Range (Celsius) | +600.0 | -200.0
 |  | Decimal unit | +32767 | -10922
 |  | 2's Complement HEX unit | 7FFF | D556

Analog Output Type Definition (for I-7021)
Range Code (Hex) | Data Format | Max Value | Min Value
30 | Output Range | +20.0 mA | +0.0 mA
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
31 | Output Range | +20.0 mA | +4.0 mA
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
32 (Default) | Output Range | +10.0 V | +0.0 V
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000

Analog Output Type Definition (for I-7022)
Range Type (Hex) | Data Format | Max Value | Min Value
0 (3F,0) | Output Range | +20.0 mA | +0.0 mA
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
1 (3F,1) | Output Range | +20.0 mA | +4.0 mA
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
2 (3F,1) (Default) | Output Range | +10.0 V | +0.0 V
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000

Analog Output Type Definition (for I7024, I-87024)
Range Code (Hex) | Data Format | Max Value | Min Value
30 | Output Range | +20.0 mA | +0.0 mA
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
31 | Output Range | +20.0 mA | +4.0 mA
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
32 (Default) | Output Range | +10.0 V | +0.0 V
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
33 | Output Range | +10.0 V | -10.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000
34 | Output Range | +5.0 V | +0.0 V
 | Decimal unit | +32767 | 0
 | 2's Complement HEX unit | 7FFF | 0000
35 | Output Range | +5.0 V | -5.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000

Analog Output Type Definition (for I-8024)
Range Code (Hex) | Data Format | Max Value | Min Value
30 | Output Range | +20.0 mA | +0.0 mA
 | Decimal unit | +32767 | +0
 | 2's Complement HEX unit | 7FFF | 0000
33 (Default) | Output Range | +10.0 V | -10.0 V
 | Decimal unit | +32767 | -32768
 | 2's Complement HEX unit | 7FFF | 8000


無標題文件

Support modules (8000 series)
Name | Date | Version | Note
I-8017H | 1-Sep-2002 | 1.0.0 | 8 AI (High Speed) (mA,V)
I-8024 | 1-Sep-2002 | 1.0.0 | 4 AO (mA,V)
I-8037 | 1-Sep-2002 | 1.0.0 | 16 DO
I-8040 | 1-Sep-2002 | 1.0.0 | 32 DI
I-8041 | 1-Sep-2002 | 1.0.0 | 32 DO
I-8042 | 1-Sep-2002 | 1.0.0 | 16 DI & 16 DO
I-8050 | - | - |
I-8051 | 1-Sep-2002 | 1.0.0 | 16 DI
I-8052 | 1-Sep-2002 | 1.0.0 | 8 DI
I-8053 | 1-Sep-2002 | 1.0.0 | 16 DI
I-8054 | 1-Sep-2002 | 1.0.0 | 8 DI & 8 DO
I-8055 | 1-Sep-2002 | 1.0.0 | 8 DI & 8 DO
I-8056 | 1-Sep-2002 | 1.0.0 | 16 DO
I-8057 | 1-Sep-2002 | 1.0.0 | 16 DO
I-8058 | 1-Sep-2002 | 1.0.0 | 8 DI (AC input)
I-8060 | 1-Sep-2002 | 1.0.0 | 6 DO
I-8063 | 1-Sep-2002 | 1.0.0 | 4 DI & 4 DO
I-8064 | 1-Sep-2002 | 1.0.0 | 8 DO
I-8065 | 1-Sep-2002 | 1.0.0 | 8 DO
I-8066 | 1-Sep-2002 | 1.0.0 | 8 DO
I-8068 | 1-Sep-2002 | 1.0.0 | 8 DO
I-8069 | 1-Sep-2002 | 1.0.0 | 8 DO
I-8072 | - | - | Printer & Xsocket Card
I-8074 | - | - | NvsRAM Card
I-8080 | 27-Jan-2005 | 1.3.1 | 4-channel Counter & Frequency Module
I-8081 | - | - | 4-channel Counter
I-8083 | - | - | 4-channel Frequency
I-8090 | 27-May-2003 | 1.1.4 | 3-axis Encoder Input Module
I-8091 | - | - | 2-axis Stepper/Server Module

Support modules (87K series)
Name | Date | Version | Note
I-87013 | 1-Sep-2002 | 1.0.0 | 4 AI (RTD)
I-87016 | - | - | 4 AI
I-87017 | 1-Sep-2002 | 1.0.0 | 8 AI (mA,mV,V)
I-87018 | 1-Sep-2002 | 1.0.0 | 8 AI (mA,mV,V,Thermocouple)
I-87019 | 1-Sep-2007 | 1.5.7 | 8 AI (mA,mV,V,Thermocouple)
I-87022 | 21-March-2007 | 1.5.6 | 2 AO
I-87024 | 1-Sep-2002 | 1.0.0 | 4 AO (mA, V)
I-87026 | 21-March-2007 | 1.5.6 | 2 AO
I-87051 | 1-Sep-2002 | 1.0.0 | 16 DI
I-80752 | 1-Sep-2002 | 1.0.0 | 8 DI
I-87053 | 1-Sep-2002 | 1.0.0 | 16 DI
I-87054 | 1-Sep-2002 | 1.0.0 | 8 DI & 8 DO
I-87055 | 1-Sep-2002 | 1.0.0 | 8 DI & 8 DO
I-87057 | 1-Sep-2002 | 1.0.0 | 16 DO
I-87058 | 1-Sep-2002 | 1.0.0 | 8 DI (AC input)
I-87063 | 1-Sep-2002 | 1.0.0 | 4 DI & 4 DO
I-87064 | 1-Sep-2002 | 1.0.0 | 8 DO
I-87065 | 1-Sep-2002 | 1.0.0 | 8 DO
I-87066 | 1-Sep-2002 | 1.0.0 | 8 DO
I-87068 | 1-Sep-2002 | 1.0.0 | 8 DO
I-87082 | - | - | 2-channel Counter/Frequency Module


預設 Modbus 程式的特色

當您購買一套 I-8000E -MTCP 控制器時，它已經安裝了一個預設的Modbus 程式在它的 Flash 記憶體中了。這支程式具備下面的特色：

  • 具 Mosbus/TCP 通訊協定來控制插槽上的I/O模組
  • 具 Modbus/TCP 對 Modbus/RTU 的轉換功能

    • I-7188E -MTCP 是一個 Modbus/TCP 的轉接器。它可以很輕易地將 Modbus/RTU 的設備升級到具備有網路通訊功能。

  • 控制器上的每一個串列埠都支援 VxComm 技術

    假如某一個串列設備沒有支援 Ethernet ，您還是可以透過 Ethernet 存取它。但是必須在電腦上安裝 VxComm 的驅動程式，並且分配一個串列埠號碼給遠端 I-8000E -MTCP 的串列埠。在那之後，程式就可以透過標準的 RS-232 函式經由 Ethernet 存取遠端的串列埠了。

  • 自動排列 I/O 模組的記憶体(Register) 位址

    您可以將 I/O 模組插在任意一個插槽上。Modbus 的 Firmware 會自動掃瞄所有的插槽 ，並且將 I/O 的記憶体位址排列成連續的。只要使用 Modbus Utility 連上 I-8000 -MTCP 之後，就可以知道這些 I/O 的記憶体位址的排列了。

  • 具類比/數位輸出模組的 Power On Value, Safe Value功能

    您可以利用 Mudbus Utility 來設定 I-8000E開啟電源時的輸出值(power on value)， 與I-8000E失去控制連線時的安全輸出值(safe value)。

  • 允許多個主控端 ( 或客戶端 ) 同時間存取

    • 不同的 I-8000E -MTCP 控制器支援不同數目的主控端。請參考網頁上 FAQ 的詳細說明。

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

  • 程式可以修改

    我們提供 Modbus 軟體開發工具 給客戶自行發展客制化的 Modbus 程式。

以下為預設的 Modbus 程式的架構圖


電源啟動與安全輸出

電源啟動時的輸出與安全輸出

支援的韌體

Modbus firmware "I/O Scan Lib v1.5.5" 之後開始支援 Power On Value, Safe value .

電源啟動時的輸出 (Power On Value)

Power On Value 為開機時預設的輸出數值•

安全輸出 (Safe Value)

Safe value 由看門狗(watchdog)機制啟動，看門狗在每次接收到modbus指令時會自動將計數歸零並開始計數，在計數到設定的時間(watchdog timer)之內若沒有接收到任何的modbus指令，則輸出類型的模組將輸出 Safe value，同時間 L3 的 LED 燈會閃爍告知處於安全輸出模式(Safe value)。

設定方法

AO模組請輸入 Power on value 與 safe value 後按 "Set All" 按鈕

DO模組請勾選 Power on value 與 safe value 後按 "Set" 按鈕。

WDT設定請按 [image] ，輸入Watchdog timer時間後按 "Set" 按鈕，下方訊息顯示 "Set WDT= XX OK!" 即設定完成。WDT event counts 顯示數值為啟動safe value的次數，按 "Clear" 按鈕歸零。

位址列表

Coils (0xxxx)

位址 | 長度 | 定義
0x13C | 1 | Write DO power on value to EEPROM
0x13D | 1 | Write DO safe value to EEPROM
0x13E | 1 | Write AO power on value to EEPROM
0x13F | 1 | Write AO safe value to EEPROM
0x140~0x239 | 256 (32/slot) | DO power on value
0x240~0x339 | 256(32/slot) | DO safe value

Registers(4xxxx)

Address | Length | Difinition
0x13C | 1 | CPU reset status (1=by power on, 2=by 0.8 second WDT)
0x13D | 1 | CPU reset events
0x13E | 1 | Watchdog timer(sec)
0x13F | 1 | WDT event counts
0x140~0x179 | 64 (8/slot) | AO power on value
0x180~0x1BF | 64 (8/slot) | AO safe value


Modbus 軟體開發工具 ( 使用 C 語言 )

假如預設的軟體並不是完全符合您的需求，您可以使用 Modbus 軟體發展工具 (SDK) 來修改預設的軟體，增加額外、特殊的功能。Modbus 軟體發展工具具有下列特色：

  • 支援額外的使用者自訂通訊協定(TCP/IP)

    • Modbus/TCP 支援 2 種基本的資料格式 (bit 和 2-byte 的整數型態)。這意味著假如主控端 ( 或稱為客戶端 ) 不支援 Modbus/TCP 或者您需要其他格式的資料 ( 例如：字串或是浮點數 )， I-8000E ( 執行預設程式 ) 將無法和主控端通訊。使用這項功能，您可以發展自已的特殊通訊協定來傳送任意的資料了。

  • 以Register 為基礎的程式開發方式 (容易使用)

    • Modbus 的函式庫提供 4 個內部的 register 表 (iMemory_AI, iMemory_AO, iMemory_DI, iMemory_DO)，您可以利用它們來儲存特定的資料。當 Modbus/TCP 主控端向 I-8000E -MTCP 詢問資料時，Modbus 的主程式會把這 4 個表裡的資料回應給主控端。

  • 提供使用者定義的 registers

    • 這 4 個內部 register 的表，前半部是保留給 I/O 用的，剩下的就分配給使用者使用。您必自行分配、使用。

  • 可連結到 Modbus/RTU 設備

    使用 ModbusMaster2Slave 這個函數 (宣告在 MBTCP_8E.h), Modbus/RTU 設備可以很容易地整合到 I-8000E -MTCP 內部的記憶體。I-8000E -MTCP 輪流詢問 Modbus/RTU 設備的資料，將它們擺到內部的 registers 。這樣一來，主控端只要詢問 I-8000E -MTCP 就可以得全部的資料。主控端的負擔就可以大幅地降低。

  • 可連結到非 Modbus/RTU 設備

    • 有些串列設備並沒有支援 Modbus/RTU 。我們另外提供了函數讓 I-8000E -MTCP 可以連結到這些串列設備，讓您可以將資料擺到它內部的 Registers 。這樣一來，非 Modbus/RTU 的串列設備也可以支援 Modbus/TCP 了。

  • 和 Xserver SDK 相容

    Modbus SDK 是架構在 Xserver SDK 之上的設計。欲學習更多的程式開發技巧，也可以參考 Xserver 的範例程式。關於 Xserver 範例程式的資料請參考

    CD:\Napdso\8000\843x883x\TCP\Xserver\Xserver.htm

以下為 Modbus 軟體發展工具的架構圖


典型的應用

基本應用 1: 通訊協定轉換器

當 I-8000E -MTCP 執行預設的程式後，就會變成 Modbus/TCP 的 I/O 設備。您可以很簡單地使用 Modbus Utility 將各項設定規劃好。然後設定好SCADA 、 HMI 和 I-8000E -MTCP 之間的連線即可。

基本應用 2: 通訊協定轉換器加上 VxComm 技術

I-8000E -MTCP 也可以連接到串列設備。欲使用這個功能，您必需在 PC 上安裝 VxComm 的驅動程式。在安裝完驅動程後，您就可以使用標準的串列程式存取遠端的串列埠了。

進階應用 1: Modbus/TCP 控制器

使用 Modbus SDK (軟體開發工具)，使用者可以發展自己特殊版本的 Modbus 軟體，將額外、特殊的功能、串列設備還有 Xboard 整合到 Modbus/TCP 的核心。這樣 I-8000E 就可以成為一個功能強大的控制器。

進階應用 2: Modbus/TCP 控制器加上 VxComm 技術

當 I-8000E -MTCP 連結到和進階應用 1 中相同的硬體設備時，假如連接在某些串列埠上的設備並沒有被整合到您的特定版本的 Modbus 程式中，您仍然可以使用標準的串列程式存取遠端的串列埠，只是您必須在主控電腦上安裝 VxComm 驅動程式。


Modbus Utility

其他功能

1.自動掃描I/O數值

新增一個欄位在位址對應表, 從功能表 "Setting"=>"Monitor" 可以設定是否自動掃描與掃描時間, 從"Setting"=>"Scale"可以選擇顯示模式:數值(Value), 十進位位元(Dec), 十六進位位元(Hex)

2.類比/數位 輸出控制

在Address的欄位上點兩下可以切換數位輸出或是改變類比輸出數值

3.87K 模組斷線警示

當模組斷線時,圖示會變成紅色, 恢復連線後才會恢復正常

4.COM Port 設定

I-8000E-MTCP的COM Port可以設定成與7188-MTCP一樣的功能. 有五種模式可供設定:
a.VxComm (Virtual COM)
b.Modbus/RTU Gateway
c.Programming
d.UpLink
e.Debug

5.資料紀錄

從功能表"Setting" =>"Log" 來啟動資料紀錄, 設定檔名, 或是開啟記錄檔, 假如紀錄檔檔名沒有設定, 預設值為log子目錄下的 "yyyymmdd.txt"

6.趨勢圖

包含一個類比趨勢圖與四個數位趨勢圖, 從功能表"Setting"=>"Trend"來開啟

7.輸出控制


Application connection

Typical applications

Basic application 1: Modbus/TCP I/O device

An I-8000E -MTCP runs a default firmware to be a Modbus/TCP slave I/O device. You can simply use the Modbus Utility to configure the device and then set connection between SCADA, HMI software and the I-8000E -MTCP.

Basic application 2: Modbus/TCP I/O device with VxComm technique

An I-8000E -MTCP is also be able to link serial devices that connect to COM ports of the I-8000E -MTCP. 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 firmware, allowing extra functions, integration serial devices to Modbus/TCP kernel. Thus an I-8000 can be 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 connected to certain COM ports are not integrated into your custom firmware, you are still able to access the COM ports via standard serial driver. In order to do this, you must install VxComm driver on host PCs.


Default Firmware Features

Features of default Modbus firmware

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

  • Supports Modbus/TCP communication protocol to access I/Os that plug on slots
  • Supports Converters single Modbus/TCP to multi Modbus/RTU

    I-7188E-MTCP is a Modbus/TCP to Modbus/RTU converter. It can upgrade the MTCP/RTU device to Modbus/TCP easily.

  • Supports VxComm technique for every COM port of controllers

    Even if a serial device doesn't support the Modbus/RTU, you can still access these devices via Ethernet. However, you will first need to install a VxComm driver on the host PCs and assign a COM port number to link to the remote I-8000E -MTCP COM ports. Once installed, your serial clients can access these remote serial devices via the Ethernet by using the standard RS-232 functions.

  • Automatically range register address of I/O modules

    • You can plug an I/O module in any slot. The Modbus firmware can automatically scan all slots and range I/Os to registers in continous. After using the Modbus Utility to connect to the I-8000 -MTCP, you can get the register mapping of the I/Os.

  • Supports power on value, safe value for Analog/Digital output modules

    You can use Modbus Utility to set "power on value" for I-8000E power on output ,and "safe value" for I-8000E output when the unit loose the modbus communication for a while .

  • Allows multi-client (or master) access simultaneously

    Different I-8000E -MTCP controller supports diffent client numbers connect to. Please refer to the FAQ on our web site for more details.

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

  • Firmware modifiable

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

Below is the structure of 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-8000Es (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-8000E, Modbus kernel will response information from these 4 tables.

  • Provides user-defined registers

    • First part of the 4 internal register tables are reserve ford I/Os, others are 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_8E.h), Modbus/RTU devices can be easily integrated to internal registers of I-8000Es. An I-8000E polling every Modbus/RTU devices and put every necessary information to internal registers. Clients only ask the I-8000E 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-8000E -MTCP access serial devices. You can put information to internal registers of it. Thus, the non-Modbus serial devices can also support Modbus/TCP.

  • 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\8000\843x883x\TCP\Xserver\Xserver.htm

Below is structure of Modbus SDK


Modbus Utility

What is Modbus ?

What is SCADA ?

Quick Configuration

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

Range Code for Analog Modules

Modbus protocol doesn't support floating data format (for example: + 1.23, - 4.56, 59.12, ..., etc.).

It only provides 2 bytes integer data format to indicate values (- 32768 ~ + 32767). So, when you use analog modules, you need a formula to converter integer values to floating values. Mostly, SCADA softwares provide functions for converter values. Converter formulas:

fValue_Input = iValue_Input / 32767 * fMaxValue

iValue_Output = fValue_Output / fMaxValue * 32767

fValue_Input: an value read from an analog input module (in floating format)
iValue_Input: an value read from Modbus protocol (in integer format)
iValue_Output: an value send to Modbus protocol (in integer format)
fValue_Output: an value send to analog output module (in floating format)
fMaxValue: Max input/output value of analog modules

Analog modules support many different input/outpur ranges, please refer to range code table for detail information.

Range Code for Analog Modules

Software Linking to I-8000 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-8000E -MTCP

The Modbus/TCP default firmware allows an I-8000E controller to become not only a Modbus/TCP I/O device but also has other functions. Addition to linking to on board I/O modules, it can also link to other Modbus/RTU and non-Modbus/RTU devcies. Please refer to Features of default Modbus firmware for more detailed information.

Designing custom I-8000E -MTCP

When you get an I-8000E -MTCP, it already has the default Modbus firmware installed in the Flash memory. The firmware allows an I-8000E become a Modbus/TCP slave device.

If the default firmware doesn't suit your requirments, we also provide a Modbus SDK (software develop kit) allowing you to add additional functions to permit the I-8000E -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\8000e\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\8000\843x883x\document\8000Ess.pdf

Typical applications

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


Quick Configuration

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

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

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

Step 2. Connect to I-8000E -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-8000E -MTCP, the Modbus Utility will give detailed information regarding system settings, I/O configurations, etc.

Step 3. Adjust analog modules.

Some analog modules (I-8017H, I-8024) can set each channel as different input/output range and type. You can set the range at right window.

Step 4. Save all settings.

After clicking [Save], the Modbus Utility will generate two files (default are Modbus_8E.ini and Modbus_8E.txt).

Users can use two methods to review the settings of specific controller and every modules plug on it:

    1. by using the Modbus Utility: loads *.ini
    2. by using a text editor: loads *.txt

    You can still obtain information for the I-8000E -MTCP via Ethernet, even if you forget to save these settings.

All I-8000E -MTCP configuration requirements are now complete and you can gegin to use the Modbus/TCP I/O device.


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 protocol and is 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 the 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. Open source, 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. Wide knowledge case

Modbus Resource

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

http://www.modbus.org
A community for 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 fileds: e.g. power generation, water system, oil industry, chemistry, automobile industru. Different fields require different functions, but they all have the following features:

  • Grafic 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 software.

  • 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 commmunication 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)