Customer question about _svmgrQuality

4 Posts
3 Users
0 Likes
24 Views
(@js.lee@arcinfo.com)
Posts: 0
New Member Guest
 

Customer from Australia is throwing at us some very technical questions again.
I think it would be best to just paste his ticket questions here:

Peter Stewart Today 07:34 am

We are interested in reading this value _svmgrQuality,
but current OnDataValueChange2, returns
_svmgrVarStatus

In the header file:
// VarAdvise - Begin an advise on the value, timestamp and quality of a variable

So it seems OnDataChange2 should supply the quality, but it supplies the status.

Is it possible to read the quality?
Or only the status?
Is quality a write only property?

Can you also advise us on what VarRecords() does.

Hi,
Can you provide the mapping of the status to quality fields.

eg. How do I identify good, bad, badcomms, badformat, badwatchdog (see below), in the status structure.

thanks,

typedef enum
{
svmgrQuality_Good = 0x00,
svmgrQuality_Bad = 0x80,
svmgrQuality_Bad_CommunicationFailure = 0x81,
svmgrQuality_Bad_BadFormattingValue= 0x82,
svmgrQuality_Bad_WatchdogFailure = 0x84

} _svmgrQuality;

Also in another one;

Can ReadGroup be used to read VT_ALARM type variables?
It seems when we read VT_ALARM type variables the results field of OnReadGroupComplete() is always false.
We expect to be able to read all variables.

He sent an example too.

 
Posted : 30/09/2013 1:28 pm
f.martin
(@f-martinarcinfo-com)
Posts: 148
Member Admin
 

Hello,

I guess your Customer is using at least a version 11.0 of PcVue or higher. The SvMgr toolkit

1/ the _svmgrVarStatus sent by the OnDataChange2 function
With this property, you're able to to know the state of your variable. The first member available is "IsValidState()" which returns a boolean value indicating if the value has a Good quality or not.
With the submember Status.State, you are able to know the exact state of the the value (I'm not sure that it works well)

2/ The _svmgrQuality structure is only used with the functions SetDataSet, VarRecords and SetGroupQuality which are write functions. So we can assume that it's a write only structure.

3/ The VarRecords functions alows you to force the archiving of logs into your archive unit.

4/ The ReadGroup function is quite new as it's available only since version 10 or 11. This function enables you to read a set of variables that you've created with the functions CreateVariableGroup and AddVariableToGroup. I don't exactly how these functions works as I never used them. If they've sent a project, you can attach it, so that we will be able to check if it's correct or not.

But befor answering, you should first ask them: what do you want to do with the SvMgr ? Do you really need the exact status of the variable or not ? What do you want to do with the ReadGroup function ?

 
Posted : 01/10/2013 1:47 am
(@js.lee@arcinfo.com)
Posts: 0
New Member Guest
 

Okay, thank you again. However, I got advice from Manu that the VarRecords isn't even qualified yet, so he shouldn't touch that function at all for now.

This customer has been exploring a lot with these functions, there are some that he wants to use for his project and some that he is just trying to learn about. I think.

Also I thought I managed to attach that project of his. Let me try again.

Oh, and he isn't using version 11, but 10.0 SP1. It seems he mostly uses 15000 for his tests, though his team does have access to the 16000+ builds.

 
Posted : 01/10/2013 6:40 am
ED
 ED
(@e-duvalarcinfo-com)
Posts: 138
Estimable Member
 

for inforlation if somebody is interested:
This code shows to translate status structure quality to the enumeration:

if( VarStatus.Status.State.bRaw == 0)
Quality = svmgrQuality_Good;
else
if( VarStatus.Status.State.bits.NonAccessible )
Quality = svmgrQuality_Bad_CommunicationFailure;
else if ( VarStatus.Status.State.bits.BadFormat)
Quality = svmgrQuality_Bad_BadFormattingValue;
else if ( VarStatus.Status.State.bits.Watchdog )
Quality = svmgrQuality_Bad_WatchdogFailure;
else
Quality = svmgrQuality_Bad;

 
Posted : 17/10/2013 4:53 pm