User guide
set ia
144 Chapter 2 Command Descriptions
Setting up a Modbus/TCP to RTU bridge with slave(s) attached
Because of the increased flexibility of IA configuration in this firmware
release, creating a simple Modbus bridge by command line requires more
steps than previous firmware. This example defines the message source
(the ia master), a message destination (the ia serial), and how messages
are forwarded. In this example, all incoming messages are forwarded to
serial port 1.
#> set ports ra=1 dev=ia
#> set ia master=1 protocol=mbtcp active=on
#> set ia serial=1 protocol=mbrtu
#> set ia table=1 addroute=1 active=on
#> set ia table=1 route=1 type=serial port=1 protocol=mbrtu
Adding a second serial port with more Modbus slaves attached
Because the DigiOne IAP includes two serial ports, a second multi-drop of
serial slaves can be added. Because the messages can be “routed” to one
of the two ports, multiple masters can use both ports concurrently. To
define the first port as having slaves 1 to 8, the second port as having
slaves 9 to 14, and slaves 15-255 to be rejected, enter the following
commands:
#> set ports ra=1-2 dev=ia
#> set ia master=1 protocol=mbtcp active=on
#> set ia serial=1 protocol=mbrtu
#> set ia serial=2 protocol=mbrtu
#> set ia table=1 addroute=1 active=on
#> set ia table=1 route=1 type=serial port=1 protocol=mbrtu protaddr=1-8
#> set ia table=1 addroute=2 active=on
#> set ia table=1 route=2 type=serial port=1 protocol=mbrtu protaddr=9-14
#> set ia table=1 addroute=3 active=on
#> set ia table=1 route=3 type=nopath protaddr=15-255
Using the second serial port in Pass-Thru mode for a serial Modbus master
Another use for the DigiOne IAP’s second serial port is to allow a serial
master to share serial slaves 1-8 with the network. Because of the
destination table, the serial master can be allowed to access Modbus/TCP
network slaves. Since “route=2” has “ip=0.0.0.0,” this means DigiOne IAP
will use its own IP address and the slave address to construct an IP
address. So if the DigiOne IAP’s IP address is 192.168.1.37 and the
Modbus slave address is 99, then a remote Modbus/TCP slave at IP
address 192.168.1.99 will be accessed.
#> set ports ra=1-2 dev=ia
#> set ia master=1 protocol=mbtcp active=on
#> set ia serial=1 protocol=mbrtu
#> set ia serial=2 protocol=mbrtu type=master
#> set ia table=1 addroute=1 active=on
#> set ia table=1 route=1 type=serial port=1 protocol=mbrtu protaddr=1-8
#> set ia table=1 addroute=2 active=on
#> set ia table=1 route=2 type=ip protocol=mbtcp protaddr=9-255
ipaddress=0.0.0.0