Abstract
Using the fieldbus configuration in Red Lion Workbench the RTU can be a Modbus master to the EtherTRAK-2 or E2 Modules. With Insert Master/Port within the Modbus Master protocol define the IP address of the I/O Module slave and port number. Define the station number, I/O Type, number of registers and declaration of variables with the Insert Slave/Data Block. Use the E2\E3 Address table or import the E2 I/O modules with the attached template project.
Products
RTU Products:
ST-IPm-8460/VT-mIPm-248-D/VT-mIPm-138-D
I/O Products:
E2-MIX24880-D/E2-MIX24882-D/E2-MIX20884-D/E2-8AO20M-D/E2-32AI20M-D/E2-32AI10V-D/E2-32DI24-D/E2-32DO24-D/E2-16AI20M-D/E2-16AI-8AO-D/E2-16DI24-D/E2-16DIAC-D/E2-16DO24-D/E2-16DORLY-D/E2-16ISO20M-D/E2-16ISOTC-D/E2-10RTD-D
E3-MIX24882-1/E3-MIX24880-1/E3-MIX20884-1/E3-32DI24-1/E3-16DI24-1/E3-16DIAC-1/E3-32DO24-1/E3-16DO24-1/E3-16DORLY-1/E3-32AI20M-1/E3-32AI10V-1/E3-16AI20M-1/E3-16ISO20M-1/E3-16AI8AO-1/E3-8AO20M-1/E3-16ISOTC-1/E3-10RTD-1
Use Case: Configure communications to any EtherTRAK-2 or E3 Module
Required Software
Sixnet I/O Tool Kit 5.0.103
Red Lion Workbench 1.0.3
Manually configure communications to an EtherTRAK-2 or E3 Module
- Open the project to add Modbus master communication. Click on the fieldbus icon on the toolbar. Click on Modbus Master in IO Drivers pane. Click on the Insert Master/Port icon.
- Configure the Modbus Master Port IP address, Port number (502 is default and should be used with EtherTRAK-2 and E3 modules). The Best protocol options for IP communication is usually TCP – Open MODBUS and UDP – Open MODBUS.
- Highlight the new Modbus master port. Click on the Insert Slave/Data Block.
- In the MODBUS Master Request window create a descriptive name. Enter the Slave address as configured in the Sixnet I/O Tool Kit software. The base address (Starting address in the EtherTRAK-2 module) will usually start with 1 depending on the I/O Types. See the E2/E2 address chart below. Select the number of items in this case 12 (First 1…12 are the first 12 discrete inputs on the E2/E3-MIX20884). The activation settings show the poll rate and poll type. When reading inputs from an E2/E3 module a periodic poll is usually best. On change may be used when writing outputs. To automatically define variable for the registers, check the box and enter the prefix with % at the end. % will add a sequential number after the prefix. These variables will be added to the global variable list. A preview of the variables that will be created are at the bottom of the window.
- The variables will display in the symbol window and in the global variable list.
- Repeat the steps above for the I/O Types in each E2 or E3 module used. The Modbus request function code, starting address and number of addresses for each E2 or E3 module are defined below.
E2/E3 Address Table for Defining Transfers in Red Lion Workbench |
|||||
Model |
I/O Type |
Modbus Request Function Code |
Base Address |
Nb Items |
Comment |
E2/E3-MIX24880-D |
Discrete Input |
<2> Read Input Bits |
1 |
16 |
First 16 DI registers. |
E2/E3-MIX24880-D |
Analog Inputs |
<4> Read Input Registers |
8 |
16 |
Optional Count Registers for the first 16 DI Registers. |
E2/E3-MIX24880-D |
Discrete Input |
<2> Read Input Bits |
17 |
8 |
Optional. Last 8 DI registers are configurable as first 8 DO registers. |
E2/E3-MIX24880-D |
Discrete Outputs |
<15> Write Coil Bits |
1 |
8 |
Optional. Last 8 DI registers are configurable as first 8 DO registers. |
E2/E3-MIX24880-D |
Discrete Outputs |
<16> Write Holding Registers |
1 |
8 |
Optional. TPO Control Registers. |
E2/E3-MIX24882-D |
Discrete Outputs |
<16> Write Holding Registers |
3 |
8 |
Optional. TPO Control Registers. |
E2/E3-MIX24880-D |
Analog Inputs |
<4> Read Input Registers |
1 |
8 |
|
E2/E3-MIX24882-D |
Analog Outputs |
<16> Write Holding Registers |
1 |
2 |
|
E2/E3-MIX20884-D |
Discrete Input |
<2> Read Input Bits |
1 |
12 |
First 12 DI registers. |
E2/E3-MIX20884-D |
Analog Inputs |
<4> Read Input Registers |
8 |
12 |
Optional Count Registers for the first 12 DI Registers. |
E2/E3-MIX20884-D |
Discrete Input |
<2> Read Input Bits |
13 |
8 |
Optional. Last 8 DI registers are configurable as first 8 DO registers. |
E2/E3-MIX20884-D |
Discrete Outputs |
<15> Write Coil Bits |
1 |
8 |
Optional. Last 8 DI registers are configurable as first 8 DO registers. |
E2/E3-MIX20884 |
Analog Outputs |
<16> Write Holding Registers |
5 |
8 |
Optional. TPO Control Registers. |
E2/E3-MIX20884-D |
Analog Inputs |
<4> Read Input Registers |
1 |
8 |
|
E2/E3-MIX20884-D |
Analog Outputs |
<16> Write Holding Registers |
1 |
4 |
|
E2/E3-16DI24-D |
Discrete Input |
<2> Read Input Bits |
1 |
16 |
|
E2/E3-16DI24-D |
Analog Input |
<4> Read Input Registers |
1 |
16 |
Optional Count Registers |
E2/E3-16DO24-D |
Discrete Outputs |
<15> Write Coil Bits |
1 |
16 |
|
E2/E3-16DO24-D |
Analog Outputs |
<16> Write Holding Registers |
1 |
16 |
Optional TPO Registers |
E2/E3-32DI24-D |
Discrete Input |
<2> Read Input Bits |
1 |
32 |
|
E2/E3-32DI24-D |
Analog Input |
<4> Read Input Registers |
1 |
32 |
Optional Count Registers |
E2/E3-32DO24-D |
Discrete Input |
<15> Write Coil Bits |
1 |
32 |
|
E2/E3-32DO24-D |
Analog Outputs |
<16> Write Holding Registers |
1 |
32 |
Optional TPO Registers |
E2/E3-16AI20M-D |
Analog Inputs |
<4> Read Input Registers |
1 |
16 |
|
E2/E3-32AI20M-D |
Analog Inputs |
<4> Read Input Registers |
1 |
32 |
|
E2/E3-32AI10V-D |
Analog Inputs |
<4> Read Input Registers |
1 |
32 |
|
E2/E3-10RTD-D |
Analog Inputs |
<4> Read Input Registers |
1 |
10 |
|
E2/E3-8AO20M-D |
Analog Outputs |
<16> Write Holding Registers |
1 |
8 |
|
Diagnostic Bits (Common to all E2/E3 modules) |
Discrete Input |
<2> Read Input Bits |
33 |
32 |
Optional. See E2_Status_Bits.csv |
Importing E2/E3 configurations from archive XML file
Importing Fieldbus configurations is very easy with Red Lion Workbench. The attached AllE2Modules.xml will import an example of 17 different models that can be used with E2 or E3 Modules. Once imported they can be duplicated or customized to fit a specific application. Once the configuration is customized it can be exported and reused in other applications.
- First download the attached AllE2Modules.xml. Open a project. To Tools > Import.
- Select Import project Items (XML).
- Select the project to import the configuration if necessary and click Next.
- Select the AllE2Modules.xml and click Open.
- Once imported the fieldbus configuration will be overwritten by the configuration and the global variable list populated with grouped variable list.
- After being imported stations maybe copied and pasted to duplicate and tag names can be customized manually in the editor or using the import/export children feature (see below) and declared as a variables.
Importing E2/E3 Configurations from csv files
E2/E3 configuration settings are imported from CSV files in three Levels. The first level imports the IP address, Port number and Protocol. The second level imports the Data type, Starting Address, Number of addresses and poll rate. The third level imports the tag names and off set number.
An example of all three levels are provided as attachments (Level1_Level2_Level3.zip). The attachments include an example of every E2/E3 model, datatypes and tag names. These attachments can be imported as is or be modified before they are imported. Below describes how to import them as is. The files are formatted as shown below.
- Level1 File
- csv
- This will import 17 stations (IP addresses, Port Number for each IP address and UDP Open Modbus Protocol)
- Level2 Files
- 2_Station#_<model number>.csv
- The file will import all the I/O Types, starting addresses and number of addresses for each I/O Type that are used by the modules I/O model number. Depending on the model number the number of I/O types will vary. There is always one file per station.
- # = The Modbus slave number used in the configuration.
- <Model number> = The module Model number
- Level3 files
- 3_Sta#_<model number>_<I/O Type>%.csv
- This file defines the tag names for each I/O Type. Therefore, there are multiple files per model number.
- # = The Modbus slave number used in the configuration.
- <model number> = The module Model number
- <I/O Types> = The I/O Type that corresponds to the I/O Type imported from the level 2 configuration
- % = The starting address
- 3_Sta#_<model number>_<I/O Type>%.csv
- 2_Station#_<model number>.csv
- csv
- Ge to the Fieldbus configuration window. If Modbus Master has not been added insert the Modbus Master Configuration. Right-click on the Modbus Master Configuration and go to the Import Children opion. Find the 1_AllE2E3Stations.csv and click open. A list of stations will appear number the Modbus Master configuration. IP addresses can be adjusted in properties after the import or in the csv file before the import using a text editing tool.
- Right-click on one of the stations. Click on Import Children option. Find the desired 2_Station#_<model number>.csv. The csv file import will result in multiple The way this is example is structured is the last octet of the IP address matches the slave address (e.g.; 10.1.0.1 has slave address (Station number) 1, 10.1.0.2 has slave address (Station number) 2). The IP addresses are independent of the slave address so matching is not necessary. The slave address or station number can be changed after the import or in the csv file before the import.
- Right-click on the I/O Type and click on Import Children. Find the corresponding 3_Sta#_<model number>_<I/O Type>%.csv. Match the I/O type in the Red Lion Workbench configuration to the csv file. For example, when Sta1_MIX24880_DI1 configuration is selected the ‘3_Sta1_MIX24880_DI1.csv’ is selected. When Sta1_MIX24880_AI1 configuration is selected the 3_Sta1_MIX24880_AI1.csv is selected, etc…
- After the tag names are imported, they need to declared as variables. In the symbol list below the fieldbus configuration. Highlight all tags by clicking on the first, hold the shift button, then click on the last tag name. Right-click on the tags and click on Declare Variables(s) in Database…
- Data type dialog will pop-up after that. Double-click on the type the corresponds to the data type being declared. DI, DO, Diagnostics = BOOL. AI, CNT, AO and TPO = INT.
- After the variables are declared successfully, they will show up in the Global Variable list.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement