ModBus Reference Manual
ModBus Reference Manual
ACA has adopted the following standards for IP addresses in order to minimize setup
time.
Advantage 900 192.168.100.200
Brick 192.168.100.100
BNR Modbus IO 192.168.100.1
Lenza Amplifier 192.168.100.50
The IP’s were chosen so that B&R Modbus coupler would not need a setup other than
Dip switch settings that configure the last byte of the IP address.
First Step: Setup the IP address on the Advantage 900 System
It is best if the PC has 2 Ethernet interfaces to keep the machine Ethernet network
separate that the windows network. For this example we will assume the machine
network will be configured on Local Area Connection 1 and Connection 2 will be
reserved for the Windows network (This name may vary from installation to installation.
To setup the PC’s IP address go to the Local Area Connection 1 properties. Select
TCP/IP and then click properties.
Select “Use the Following IP Address” and enter the data as shown below:
Click OK for the properties window and then close for the LAC properties window. The
IP address is now setup on the Ethernet port for the machine network.
Step2: Setup the IP address on the Delta Tau Controller
To begin the setup make sure the controller has power and plug in the USB cable to both
the controller and the PC. If everything is setup properly then the controller will show up
in the Device Manager as “Delta Tau UMAC USB 2.0 Device” shown below:
If the controller does not show up in the device manager then there is either a hardware
problem or a driver is missing. Make sure Pewin32Pro2 is installed and that only the
USB cable is plugged into the controller.
Next launch the application “Configure Ethernet 100 BaseT” from the START menu.
If the device showed up properly from the device manager then the application will open
with the firmware version of the communication board in the title bar of the form.
If the Modbus firmware has been enabled you will see the checkbox is checked in the
Protocol section of the form.
There are 3 things that need to be setup from the configuration program:
• IP Address
• Gateway Mask
• Gateway IP
To setup the IP address type in the correct address, 192.168.100.100, in the IP Address
section of the form. Then click on Store IP. The form will then ask you if you would
like to also setup the registry for device number 0. Select yes so that the communication
channel will be available for the windows communications driver, see figure below.
Next, type in “255.255.255.0” into the Gateway IP box of the form. Then click
“Gateway IP”
The last thing that has to get setup from this application is the Gateway mask. Type in
“255.255.255.0” into that section of the form. Then click “Gateway Mask” as shown
below.
Click “OK” and then “Done” in the upper right hand corner. Unplug the USB cable and
cycle power to the controller.
Plug in the Ethernet patch cable between the controller and the hub/switch and open
Pewin32Pro2.
Go to the Setup Menu and select General Setup and Option/Force all windows to device
#. From that window, highlight device 00 and click the INSERT button on the right side
of the window. Select ETH 0 device and the IP should be shown. After choosing this
device the software should come back as successfully detected.
To setup the IP on the BnR the two POT switches need to be set to 0 and 0. Then cycle
power to the module and the IP setup is complete.
Step4: Setup the Modbus Communication and IO address mapping in Delta Tau
Go back to Pewin32Pro2 and open the Setup Menu and select Modbus Setup. The
following form will open:
4A-setup
4D-setup
4B-setup
4C-setup
It is important to note that this is a user buffer because if you export the setup to a file it
will show up in the form as direct writes to these addresses and a define ubuf command.
The define ubuf command must be performed to the controller prior to any program data.
Put at the top of any program file or configuration if you plan on using skipping this
process and automating the setup just with file downloads.
Step4b: Setup Socket 1 for a Modbus Client with correct IP Address
Choose Active Socket 1, Modbus Client, and enter the correct IP of the IO module as
shown above. Then select “Test Netework” and it should return a Ping Success.
ote: An FC command of 2 or 15 deals with discrete inputs and the count value would be
stated in bits. So in the above example we are allocating 64 inputs this way we allow for
expanding later without shifting all the addresses later. So the count is 4 words or 64
bits when setting up Discrete items the count always has to be expressed in bits.
• Click the + button next to the command # to increment the target command from
0 to 1.
• With command 1 selected, use the drop down box to select FC15
• Set the Modbus Reference # to 0
• Set the PMAC Reference # to 64 (example shows 32-explained below)
• Set the count length to the number of outputs (bits)
• Click the “Update Command” to populate the command textbox
• Click the + button next to the command # to increment the target command from
0 to 1.
• With command 2 selected, use the drop down box to select FC16
• Set the Modbus Reference # to 2048 (B&R Analog Output Modules)
• Set the PMAC Reference # to 8 (The Inputs and Outputs have 4 words each so we
now have a PMAC ref of 8)
• Set the count length to the number of Words used to control B&R Analog Module
(words)
• Click the “Update Command” to populate the command textbox
Next, we need to setup command 3, Analog Inputs.
Timer FC MODREF PMACREF COU-T
0 3 6 12 4
• Click the + button next to the command # to increment the target command from
0 to 1.
• With command 3 selected, use the drop down box to select FC3
• Set the Modbus Reference # to 6 (B&R Analog Input Modules)
• Set the PMAC Reference # to 8 (The Inputs and Outputs have 4 words and the
Analog output is 4 words so we now have a PMAC ref of 12)
• Set the count length to the number of Words used to control B&R Analog Module
(words)
Click the “Update Command” to populate the command textbox
This item is a One shot and is only issued once when the command list is initiated. This
is normally only a power up. However it can be initiated with the following statement
via a plc in PMAC.
• Click the + button next to the command # to increment the target command from
0 to 1.
• With command 4 selected, use the drop down box to select FC6
• Set the Modbus Reference # to 4164 (B&R watchdog reset)
• Set the PMAC Reference # to 16
• Set the count length to the number of Words used to control B&R Reset function
2
Click the “Update Command” to populate the command textbox
• Click the + button next to the command # to increment the target command from
0 to 1.
• With command 5 selected, use the drop down box to select FC4
• Set the Modbus Reference # to 4487 (B&R Error Status)
• Set the PMAC Reference # to 18
• Set the count length to the number of Words used to monitor error status 2.
Click the “Update Command” to populate the command textbox
Next, we need to setup command 6, Analog outputs.
Timer FC MODREF PMACREF COU-T
6 6 4160 20 2
This item is a One shot and is only issued once when the command list is initiated. This
is normally only a power up. However it can be initiated with the following statement
via a plc in PMAC.
• Click the + button next to the command # to increment the target command from
0 to 1.
• With command 6 selected, use the drop down box to select FC6
• Set the Modbus Reference # to 4160 (B&R watchdog time)
• Set the PMAC Reference # to 20
• Set the count length to the number of Words used to set watchdog time 2.
Click the “Update Command” to populate the command textbox
The setup is now configured and it is time to send the commands to the PMAC.
To test the network communications, close Pewin32Pro2 and then cycle power to both
the PMAC and the IO system.
When the BnR IO comes up the watchdog LED should light up after 30seconds or so.
This means the system is up and working.
If the watchdog is set (light is out) then the inputs can be read but the outputs will not get
written.
A good way to view this is to setup a watch window like shown below:
This will give you an idea of how the data is mapped.
The outputs will be located at the “Modbus Buffer adr” + PMAC reference number for
the write command (command #1 FC15). If you use 32 for the PMAC reference number
then for this example the data will start at $10781, since 32 bits is supported per 1 address
line. If you use 64 as a PMAC reference number then the outputs will begin at $10782
since a 64 bit offset will take 2 entire address lines of PMAC memory.
Delta Tau Address Locations Based On The Above Mod-Bus Setup
Using the above modbus setup and its settings below is a list of memory locations and
current usages. This command list was setup with the ability to expand the IO in the
future with out changing all the address locations if one did.
Note: Inputs and outputs in the PMAC could be 16 bits, were the B&R
modules we are using are only 12 so each X or Y word above only the
first 12 bits are used. So with the current addresses we could have 48
Input and 48 Outputs.
Analog Inputs M7100-7199 Reserved
Mapped M7101 ~ M7104 (4 Analog Inputs)
Assigned M7101 ~ M7104 (4 Analog Inputs)
Available None