14:19, EEST
October 27, 2014
Imagine that you have an OPC server (SRV1) with a boolean tag and two clients reading this tag in async mode (CL1 and CL2).
CL1 use the value of the tag (using the OnChange event) to set a string tag of another OPC server (Prosys Provider – SRV2).
The CL2 have the tag in SRV1 and the one in SRV2 configured with the Onchange event for both. Lot of times the CL2 client reachs the event of the tag in SRV2 (which depends on the change of the value of the tag in SRV1) before the event of the tag in SRV2.
The question is clear: why? because the logic says that if to change the tag in SRV2 you need that the tag in SRV1 change, you always detect first the change of SRV1 tag and after the change of SRV2 tag. But the reality doesn’t seem to be this way
The problem is that, in CL2, I have the string tag changed and if I try to evaluate the value of the SRV1 tag I read an incorrect value because the tag value hasn’t change yet.
Attempting to avoid this behavior, I try to force the SRV2 connector to refresh the values (Refresh) in the CL2 when the string tag change. I have the same problem and I don’t know why. Is the Refresh function really force the client to read the server’s tags ? Is there a type of read cache ?
9:17, EEST
December 21, 2011
Yes, I believe this may be complicated to get synchronized.
If the clients are asynchronous (TPsOPCConnector.Async = True), then Refresh() will make an asynchronous refresh call to the server. Otherwise, it will make a synchronous read call to the server. You can use TPsOPCConnector.OPCGroup.SyncRefresh() to make a synchronous read even when the client is in async mode.
Most Users Ever Online: 1919
Currently Online:
20 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 727
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1