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: 1015
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:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 142

pramanj: 86

Francesco Zambon: 83

rocket science: 82

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 704

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1482

Posts: 6316

Newest Members:

samui, TommyDab, wross, Jeremyknock, Pedromon, DonaldEdism, Miguelplese, Scotanine, katesalas95, Petertum

Moderators: Jouni Aro: 1015, Pyry: 1, Petri: 0, Bjarne Boström: 994, Jimmy Ni: 26, Matti Siponen: 330, Lusetti: 0

Administrators: admin: 1