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

Hello, Can anyone recommend an expandible IO module with OPC UA? I've deployed the Emerson RSTIO-OM module and it works great, but it has a...
Replies
0
Views
62
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
291
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
239
If anyone has a crack for IBH OPC Server, please send it to: [email protected] Urgently. Thanks in advance!
Replies
1
Views
151
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
206
Back
Top Bottom