13:29, EEST
March 26, 2021
Hello,
When the OPC client makes a request for the value of a variable (TUAVariable.Value), the first time the value is not yet available, and the client receives BadAttributeIdInvalid.
To avoid this, in the UA server, I would like to assign a temporary value (generally 0) to the variable (TUAVariable.value) with a “bad” attribute, but I can’t figure out how to do that? Is this possible?
I’m using the last version 7.5, for Delphi 10.3. In this version the online help (sentrol.chm) doesn’t work, which could have helped me to find the necessary information. With the reference pdf, it is much more difficult.
Thanks in advance
Best regards
18:50, EEST
March 26, 2021
I finally did this to adjust the StatusCode of my variables according to the availability of their value, e.g. to change to a bad value:
if UAVar.DataValue.StatusCode.IsGood
then UAVar.DataValue:= TUADataValue.Create(Bad);
It seems to work. The value of the variable is Null for the OPC client when the status is bad.
12:24, EEST
December 21, 2011
Hi Denis,
Good that you managed to sort it out and sorry that the support was not available last week due to holidays.
This is the way to do, it, although typically, you would like to use specific status codes (e.g. Bad_OutOfService), instead of the plain Bad.
The operation level status codes, which can be used (although not all are valid for data access), are defined in the Part 4, Table 183 and more specific Data Access codes in Part 8.
Most Users Ever Online: 1919
Currently Online:
59 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: 734
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1