Avatar

Please consider registering
guest

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
Avatar
gbird
Member
Members
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
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
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:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6260

Newest Members:

sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

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

Administrators: admin: 1