Modbus RTU Click PLC Master to BRX Do-More Slave

We will now use Modbus RTU to connect a Click Master to a BRX Do-More Slave controller.  Recently I was asked to demonstrate communication between a Click PLC and BRX Do-More PLC using Modbus RTU. Both PLCs are available from automation direct com. Modbus serial communication (Modbus RTU) is a standard protocol used in many automation devices. It works on a Master / Slave configuration. You can have only one master per network on Modbus RTU (Remote Terminal Unit). A maximum of 32 devices (Nodes) on the network can communicate to the master. A review of the Modbus RTU protocol (RTU frames) can be seen at the following URL.
http://www.rtautomation.com/technologies/modbus-rtu/
Using the Click PLC as a Master we will be communicating to the BRX Do-More PLC (Slave). Our example will read 10 registers from the BRX Do-More PLC and write 10 registers to the Click PLC. Let’s get started!

Previously in this series, we have discussed:
Click PLC System Hardware – Video
Click PLC Installing the SoftwareVideo
Click PLC Establish CommunicationVideo
Click PLC Numbering System and AddressingVideo
Click PLC Timers and Counters
Counter Video
Timer Video
Click PLC Compare and Math InstructionsVideo
Click PLC Program Control InstructionsVideo
Click PLC Shift RegisterVideo
Click PLC Drum InstructionVideo
Click PLC Send and Receive InstructionsVideo
Click PLC AdvancedHMI CommunicationVideo
Create an Analog Voltage Input Tester for a PLCVideo
Wiring Testing Analog PLC Input Click – Video
Modbus RTU Click PLC Master to BRX PLC Slave CommunicationVideo
The programming software and manuals can be downloaded from the Automation Direct website free of charge.

Hardware – Modbus RTU – Click master / Do-More slave

Modbus RTU Click PLC Master to BRX Do-More Slave
Our BRX Do-More PLC comes with a built-in RS485 port that we will be using for a Modbus RTU slave unit. Here are the specifications for the port.
Modbus RTU Click PLC Master to BRX Do-More Slave

Modbus RTU Click PLC Master to BRX Do-More Slave
The Click PLC that we will be using also comes with an RS485 port. We will be using Modbus RTU protocol to communicate to the BRX Do-More PLC
Modbus RTU Click PLC Master to BRX Do-More Slave
Com Port 3 of the Click supports 2-wire RS-485

Wiring – Modbus RTU – Click master / Do-More slave

Modbus RTU Click PLC Master to BRX Do-More Slave
RS485 is a two-wire communication. You daisy chain the devices along the path until you get to the end of the chain where a termination resistor is placed between the + and – terminals. The BRX Do-More PLC has the ability to add the termination resistor in the software.

Addressing – Modbus RTU – Click master / Do-More slave

Modbus addressing for the BRX Do-More PLC is located in a separate memory area. BRX Do-More PLC is part of the Do-More family of controllers. See the following chart for the Modbus addresses.

Coil/Register Numbers Data Addresses Type BRX (Do-More) PLC Table Name
00001-09999 0000 to 270E Read-Write MC1 to MC1023 Discrete Output Coils
10001-19999 0000 to 270E Read-Only MI1 to MI1023 Discrete Input Contacts
30001-39999 0000 to 270E Read-Only MIR1 to MIR2047 Analog Input Registers
40001-49999 0000 to 270E Read-Write MHR1 to MHR2047 Analog Output Holding Registers

We will be using the send and receive commands in the Click PLC. Ten registers will be read and written according to the chart below.

Controller Modbus Address BRX (Do-More)PLC Click Address Comment
Click Read 40001 – 40010 MHR1 to MHR10 DH1 to DH10 Read 10 registers from the BRX PLC
Click Write 40011 – 40020 MHR11 to MHR20 DH11 to DH20 Write 10 registers to the BRX  PLC
BRX Do-More PLC Configuration

