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
New Member
Members
Forum Posts: 1
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: 792
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: 52

Currently Online: japedGAL
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

pramanj: 86

hbrackel: 74

ibrahim: 65

kapsl: 57

gjevremovic: 49

TimK: 41

fred: 36

Fransua33: 35

Rainer Versteeg: 32

peterrob45: 25

Member Stats:

Guest Posters: 0

Members: 633

Moderators: 10

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 664

Posts: 2891

Newest Members:

TheChosenone, alj2017, Cliftonol, erno, JackieStync, gbalychik, broessl, axelyz, powerastroguru, Thomas Reuther

Moderators: Jouni Aro: 792, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 218, Heikki Tahvanainen: 264, Jukka Asikainen: 1

Administrators: admin: 0