MODBUS IPS
Within each section, you define parameters using a 'key' followed by the "=" sign and followed by one or more alpha-numeric arguments. Parameters within the section may be arranged in any order. Multiple arguments must be separated by spaces, a dot, or a comma. A comment line starts with "/". The following keys are defined at the moment: Section: [PORT]
| Parameter | Description | Default value |
|---|---|---|
| COM |
Sets the COM port used. The COM may be COM1, COM2,COM3, COM4 or TCP or UDP. TCP and UDP use port 502 |
COM=COM1 |
| MODTCP | Protocol 1=MODBUS TCP 0=MODBUS OVER TCP | MODTCP=0 |
| BAUDS | Communication speed. Only applies to COM1 to COM4 | BAUDS=19200 |
| MODE |
Accepts a string of the form "baud=19200 parity=N data=8 stop=1 to=on dtr=off odsr=off octs=off dtr=off rts=off idsr=off". All the parameters are optional and only those you include in the string are affected. If you include baud=300, then stop=2 automatically. | baud=19200 parity=N data=8 stop=1 to=on dtr=off odsr=off octs=off dtr=off rts=off idsr=off |
| NODE | The identifier for this IPS on the UDP (UNET) network. | NODE=1 |
| RESET |
The index of the register in the data table that will be used for remote reset. Writing to this register causes the IPS to re-read the configuration file. | None. No reset register. |
| SNAP | The index of the register in the data table that will be used for remote protocol capture. Writing 1 this register causes the IPS to produce a capture file. It is equivalent to clicking TRACE -> Capture. | None. No snapshot register. |
| STATION | The MODBUS station id assigned to this driver. | STATION=1 | ||||||||||||||
| TIMEOUT | The time in milliseconds that this station will wait for a response before trying again. | TIMEOUT=250 | ||||||||||||||
| ENABLE |
This parameter decides how the "ENABLE" registers operate for cluster
of points. If ENABLE=0, the cluster communicates as long as its ENABLE
register is on. If ENABLE=1, the cluster triggers a communication when
the ENABLE register is turned on and automatically turns the ENABLE
register off when the communication is confirmed by the station . |
ENABLE=0 | ||||||||||||||
| FRAME | The time in milliseconds between receiving characters on the serial port to consider the message received. | FRAME=2 | ||||||||||||||
| ERRORCODE | Specifies the index of a register that will report the MODBUS error code, or 0 if no error. | No error reporting | ||||||||||||||
| REMOTE | Specifies the IP of a remote MODBUS RTU connected to this TCP/IP interface. Each remote is defined by 5 decimal numbers. The first number is the UNET node id. The next 4 are the IP of that station. You may include up to 64 "REMOTE" lines in the file. | No remote station defined | ||||||||||||||
| DI |
Defines a cluster of binary registers to be received from a remote
station. Each "DI" definition consists of 6 numbers. You may include
up to 64 DI definitions in the file.
FIRST, QTY, NODE, POS, ALERT, ENABLE
|
No DI cluster | ||||||||||||||
| RI |
Defines a cluster of analog 40xxx registers to be received from a remote station. Each "RI" definition consists of 7 numbers. You
may include up to 64 RI definitions in the file.
FIRST, QTY, NODE, POS, ALERT, ENABLE, TYPE
|
No RI cluster | ||||||||||||||
| AI |
Defines a cluster of analog 30xxx registers to be received from a remote station. Each "AI" definition consists of 6 numbers. You
may include up to 64 AI definitions in the file.
FIRST, QTY, NODE, POS, ALERT, ENABLE
|
No AI cluster | ||||||||||||||
| DO |
Defines a cluster of binary registers to be received from a remote
station. Each "DI" definition consists of 6 numbers. You may include
up to 64 "DO" definitions in the file.
FIRST, QTY, NODE, POS, ALERT, ENABLE
|
No DO cluster | ||||||||||||||
| RO |
Defines a cluster of analog 40xxx registers to be sent to a remote station. Each "RO" definition consists of 7 numbers. You
may include up to 64 "RO" definitions in the file.
FIRST, QTY, NODE, POS, ALERT, ENABLE, TYPE
|
No RO cluster |
| ACTIVE |
Enable/Disable the watchdog. When enabled, all the outputs turn off after a delay when the IPS no longer receives commands from a RTES32. | ACTIVE=1 |
| TIME |
The delay in milliseconds after which the outputs turn off when the watchdog is enabled. | TIME=1000. |
Two computers on the network run MODBUS-IPS
Computer A is at IP 192.168.0.102 and has the following MODBUS.INI:
[UNET] NODE=5 [PORT] COM=TCP MODTCP=1 [DRIVER] FRAME=50 STATION=11
Computer B is at IP 192.168.0.103 and has the following MODBUS.INI:
[UNET] NODE=6 [PORT] COM=TCP MODTCP=1 [DRIVER] FRAME=50 STATION=1 REMOTE=11 192.168.0.102 RI=50,16,11,50,16,0,0
The MODBUS-IPS at Computer B will read the values from registers 50 to 65 at the MODBUS-IPS in Computer A and place them into it's registers 50 to 65. Application note: Beckhoff watchdog Beckhoff model IL230xx B900, using MODBUS-TCP include a watchdog that turns the digital outouts off when comunication to the module is interrupted for 1000ms. When that occurs, the watchdog must be reset before operating the outputs again To reset the watchdog, 2 numbers (48847 and 45054) must be written consecutively to a given register address (44385). The countdown value of the timer is at register address 44128. Below is a working example on how this reset may be accomplished When the communication with the module is re-established, the countdown WATCHDOG reads 0.
This causes RESET1 to turn on and sends the first value.
0.5 seconds later, RESET2 turns on and sends the second value.
The watchdog resets and WATCHDOG shows the initial value 1000.