![]() |
IP Based Device Servers |
The device server is responsible for exchanging data with the device. This exchange of data uses the protocol specific to the device it talks to (MODBUS, OPTOMUX, etc.) and over the medium required by the device (Ethernet, Serial port, USB,?).
The specific data exchanged between the IP based device server and the device follows the script in a configuration file ("device.INI") that you define. This file tells the device server which data points (analog or digital) to request from the device and places the values received in a data table. It also takes values from the data table and sends them to the specific data points at the device. You organize the data table according to your requirements. Each IP based device server has its own data table.
Every RTES32 on the network looks at the data table of that device server as just another RTES/RTES32, but with a different port number, so that they may co-exist in the same machine as a RTES32. Each device server is assigned an ID that is used to form a port number. This ID is part of to the REMOTE definition in RTES32.INI.
You may read data from the data table of any IP server on the network, using the FLOAT and BINARY entries in RTES32.INI.
You may write data to the data table any IP server on the network using the SEND entries in RTES32.INI.
Note: You should not use the SEND to write data to another RTES or RTES32 - only WinRTES should do that. It is a safe pactice to let the target RTES/RTES32 read what it needs, rather than having it's space invaded.
The data tables
Each IPS holds a table containing 1024 32-bit floating point variables and 1024 binary variables. These variables are used to exchange data between the RTES32 - the clients - on the network and the device attached to the IPS. The floating point variables are addressed from 0 to 1023 and the binary variables are addressed from 0 to 1023. Data written to these variables from the device is available to the clients and data written to these variables by the clients is sent to the device. These variables are also used to exchange flags between the clients and the IPS, such as alarm conditions and commands.
How to define an IP Based Device Server in RTES32.INI
An IPS is defined by the IP address at which the IPS is located and an identifier telling the clients on which port the IPS is listening. A unique 'node' number is assigned to each IPS to simplify how it refered to within the network.
The above information is contained in the [UNET] section of the RTES32.INI of the clients to the IPS, in the following format:
REMOTE= node,IP address,ID
The node (1-255) must match the one assigned to the IPS in its own configuration. All I/O transactions with this IPS refer to the node number.
The IP address (4 bytes) is the one assigned to the computer where the IPS resides.
The ID is an identifier assigned by FAI to each IPS. The following table shows the IDs that are currently assigned.
RTES or RTES32 | 0 |
MODBUS RTU | 1 |
MODBUS ASCII | 2 |
OPTOMUX | 3 |
TI500 | 4 |
DNP3 | 5 |
A-B | 6 |
ADS (Beckhoff) | 10 |
SYMAX | 22 |
F805CF | 23 |
OMEGABUS | 24 |
For example, a client may use a MODBUS IPS located at IP 192.168.0.100 and node 5 has been assigned to that IPS. The RTES32.INI of this client will contain:
REMOTE=5, 192.168.0.1, 1
Reading Binary data from an IP Based Device Server
The script to read binary data from an IPS has the following format:
BINARY=FIRST, QTY, NODE, POS, ALERT, ENABLE
FIRST |
the index of the first register of the block at the requesting RTES. |
QTY |
the number of registers to transfer, starting at and including the first register. The maximum number of register values that may be transferred is 16 per block. |
NODE |
the node id of the IPS that the values will be coming from. |
POS |
the index of the first RTES variable at the source computer. |
ALERT |
the index of the register to be set in case a communication error or time-out occurs when this particular block is transferred |
ENABLE |
the index of the register that will control transmission, or 0 if transmission is continuous. |
You may include up to 64 "BINARY" definitions in the file.
Reading analog data from an IP Based Device Server
The script to read analog data from an ISP has the following format
FLOAT=FIRST, QTY, NODE, POS, ALERT, ENABLE
FIRST |
the index of the first register of the block at the requesting RTES. |
QTY |
the number of registers to transfer, starting at and including the first register. The maximum number of register values that may be transferred is 16 per block. |
NODE |
the node id of the IPS that the values will be coming from (source). |
POS |
the index of the first RTES variable at the source computer. |
ALERT |
the index of the register to be set in case a communication error or time-out occurs when this particular block is transferred |
ENABLE |
the index of the register that will control transmission, or 0 if transmission is continuous. |
You may include up to 64 "FLOAT" definitions in the file.
Sending data to an IPS
The script to send data to an ISP has the following format
SEND=FIRST, QTY, NODE, POS, ALERT, ENABLE
FIRST |
the index of the first register of the block at the requesting RTES. |
QTY |
the number of registers to transfer, starting at and including the first register. The maximum number of register values that may be transferred is 16 per block. |
NODE |
the node id of the IPS that the values will be written to. |
POS |
the index of the first RTES variable at the source computer. |
ALERT |
the index of the register to be set in case a communication error or time-out occurs when this particular block is transferred |
ENABLE |
the index of the register that will control transmission, or 0 if transmission is continuous. |
You may include up to 64 "SEND" definitions in the file.
NOTE: On the client-server side of the communication with an IPS, analog registers are numbered 0 to 6399 and the binary registers are numbered 20000 to 26399.
SEND=100,16,5,28,0,0 sends the 16 analog registers R0101 to R0116 to the analog registers 29 to 45.
SEND=20100,16,5,28,0,0 sends the binary registers O101 to O116 to the analog registers 29 to 45.
SEND=20100,16,5,20028,0,0 sends the binary register O101 to O116 to the binary registers 29 to 45.
Communication between the IPS and the device. Input/Output
The transactions between te IPS and the I/O device follow the script defined in the configuration file for the IPS. This script depends greatly on the device that the IPS is designed to cimmunicate with.
Just like RTES32.INI, these configuration files are divided in sections, each section containing a number of keys that address specific parameters.
Below is a list of the devices currently supported and the documentation for the corresponding configuration file.
MODBUS | MODBUS RTU | ID=1 | MODBUS.INI |
MAIPS | MODBUS ASCII | ID=2 | MAIPS.INI |
OPTOMUX | OPTOMUX | ID=3 | OPTOMUX.INI |
TI500 | TI500 | ID=4 | TI500.INI |
DNP3 | DNP3 | ID=5 | DNP3.INI |
A-B | A-B | ID=6 | ABIPS.INI |
ADS | Beckhoff ADS | ID=10 | ADS-IPS.INI |
SYMAX | SYMAX | ID=22 | SYMAX.INI |
F805CF | Unipulse | ID=23 | F805CF.INI |
F805CF | OMEGABUS | ID=24 | OMEGABUS.INI |
Run Configuration remotely
The last analog register - Index = 1023 - in the data table of every IPS is reserved. Setting it to 1 causes the IPS to re-load the configuration. The IPS turns the register back to 0 after it has read the configuration file. You may change the configuration file remotely using drive mapping or FTP.
Notes and guidelines for the use of IP Based Device Servers
When you install an IPS on a computer and connect it to the device, you make that device accessible to all the RTES32 on the network. The configuration file determines hows the data tables are used and those data tables are shared by all the RTES32 on the network. We highly recommend to use a spreadsheet to coordinate the I/Os end to end.
Each read or write operation defined in the configuration file of the IPS operates depending on it's ENABLE register.
There is also a ENABLE parameter that affects the behaviour of the ENABLE registers.
If the ENABLE register is '0', then the read or write operation takes place continuously. | |
If the ENABLE register is defined (non-0), then the read or write operation takes place when that ENABLE register is on (Value=1 or ON). After the operation has taken place succesfully, the state of the ENABLE register is dictated by the value of the ENABLE parameter. | |
If ENABLE=0, the ENABLE register remains on. | If ENABLE=1, the ENABLE register is turned off. |
Any RTES32 on the network may turn the enable registers it may or may decide (depending on your configuration) to keep it on. In a typical application, only one RTES32 will be in control of a given ENABLE register. In a 'standby' situation, 2 or more RTES may have the ability to control the ENABLE registers - possibly based on some rules that identify which RTES is in control.
In the design of your interface, it is good practice to reserve a block of registers in the analog data table to report the communication failures between the IPS and the device. These variables may be read by RTES and used in the logic, the alarms, as well as passed on to the HMI.
It is also good practice to reserve a block of analog registers in the data table for the ENABLE registers, so that they are clearly identified and used appropriately.
Example
Watchdog
The IPS performs the read and write operations, using and refreshing the data in its data table. The data table of the IPS is in turn read and updated by one or more RTES32 on the network. If there is no RTES32 communicationg with an IPS, the IPS will automatically turn off all the binary data in its data table. The timeout to detect that there is no communication is set at 1000 milliseconds by default.
You may change the timeout value or disable this feature in the configuration of the IPS, using the parameters in the [WATCHDOG] section.