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
TPsVar.SetPropValueAt Method working improperly
July 27, 2017
1:45, EEST
Avatar
ChilsonR
Watertown, SD, USA
Member
Members
Forum Posts: 3
Member Since:
July 26, 2017
sp_UserOfflineSmall Offline

I am using this function to set the values of both the Value and first two bits of the Quality properties… More on the Quality property later. When using this function with the enumerated quality flags of vpqGood and vpqUncertain, the value provided is moved into the OPC provider item store and can be seen by your provided test client. But when using the flag vpqBad, the value is filled with #EMPTY as again indicated by your client. To test this, use your Tutorial Lesson 8, then assign the new variable “Pressure” as added to the customized address space found on pg 44 of your PDF document, and now place an integer value of 6 as I attempted with the following statement:

(using Borland 2007 C++)
Pressure->SetPropValueAt(vpValue,6,vpqBad,UTCNow(),false,vdtInteger,false);

Then accessing this OPCprovider(server) you will find the item Pressure now has a value of #EMPTY, but a quality flag of Bad. The actual behavior I believe and tested under other OPC implementations is that the value would be passed in, but flagged as bad. The reason for this, is that you should be able to retain the last known good value of an item, not an #EMPTY value. I have tried various tricks, using the direct value property assignment first and leaving a blank/null value in the SetPropValueAt() call, placing another value other than the first assigned to see what was kept, etc. All resulted with #EMPTY. The implementation I am doing this project for must publish the last known good value even if bad, it is for a large state estimator project for a large segment of the US grid. I will be publishing approximately 40,000 items with 2 second scan rates. Please advise how I might be able to achieve this.

Now on to the Quality value, this value is comprised of 8 bits and defined as QQSSSSLL, Q the quality, S the substatus and L the Limit status. Since your implementation defines this value as readonly, but does allow one to address the first two bits via the SetPropValueAt() method call; Is there any way that one could also alter the Substatus and Limit status so as to retain data from the SCADA system and adjoining regions ICCP transmitted data? As it would be desirable to place reason code or substatus into this field as well as indicate when a value has exceeded set thresholds such as meter defections, etc. You can find these other codes I am trying to use found in the OPC Data Access Custom Interface Specification V2.05 pgs 163-6.

Thank you

July 27, 2017
11:43, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Thanks for a detailed description.

OPC DA specification leaves it a bit unclear how the Bad quality + Value should be treated. In Sentrol, the interpretation is that Bad means that the value is not available and therefore the Value is always cleared, when status is Bad. OPC UA takes the same approach and specifically demands that the Value must be Null, when Quality is Bad.

If you wish to provide the last known value, but indicate that the quality is not Good, you should use the Uncertain quality: that’s what is there for.

Sentrol design is not based on OPC DA, although it became the major part of the communications (so far). Therefore, the quality coding in Sentrol variables is not following the OPC Quality codes – and so far only the “major classification” between Bad, Uncertain and Good has been available.

But I admit that there should be a way to define custom quality codes as well, when provided for the OPCProvider. We will have to see how this could be possible in future versions.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick

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