0:00
Welcome back. Today we will explore
the CLICK PLC Modbus ASCII protocol
0:04
This communication will be implemented in PLC
ladder logic and will occur through the serial
0:09
port RS485 to a solo process temperature
controller. Modbus ASCII is a communication
0:15
protocol used for transmitting information over serial lines between electronic devices.
The device requesting the information is called the Modbus Master and the devices supplying
0:25
information are Modbus Slaves. Originally developed by Modicon Systems, the Modbus
protocol comes in three types, Ethernet Modbus TCP, Serial Modbus RTU, and Modbus AC
0:41
We will connect the CLICK PLC to a solo process
temperature controller using the Modbus ASCII
0:46
protocol over serial RS485 communication wire.
The present and set values PV and SV will be
0:55
read from the solo controller and the set value
will be written when required. Let's get started
1:01
First, we need to set up the communication
parameters in the CLICK PLC. Using the CLICK
1:06
programming software, call up COM port setup
from the main menu and select setup under port 3
1:13
Choose ASCII for the protocol and match the
communication parameters to those of the solo
1:17
controller. 19200 baud, even parity, 7 data
bits, and 1 stop bit. Next, configure the solo
1:26
temperature controller. Change the online
configuration to on and set the Modbus settings
1:32
to 19200 baud, even parity, 7 data bits, and
1 stop bit. Leave the default unit number as 1
1:40
Modbus ASCII marks the start of each message with
a colon character and ends with carriage return
1:45
and line feed characters. Here's an example of
a sent data message from the master and the
1:49
response from the slave. Now, let's program the
CLICK PLC to communicate with the solo process
1:54
temperature controller using the Modbus ASCII
protocol. We will read the PV and SV values and
2:01
write the SV when required. When the value in DH20
changes to greater than zero, it will be written
2:06
into the solo controller. The subroutine will
perform the Modbus ASCII protocol to send and
2:12
receive data. The Modbus ASCII send message
will look like this, colon 01031000002EA
2:22
The receive message will look like this, colon
010304XXXXYYYYZZ. When the correct number of
2:33
return characters are received, the done bit is
set. All communications will have a time delay
2:39
of at least 10 milliseconds. The returned ASCII
values will be converted into hexadecimal values
2:45
to get the solo present and set values. Using
Data View, we can change the set value of the
2:51
controller. Watch the video below to see
the running and configuration of the Modbus
2:56
ASCII serial communication from the CLICK PLC
to the solo process temperature controller
3:02
Here are the response codes that can be returned
by the solo process temperature controller
3:06
to help troubleshoot your communication. Thank
you for watching. If you have any questions or
3:12
need further information, please contact me.
Watch on YouTube. Click PLC Modbus ASCII protocol
3:20
Links to resources and software in the description below