This is the first in a potential series called Tutorial Tuesday where I post a quick tutorial on some technical task that you may be working on. If there is a tutorial that you would like me to put together let me know on twitter @jmkengineering.
This tutorial topic comes from the need to get some VTScada data from my local home energy management system into my ClickPLC that is controling the thermal ETS. Rather than adding all this information into a massive post there, I thought that it would make more sense to have its own article.
Setting up the ClickPLC
The first thing we need to do is set up the PLC.
1 Enable Modbus TCP Server
We want to make sure that Modbus TCP Server is enabled, take note of the TCP port number, you will need that when setting up the Port and Driver in VTScada.
2 Setup Send Communication Block
Next you will create a Communication Send block.
This block will SEND data from the PLC to the VTScada application.
If you want a "fuller" understanding of all the fields Automation Direct has a detailed page on the send instruction for Modbus TCP on their website.
3 Setup Receive Communication Block
This is exactly like the send above and looks like this.
And like the send, Automation Direct has a help page for the Receive Instruction: Modbus TCP too.
If you have configured any Modbus device on VTScada this will be exactly like those. For this example I will just show the highlights without going into details. 
1 Configure the Port and Driver
This is straight forward, first the TCP port:
Make sure that the IP address matches the PLC.
Then the Modbus Driver.
The only thing you have to make sure of is that the driver is set for Open Modbus TCP.
3 Did it work?
Yes, here are the values in VTScada
and the values in the PLC
Let me know what you think of this post on Twitter @jmkengineering and share it with all your colleagues.
The Last Bits
|||I'm using VTScada version 11 at home. Its old, but it works and I don't upgrade production equipment without strong justification. I may have to write an article just on that topic at somepoint.|
|||VTScada has an option to allow writing with status tags, but it didn't work the first time and I don't have time to troubleshoot today, maybe another future article.|