The BRX Do-More PLC can be programmed using free Do-More Designer software from Automation Direct. Here is a link for the software which includes a simulator.
http://support.automationdirect.com/products/domore.html
The following links will help you to install the software and establish communication.
https://accautomation.ca/brx-plc-installing-the-software/
https://accautomation.ca/brx-plc-establishing-communication/

We will go online with our controller and call up the system configuration window.
Modbus RTU Click PLC Master to BRX Do-More Slave
Ensure that under the Serial Port Configuration we have Modbus RTU Server (Slave) selected. Also under Port Type we have the RS485 selected and enable the 120 Ohm Termination.
Select the “Change @IntSerial Device Settings..”
Modbus RTU Click PLC Master to BRX Do-More Slave
We can now set up the parameters for the serial port on the BRX Do-More PLC.
Unit ID: 1
Baud Rate: 38400
Data Bits: 8
Stop Bits: 1
Parity: Odd
Note: It is important to have all of these parameters set the same on each side or you will not communicate.
Select OK once these parameters have been set. Select OK again to exit from the system configuration menu.

BRX Do-More Ladder Program

Since the BRX Do-More PLC is acting as a slave it will not require any ladder programming for the communications to work. We will be putting in a few rungs to demonstrate that communication link.
Ladder Logic Programming Sample Code
You will see that MHR11:0 represents bit 0 of the first word that the Click PLC will write to the BRX Do-More.
We will also set up a data view window to view our information being transmitted.
Modbus RTU Click PLC Master to BRX Do-More Slave
The first 10 registers are for writing to the Click PLC and the next is reading from the Click PLC.
We have now finished setting up our BRX Do-More PLC Slave unit.

Click PLC Configuration

The Click PLC can be programmed using free Click programming software from Automation Direct. Here is a link to the software.
http://support.automationdirect.com/products/clickplcs.html
The following links will help you to install the software and establish communication.
https://accautomation.ca/click-plc-installing-the-software/
https://accautomation.ca/click-plc-establish-communication/

We will go online with the Click PLC and call up our Com Port Setup…
Main Menu | Setup | Com Port Setup…
Modbus RTU Click PLC Master to BRX Do-More Slave
Under Port 3 select Setup…
Modbus RTU Click PLC Master to BRX Do-More Slave
We will now make sure that the communication settings match our slave unit.
Unit ID: 1 – This will not matter in our case because this is the master.
Baud Rate: 38400
Data Bits: 8
Stop Bits: 1
Parity: Odd
Select OK once the settings have been changed. We can then select OK on the COM Port Setup window to close it.

Click PLC Program

We will be using the send and receive instruction in the Click PLC to get the information (receive) and write the information (send) using Modbus RTU.
https://accautomation.ca/click-plc-send-and-receive-instructions/
Modbus RTU Click PLC Master to BRX Do-More Slave
The Receive instruction will read the first 10 words from the BRX Do-More PLC. See the table above for the addresses.
Ladder Logic Programming Sample Code
The instruction will be enabled from the leading edge of the send instruction success or error flag. These flags have been labeled Write_Success and Write_Error. The instruction can also be enabled by the first scan flag (bit) of the PLC. This will get the communication started.
Modbus RTU Click PLC Master to BRX Do-More Slave
The Send instruction will write the next 10 words to the BRX Do-More PLC. See the table above for the addresses.
Ladder Logic Programming Sample Code
The instruction will be enabled from the leading edge of the receive instruction success or error flag. These flags have been labeled Read_Success and Read_Error.
Ladder Logic Programming Sample Code
Using the copy command we will set the first register (DH1 – 400001) into the physical outputs. We will then see the information changing.
Save the program and download it to the controller. We can then put the Click PLC in run mode and execute our ladder program.

Calling the Data View in the Click programming software, we can then monitor and set the information that we are now exchanging with the BRX Do-More Series PLC.
Modbus RTU Click PLC Master to BRX Do-More Slave

See this program in action by watching the video below.

You can download both PLC programs here.

Watch on YouTube: Modbus RTU Click PLC Master to BRX Do-More PLC Slave Communication


If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.


Leave a Comment