We will now look at the click plc advancedhmi Modbus serial communication. Advanced HMI is a powerful, adaptable HMI/SCADA (Supervisory Control and Data Acquisition) development package that takes advantage of Visual Studio. There is no coding required and you can simply drag and drop items onto the page. The best thing is that the software is free. We will look at using AdvancedHMI with the Click PLC. Our sample Click PLC program will read the present value (PV) and the indicating lights on our Solo Process Temperature Controller. It will then write the set value (SV) to the Solo. This communication will be done using Modbus RTU protocol over an RS485 serial port on the Click. The AdvancedHMI package will communicate Modbus TCP over Ethernet to the Click PLC. We will be able to monitor our PV and set our SV on the Solo via the AdvancedHMI window.
Previously in this Click PLC series we have discussed:
System Hardware – Video
Installing the Software – Video
Establish Communication – Video
Numbering System and Addressing – Video
Timers and Counters
– Counter Video
– Timer Video
Compare and Math Instructions – Video
Program Control Instructions – Video
Shift Register – Video
Drum Instruction – Video
Send and Receive Instructions – Video
The programming software and manuals can be downloaded from the Automation Direct website free of charge.
What is AdvancedHMI?
AdvancedHMI can communicate to many devices. The Click PLC can communicate Modbus TCP (Ethernet) or Modbus RTU (Serial – RS232, RS485, RS422) Communications drivers currently included in AdvancedHMI are as follows. These drivers are fully accessible via VB or C# code:
• Allen Bradley DF1 RS232 Driver
• Allen Bradley Ethernet/IP Driver for SLC, MicroLogix, ControlLogix, and CompactLogix
• Beckhof TwinCAT Driver
• ModbusTCP Driver
• ModbusRTU Driver
• Omron Ethernet FINS Driver – Ethernet for newer controllers such as CP1H with Ethernet module
• Omron Serial FINS Driver – Serial (RS232 / RS485) for newer controller such as CP1H
• Omron Serial HostLink Driver – Serial (RS232 / RS485) for controllers such as CQM1, C200H, K-Series (C28K), C200, etc
The power of Advanced HMI is that it works within Visual Studio. This is a program-integrated development environment (IDE) that you can take advantage of to modify or create new features including data logging applications.
The following is an AdvancedHMI Software Comparison video. It will show how easily you can have this software communicating and logging information.
Advanced HMI runs on Visual Studio 2008 or higher and will need to be installed on your PC. Visual Studio Community Edition 2015 is the latest version of the software. If you do not have it installed, please download and install it from the following link.
We will now need the Advanced HMI project. Here is the link to download the zip file.
We will utilize the previous post “AdvancedHMI Solo Process Temperature Controller”. Instead of communicating Modbus RTU we will change this to Modbus TCP.
The present value (PV) will be read from Click Address – DS1 – Modbus 400001.
LED Status Bits will be read from Click Address – DS3 – Modbus 400003.
The set value (PV) will be set to Click Address – DS10 – Modbus 400010.
Reading / Writing Larger than 16 bits in the Click PLC
Note: Registers in the Click PLC that are larger than 16 bits must have a prefix to tell how AdvancedHMI will treat the variable. DD Registers –DD1 - L416385 – L – Long DF Registers – DF1 - F428673 – F – Floating Point Other prefixes that can be used are as follows: U – Unsigned – Example DS1 – U400001 B – BCD (Binary Coded Decimal) – Example DS1 – B400001
Click PLC / AdvancedHMI Program
Let’s look at the Click PLC program. This is a modification from our previous post. Click PLC Send and Receive Instructions
You will notice that we have added another receive command to get the LED Status bits and place this in DS3. The status bits are received from the Solo Process Temperature Controller Modbus register 404139.
Note: The PLC program has changed so that the communication timing will not send two instructions at the same time. Download the new program from the link below.
We can get the Modbus register address for every location in the Click PLC by calling up the address picker.
Near the bottom right of the address picker window, you will notice a check box titled ‘Display MODBUS Address’. When this is selected, a new column will appear and show the Modbus address for the Click PLC address displayed.
We can now run our Click PLC program and the AdvancedHMI Software.
Change the SV value by clicking on the SV value display. We can now change this number by typing into the keypad.
Watch this code in action with the video below. The PLC and AdvancedHMI programs can be downloaded here.
The PLC code has changed. A thank you to Ray P who pointed out the communication error from the video below. The following new PLC program can be downloaded here.
This concludes our series on the Click PLC by Automation Direct. We have covered several aspects of the Click PLC. Hopefully, you have a better understanding of how to use this powerful PLC.
Watch on YouTube: Click PLC AdvancedHMI Communication
If you have any questions or need further information please contact me.
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs 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.
2 thoughts on “Click PLC AdvancedHMI Communication”
Hi garry, how you doing? I hope you can help me.
I have a question, how can I send floating point data (R0) to modbus holding register (MHR0), what I have a to do to make a conversion on the plc brx? Could you send me an example, please? thanks.
The BRX PLC will use casting to convert the values into what you want.
Use the copy instruction to move the source RO (Real) to the destination MHR0:RD (Cast to Real Double – MHR0 (least significant) MHR1 (most significant).
Use this online calculator to check your conversion.
Cast operations can be found in the Do-More Designer Software for more references.
I hope this helps you out.