Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Improving performance with OPC tags

I am working with a PC based automation software package called Think'n'Do created by Phoenix Contact It does real time processing, read inputs/ control logic / write outputs all done in a maximum of 50ms. We have an OPC server that is reading/writing tags from a PLC every 10ms. There is a long delay in writing a tag to the PLC and reading back the written value (Think'n'Do (50ms) > OPC Server (10ms) > PLC (10ms) > OPC Server (10ms) > Think'n'Do (50ms) ) that process takes up to 6 seconds to complete when it should by my math only take 130ms.

Any ideas of where to look or why it might be taking so much longer would be helpful.

like image 964
Tanj Avatar asked Jan 25 '23 03:01

Tanj


2 Answers

It depends on how you have your OPC client configured to pull data. When you subscribe to a group in OPC, you get to specify a refresh rate. This might default to 1s or even 5s, depending on the OPC client. There's also a limit the OPC server might put on the frequency of updated data. This only applies if you have your OPC client subscribing to data change events.

The other way you can go is to do async or sync reads / writes to the OPC server. There are several reading modes as well. Since you are using OPC, you can use any OPC compatible client to test your server, this will tell you if the problem is with a setting in Think'n'Do or is it something with the PLC / server.

The best general purpose OPC client I've used is OPC Quick Client. You can get it with TOP Server here: http://www.toolboxopc.com/Features/Demo/demo.shtml. Just grab the TOP Server demo and install the OPC Quick Client. You can use it to connect to your OPC server and browse the tags and see what the data looks like. The second best OPC client I've used is from ICONICS (called OPC Data Spy) available here: http://www.iconics.com/support/free_tools.asp.

Use the OPC client to see how fast you can read the data. Make sure you set the group refresh rate correctly. I think the tools might provide some timing information for you as well (but you'll be able to figure out a 6 second delay pretty easily).

like image 197
Garo Yeriazarian Avatar answered Jan 26 '23 18:01

Garo Yeriazarian


It sounds as if you are not using the cache in the OPC server. Normally OPC servers have a cache, if your client connects and doesn't specify that it wants to use the cache you don't get the performance that you may need. The OPC server is responsible for refreshing the cache from the device although the criteria for refreshing may differ from OPC server to OPC server.

like image 28
AndersK Avatar answered Jan 26 '23 17:01

AndersK