0% found this document useful (0 votes)
2 views

ModBus Reference Manual

The document provides a detailed guide for setting up Modbus TCP communications on a Delta Tau Controller, including necessary software and hardware requirements. It outlines step-by-step instructions for configuring IP addresses for various devices, setting up Modbus communication, and mapping I/O addresses. Additionally, it includes specific command setups for reading and writing data, as well as troubleshooting tips for ensuring successful communication between devices.

Uploaded by

Master Leo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

ModBus Reference Manual

The document provides a detailed guide for setting up Modbus TCP communications on a Delta Tau Controller, including necessary software and hardware requirements. It outlines step-by-step instructions for configuring IP addresses for various devices, setting up Modbus communication, and mapping I/O addresses. Additionally, it includes specific command setups for reading and writing data, as well as troubleshooting tips for ensuring successful communication between devices.

Uploaded by

Master Leo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Modbus Setup Reference Manual

Delta Tau ModBus Supplemental Reference


(B&R I/O and Analog Devices)

American Controls & Automation, Inc.


897 Industrial Drive
West Chicago, IL. 60185
P: 630.293.8841
F: 630.293.8843
Web: Http:\\www.ac-a.com
Delta Tau Setup of Modbus TCP Communications For Integrity EDM
To setup the Modbus Communications on a Delta Tau Controller you will need:
• Pewin32Pro2 installed on the setup computer (30 day trial at www.deltatau.com
under downloads section)
• USB cable for Ethernet Communication Setup
• Ethernet patch cable/Hub setup for the Ethernet Communication between the 3+
devices.

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.

Leave Pewin32Pro2 open and move on to step 3.

Step3: Setup the IP address on the BnR IO module

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

Steps to configure the Modbus Communication:


• Setup Modbus Buffer
• Setup Socket 1 for a Modbus Client with correct IP address
• Setup the 2 commands, Read and Write discrete
• Update PMAC
• Setup Mapping

Step4a: Setting Up the Modbus Buffer


To setup the modbus buffer you keep the defaults and click on the “Setup Modbus
Buffer” button in the top left of the form. This effectively sets up a user buffer within the
PMAC for the command data and the actual IO data.

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.

Step4c: Setup the Read and Write Commands


There are 8 commands that need to be setup, command 0 thru command 7. First setup
command 0 to FC2, Read Discrete inputs.
Timer FC MODREF PMACREF COU-T
0 2 0 0 64
• Use the drop down box to select FC2
• Set Modbus Reference # to 0
• Set PMAC Reference # to 0
• Set count length to the number of inputs (bits)
• Click the “Update Command” to populate the command textbox

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.

Next, we need to setup command 1, write the outputs.


Timer FC MODREF PMACREF COU-T
0 15 0 64 64

• 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

Next, we need to setup command 2, Analog outputs.


Timer FC MODREF PMACREF COU-T
0 16 2048 8 4

• 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

Next, we need to setup command 4, Analog outputs.


Timer FC MODREF PMACREF COU-T
5 6 4164 16 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.

;PMAC Command List Enable


;X:$FFFFC2,4 (Set this to 1 for 5 to 10ms then back to 0 and modbus
command list will be sent)

• 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

Next, we need to setup command 5, Analog outputs.


Timer FC MODREF PMACREF COU-T
0 4 4487 18 2

• 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.

;PMAC Command List Enable


;X:$FFFFC2,4 (Set this to 1 for 5 to 10ms then back to 0 and modbus
command list will be sent)

• 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.

Step4d: Update the PMAC


Click on the “Update PMAC” button to send the commands to the PMAC. The software
will automatically issue a save and $$$ (reset) command to the controller.

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.

Step4e: Setup the Mapping


Where is the DATA???
The inputs will start at the address shown in the “Modbus Buffer adr” (this example is
for turbo and starts at $10780) textbox in the Setup window above. The data is copied in
16bit words starting in X memory and then into Y memory. The upper byte of each X
and Y is left blank (since both X and Y memory is 24 bits wide). Each memory address
can store 32 bits of modbus data.

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.

Com # Timer FC Mod Ref. PMAC Ref. Count


0 0 2 0 0 64
1 0 15 0 64 64
2 0 16 2048 8 4
3 0 3 6 12 4
4 5 6 4164 16 2
5 0 4 4487 18 2
6 6 6 4160 20 2

;Intputs: X:$10780 Y:$10780 (USED)


;(Descrete) X:$10781 Y:$10781 (X Used Y NOT USED AT this TIME)
;
;Outputs: X:$10782 Y:$10782 (USED)
;(Descrete) X:$10783 Y:$10783 (X Used Y NOT USED AT this TIME)
;
;Analog Inputs: X:$10786 Y:$10786 (USED)
;(Word) X:$10787 Y:$10787 (USED)
;
;Analog Outputs: X:$10784 Y:$10784 (USED)
;(Word) X:$10785 Y:$10785 (USED)
;
;
;BnR (Status & Reset)
;Reset Signal: X:$10788,0,12 (Set to 193) Note: One Shot
;Error: X:$10789,0,12 (0 all is well 1= watchdog)
;
;PMAC Command List Enable
;X:$FFFFC2,4 (Set this to 1 for 5 to 10ms then back to 0 and modbus
command list will be sent)

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

Analog Outputs M7200-7299 Reserved


Mapped M7201 ~ M7204 (4 Analog Outputs)
Assigned M7201 ~ M7204 (4 Analog Outputs)
Available None

Inputs M7300-7399 Reserved


Mapped M7301 ~ M7336 (36 Inputs)
Assigned M7301 ~ M7326 (26 Inputs)
Available M7327 ~ M7336 (10 Inputs)

Outputs M7400-7499 Reserved


Mapped M7401 ~ M7436 (36 Outputs)
Assigned M7401 ~ M7422 (22 Outputs)
Available M7423 ~ M7436 (14 Outputs)

You might also like