Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Need write Event on the OPC provier!
September 10, 2012
7:16, EEST
Forum Posts: 5
Member Since:
September 4, 2012
sp_UserOfflineSmall Offline

Hi !
When then client write a value to “My.OPC” Server, how to know?
I don’t want “TPsVars.OnChange”, because I don’t know how determine it’s the sever self write or the client write.
From the client write to server, server must be write to PLC, have another solution.

Best regards

September 10, 2012
10:35, EEST
Jouni Aro
Forum Posts: 1007
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

It is currently not possible to tell where the change is coming from.

In principle, you should write the “server changes” using SetPropValueAt, which “forces” the change into the variable. The “client writes” use PropValue-property. However, they both trigger OnChanging and OnChange, so you cannot tell which one was called at that point.

The only solution is to mark the variable, for example, using the Tag property before you are writing “server changes” and check the value of Tag in OnChanging or OnChange.

In OnChanging you can reject the change as well, in which case it will not be written to the variable at all. Except when SetPropValueAt is used, in which case the result of OnChanging is ignored.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 130

pramanj: 86

Francesco Zambon: 78

ibrahim: 75

rocket science: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 731

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1450

Posts: 6201

Newest Members:

jadadibdin6, DiianaZof, antoniettakarn, Tor, Arktistync, floybateson9, inilarythikibia, celinamcguire5, helenblodo

Moderators: Jouni Aro: 1007, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 970, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 311, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1