In this video I'll be showing you how to get the CLICK PLC and the Solo Temperature Controller
communicating with each other.
The first thing we need to do is setup the Solo so that it will communicate with the
CLICK.
Refer to the Solo manual for details on how to set the various parameters.
First we need to change the on-line configuration from off to on.
Next, we need to change the Modbus Protocol from ASCII to RTU.
Once, you've done that we need to change the network address.
By default the network address is 1 but the Solo is only able to be a slave device.
So you can pick any network address that isn't 1.
I'm going to go ahead and choose 2.
You want to go through and check the Baud Rate, the Parity, and the Stop Bit.
You may want to write these down because we'll need them when we go to setup the CLICK.
Now that the Solo is setup for communication we need to setup the CLICK.
Now in the CLICK programming software we need to setup the com port we will be using.
The Solo is only able to communicate through a RS-485 port.
I am using a CLICK that has a RS-485 serial port built in.
If you are using a CLICK that doesn't have a built in RS-485 port you can use a converter
that converts RS-485 to RS-232 which you can then plug into port 2 on your PLC.
You can find a converter on the Automation Direct website using part number FA-ISOCON.
You can get to the com port setup menu by clicking on setup and then com port setup.
We want to configure Port 3, which is the RS-485 port, so go ahead and click on setup.
Make sure that the node address is set to 1.
Setting the node address to 1 is telling the CLICK that this port is the master and not
the slave.
You want to make sure that the baud rate, the parity, and the stop bit match what you
saw on the Solo.
You can change the baud rate, parity, and stop bit but just make sure that they match
up on the CLICK and the Solo.
So go ahead and hit ok and ok again.
Now that the CLICK and the Solo have been setup you can start to send and receive data.
To test the communication let's receive the temperature that the thermocouple sensor is
reading and store the temperature into a variable.
So we need to drag a receive command into the program.
We need to change the com port to port 3.
Change the Slave ID to whatever you set the network address to in the Solo.
In my case I need to set that to a 2. Make sure the Modbus Function Code is set to 03
- Read Holding Registers.
You can leave the Addressing Type alone for now.
Now we need to put in a slave address.
You can find all the slave addresses for the Solo in the manual under chapter 7.
For our example, we want to read the temperature from the Solo into a data register in the
CLICK.
The slave address in the Solo that holds this data is 4,097.
With MODBUS addressing we must include a function code at the beginning of the request.
The function code relates to a certain register type.
A 0 relates to Coils, a 1 relates to Input Bits, a 3 relates to Input Registers, and
a 4 relates to Holding Registers.
So, while the desired address is actually 4097, we have to put a 4 in front to denote
it as a holding register.
And because CLICK requires it to be a six digit number we need to put a 0 after the
Function Code and before the desired address.
The Master Address is where you want to store the data that you receive, so I'll go ahead
and choose DS1.
In this example we only want one byte of data, so make sure the Number of Master Addresses
is set to 1.
The status flags are used to let you know the condition of the command.
You can set these to whatever you want.
I'll set Receiving as C1, Success as C2, Error as C3, and Exception Response as DS2.
When the command is receiving, C1 will energize; when the command is successful, C2 will energize;
and if there was an error during the command, C3 would energize.
If you get an error you can view the value stored in the tag that you set for the Exception
Response value.
The error code will be stored in that variable.
We are all done in the receive command and you can go ahead and hit ok.
We need to add an edge contact on the first rung.
Type in SC7.
SC7 is a one second clock.
So every second the rung will energize and we will receive data from the Solo.
Don't forget to add the end statement, and then go ahead and download your program to
the PLC.
Put your PLC in run mode and then turn status monitoring on by double clicking.
You can verify the temperature by looking at the Solo, and sure enough they are the
same.
This was a very simple example of what can be done when you have a CLICK and a Solo communicating
with each other.
Now that you have them communicating the possibilities are endless!