Modbus communication is a widely used communication protocol in industrial automation. It is basically divided into three types – Modbus TCPIP, Modbus RTU, and Modbus ASCII. Modbus TCPIP uses Ethernet communication, whereas Modbus RTU and Modbus ASCII use serial line communication.
Apart from PLC, these protocols are also available in many devices like fire alarm annunciators, variable frequency drives, PID controllers, etc. This means, many devices nowadays provide these protocols so that users can get maximum data from them as much as possible.
So, PLC programmers need to know that there are many software available to test the protocol in these devices. One of the most common and simple used software is Modscan. In this post, we will see how to use Modscan software for checking Modbus communication.
When you download the setup file of Modscan on your PC, you will see the following files below. As per the image, double-click the application file. Directly, the software will run through this, without a need for installation.
Download Modscan Software: Click Here
As soon as you run this application, you will get four popups asking the user to register. This is shown in the figure below.
You just need to press the Esc button every time a popup appears. It means you can run the software for a demo time of mostly 5 minutes.
Then, the software will expire and you will have to close the software window and again follow this process to start running it once again.
Once you have closed all four of these windows, you will get the following window as shown below. This is the main running window.
Here, you have to choose all the parameters required to establish successful Modbus communication with the device connected.
Enter the following details first – register address, length, device ID, and register type (function code).
Once you have entered all these parameters, the next step is to connect the device. Click connect in the connection tab of the toolbar, and you will get the following popup as shown below.
This setting allows you to connect to the device by choosing any three protocols – TPCIP, RTU, and ASCII. If you are connecting to a Modbus TCPIP device, then just select Remote Modbus TCP server as shown below and enter the IP address of the device in the next tab (shown below as 192.168.1.192).
Keep the service port as 502 and just hit the OK button.
If you are connecting to Modbus RTU or ASCII device, then first click protocol selections as shown below and you will get the following popup.
Before that, change the connect using the tab to the COM port of your PC.
For example, if you have connected your USB to a serial converter in COM1 of your PC, then select the option as shown below and enter details like baud rate, data length, parity, and stop bit.
After clicking OK, if the device has established communication with the PC, then it will show the values, else it will give errors depicting what is the issue.
You can change the display format option as shown below, for viewing the data in the required format.
In this way, we saw how to use Modscan software on a PC to check Modbus communication with the device.
If you liked this article, then please subscribe to our YouTube Channel for Instrumentation, Electrical, PLC, and SCADA video tutorials.
- MOVE Instruction in PLC
- Allen Bradley PLC Hardware
- Motor Classic Control Circuits
- Control System Cyber Security
- How to Design an Effective HMI?