Category Archives: Modbus RTU

Serial communication protocol. This is usually RS232 or RS485.

Click PLC Serial Communication Timing


Many questions come from serial communications using the Click PLC. Most of these questions deal with communication timing when using multiple send and receive instructions. We will show you how to deal with serial communication timing in the Click PLC.
Receive and Send instructions will allow you to send and receive serial data to an external device. The communication method that you set up can be ASCII or Modbus. ASCII (American Standard Communication for Information Interchange) can be used to send to devices such as a printer. Receiving ASCII can be used for connecting barcode scanners to the PLC. The barcode will be read as an ASCII string in the PLC. Modbus serial communication (Modbus RTU) is a standard protocol used in many automation devices.
Click PLC Serial Communication Timing
We will demonstrate the Send and Receive instruction by communicating Modbus RTU to a Solo Temperature Controller. Parameters from the Solo process temperature controller will be read using multiple receive instructions. The send instruction will be used multiple times as well to set the Set Value (SV) and Limits of the SV value entered in the temperature controller. The set values will only be changed when required. Let’s get started. Keep on Reading!

Raspberry Pi Serial Port Programming


Node-RED will be used on the Raspberry Pi 4 to communicate serial Modbus RTU to a Solo process temperature controller and Click PLC using twisted pair RS485. This will be done on the same serial network so the devices will be daisy-chained together on the two wires.
Raspberry Pi Serial Port Programming
We will be reading the PV (present value) and SV (set value) of the Solo temperature controller and then writing these values into the Click PLC. An SV value will then be read from the Click PLC and if it has changed, the value will be written to the SV of the Solo controller. Let’s get started. Continue Reading!

Waveshare USB to Serial PC Installation


We will be installing an industrial USB to RS485 converter on our computer. The Waveshare USB to serial port is a 2-wire USB to RS-485 serial communication adapter for RS485 use. It does not require an external power supply or complicated configuration.

It has a Type A (plug) USB connector for the computer side and screw terminals for the RS485 connections. This is an industrial USB to RS485 converter that has an FT232RL chip inside. It features embedded protection circuits such as lightning-proof, resettable fuse, ESD (Electrostatic Discharge) protection, and TVS (Transient Voltage Suppression) diode, etc. All of these features are packed within a small form size.

Purchase at Amazon.com
We will be installing the driver for this USB to serial converter and connecting it to our computer. Node-RED will be used to communicate Modbus RS485 protocol to a Solo process temperature controller. Let’s get started. Continue Reading!

CH340 CH341 USB to Serial PC Installation


We will be installing a USB to rs485 installation on our computer. The CH340/CH341 USB to Serial port is a 2-wire USB to RS-485 serial communication adapter for RS485 use. It does not require an external power supply or complicated configuration.

It has a Type A (plug) USB connector for the computer side and screw terminals for the RS485 connections. The CH340/CH341 USB to serial device supports multiple baud rates and has a thumb drive design.  Let’s get started installing our USB to RS485 adapter. Continue Reading!

Node-RED SQL Database Spreadsheet Connection


We will now look at the connection to our SQL database using a spreadsheet application. Previously we used Node-RED to communicate Modbus TCP and RTU to our Click PLC and Solo Temperature Controller. The information collected from the controllers was then put into an SQLite SQL database.
Node-RED SQL Database Spreadsheet Connection
Spreadsheets like Excel are great for analysis of the data. We will be connecting to our SQLite SQL database with WPS spreadsheets. This will be accomplished by using an ODBC driver as the translator between the database and spreadsheet. Let’s get started. Continue Reading!