Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
5 ratings:
 3 out of 5   

Shared Variable Quality Codes



Primary Software:
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
When I use the Datasocket Read VI to read the value of a shared variable a quality code is returned. How do I decipher what this code means?

Solution:
The shared variable quality is a code that returns information about the status of the shared variable and/or associated process(es). It can represent errors, failures or warnings. It is returned as a 8-digit hexadecimal number that, when converted to binary, represents a specific quality condition indicated by the active bit(s). See the table below for what each bit means. 

 

Quality Bit # Shared Variable Error (hex) Severity Description
IAQ_STALE 1 0x8BBB0000 Warning The value from this shared variable maight not be the most current value from the data source.
IAQ_SENSOR_FAILURE 2 0x8BBB0001 Error/Failure Sensor failure
IAQ_DEVICE_FAILURE 3 0x8BBB0002 Error/Failure General device error response.
IAQ_SERVER_FAILURE 4 0x8BBB0003 Error/Failure Server Failure (This code is used by the Shared Variable Engine when a shared variable has a source, and the source is not available. For example, I bind a shared variable to an I/O Server data item, and deploy the variable, but do not deploy the data item. )
IAQ_NETWORK_FAILURE 5 0x8BBB0004 Error/Failure General communications failure.
IAQ_NONEXISTANT 6 0x8BBB0005 Error/Failure Unable to locate variable in the Shared Variable Engine. Deployment of this variable may have failed.
IAQ_NO_KNOWN_VALUE 7 0x8BBB0006 Warning The shared variable has no known value.
IAQ_INACTIVE 8 0x8BBB0007 Error/Failure The shared variable is inactive.
IAQ_FORCED 9   Warning Reserved
IAQ_LOW_LIMITED 10   Warning Low Limited *
IAQ_HIGH_LIMITED 11   Warning High Limited *
IAQ_CONSTANT 12   Warning Constant
IAQ_SENSOR_INACCURATE 13 0x8BBB0008 Warning Sensor inaccurate
IAQ_EULIMITS_EXCEEDED 14 0x8BBB0009 Warning Engineering unit limits exceeded
IAQ_SUBNORMAL 15 0x8BBB000A Error/Failure Generic OPC Error (Is used by the OPC I/O server to report that OPC returned an error. It's basically "generic error")
IAQ_MATH_EXCEPTION 16 0x8BBB000B Error/Failure Math error
IAQ_COMM_LINK_FAILURE 17 0x8BBB000C Error/Failure Communications link failure
IAQ_CONNECTING 18 0x8BBB000D Warning NI-PSP has not connected to the server yet
IAQ_DNS_FAILURE 19 0x8BBB000E Error/Failure DNS lookup failed for the server.
IAQ_HOST_UNREACHABLE 20 0x8BBB000F Error/Failure The server is not reachable
IAQ_SERVICE_LOOKUP_FAILURE 21 0x8BBB0010 Error/Failure Service lookup failed for the server
IAQ_DISCONNECTED 22 0x8BBB0011 Error/Failure The connection to the server was disconnected
IAQ_PROCESS_FAILURE 23 0x8BBB0012 Error/Failure The process was not found or is not responding.
IAQ_RESOLVE_URL_FAILURE 24 0x8BBB0013 Error/Failure Failed to resolve URL for this shared variable
IAQ_ACCESS_DENIED 25 0x8BBB0014 Error/Failure Read access is denied to the shared variable
IAQ_INVALID_URL 26 0x8BBB0016 Error/Failure Invalid URL for this shared variable.
IAQ_APP_DEFINED_2 27   Warning Reserved
IAQ_APP_DEFINED_3 28   Warning Reserved
IAQ_IN_ALARM 30   Warning Point has an active alarm
IAQ_SUBSCRIBE_FAILED 31 0x8BBB0015 Error/Failure Subscription failed
IAQ_RESERVED 32 0x80000010 Warning Quality bit greater than 32 is set, or there is an error/status reported
 IAQ_RESERVED 33  0x80000010  Warning The shared variable client-side read buffer is full.
 IAQ_RESERVED 34  0x80000010  Warning The shared variable client-side buffer overflowed.
 IAQ_RESERVED 35  0x80000010  Warning The shared variable server-side write buffer is full.
 IAQ_RESERVED 36  0x80000010  Warning The shared variable server-side write buffer has overflowed.

* This code is used by the LabVIEW DSC scaling feature pack. The scaling feature pack allows the user to set an upper and lower bound on the Variable. If the Variable receives a value outside of its configured range, it will coerce the value to range, and set the appropriate limited bit to indicate that the value was modified by Tagger.


NOTE: These quality codes only apply to shared variables. OPC items read using Datasocket Read will also return a quality value as defined by the OPC standard (in this case a value of 192 = good).


The attached zip file contains 3 files:
Shared Variable Quality.vi - a VI which takes a quality code as an input and outputs an array of specific qualities that correspond to that error code.
Shared Variable Quality Enum.ctl - a enum which contains all the qualities (required by Shared Variable Quality.vi).
Shared Variable Quality.xls - The above table as an Excel Spreadsheet.



Related Links:
KnowledgeBase 36BAOBOP : Quality information for OPC Items under LabVIEW

Attachments:


Shared Variable Quality.zip


Report Date: 10/31/2006
Last Updated: 10/24/2008
Document ID: 42UIDM8J

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit