08-21-2007 04:27 PM
08-21-2007 04:35 PM
08-21-2007 04:39 PM
08-22-2007 09:13 AM
I haven't done this before, so I had to figure it out myself. See attached.
You can feed the Shared variable to a Datasocket read. You can use the Variant get attributes to get the Quality of the data. I found that I got a 64 for no known value and a 0 for a good value. I don't know what the other codes would be.
There may be better and cleaner ways to do this. If so, perhaps someone else can comment into this thread.
08-22-2007
02:46 PM
- last edited on
10-23-2025
01:02 PM
by
Content Cleaner
I found a NI document listing all of the shared variable error codes here. They also attach zip file with a VI and enum control that you can use in your code to decode the shared variable quality from the numeric code it returns.
I did find 2 errors in their document and VI's that seem to be repeated throughout much of the documentation.
1. A bit is set for each error present. For some reason, they number the bits as 1 through 32 rather than 0 through 31, which goes against generally accepted practices of decoding bytes. So no known value is error code 64. That is 2 to the 6th power. Yet they call that bit 7.
2. For some reason they mispell the word existent (as in non-existent) as "existant".
These are things that could be easily corrected in their VI's if you use them, or beware of when comparing their documentation to the returned numeric code.