OPC synchronisation

xzen

Lifetime Supporting Member
Join Date
Jun 2006
Location
Oslo
Posts
97
Some data are presented in PLC (S7) as (classic) OPC tags. When data is ready to be read by other system, an integer trigger value is incremented. Now I set the data and trigger value in the same PLC program scan, assuming that OPC tags are updated synchronous. But I get some indications that this mechanism is not trustworthy. My question is, if it is not synchronous, then how do I know when it is safe to set the trigger?
 
Maybe you can send a number in a word to OPC, increment it when you send and done. Then do a test on the OPC server compare new data to last , then set a bit. This bit says its new data on OPC server.
 
You cannot assume that the OPC DA tags are updated syncronously.
Here are 4 methods to assure that the data is consistent.

1. Instead of the OPC client polling the tags, you can let the PLC send the data to the OPC Server via send/receive.
The usual OPC DA name will be something like Simaticnet.S7[..] or Simaticnet.SY[..], but for the send/recieve interface it has to be Simaticnet.SR[..]
(this from memory, so dont kill me).

2. Let the PLC increment a counter to indicate when new data is ready. Let the OPC client read all the data as an array, including the counter. Then evaluate the data in the OPC client software when the counter tells that there is new data.
I think this only works as long as the array isnt bigger than the PDU of the S7 CPU.

3. Same as 2, except if the amount of data is bigger than the PDU of the CPU, then a trick is to let the counter be the very last position in the array. In this way, when the OPC client senses that the counter has changed, all data is updated even if it spans multiple reads.
I think this is only safe if the data doesnt change too often.

4. Let the PLC increment a counter to indicate when new data is ready. Let the OPC client read only the counter cyclically. When the OPC client detects that the counter changes, then initiate another read of the net data, preferably as an array.
 
I believe that there is a 5th method.

If you read all data as an array, and then in the OPC client evaluate the 'quality' status of the data, if the quality af an array is 'good', then it is consistent, even if it spans multiple PDUs.

Disclaimer, I am not a programmer of OPC clients.
 

Similar Topics

I am running CCW 13 trying to upload to a micro 820 vers.12 I get an output message OPC server is unable to load project controller. Please help!
Replies
5
Views
237
I know nothing about simaticnet OPC server. I do know Kepware. I would only ever scale raw to engineering in the PLC, but it is possible to scale...
Replies
5
Views
219
If anyone has a crack for IBH OPC Server, please send it to: [email protected] Urgently. Thanks in advance!
Replies
1
Views
133
Folks, I have a client with an old ABB Advant / MOD300 system (v14.4). Around y2k I installed the ABB Industrial IT MOD300 OPC Server 1.1/2...
Replies
1
Views
184
Hi good day Everyone, I have a cimplicity v10 project with 7 to 8k tags communicating with AB PLC through OPC and Rslinx classic. I have this...
Replies
3
Views
225
Back
Top Bottom