First time posting in a while - I get a stupid error when trying with my real question.
This is just a posting test.
HINT for NI: if you allude to a "highlighted error", it might be helpful to actually highlight something.
HINT for NI: Instead of "there was an error", maybe explain what sort of error occurred ?
You are only scratching the surface of what is wrong with the new board layout.
Tried posting from a Windows box (FireFox) - same as on the Mac - the question appeared in the list, but you click on it and get nothing, and then it's not in the list.
LV 2013, DIADEM 2012,2014, Win7
Not sure if this is a LabVIEW problem or not, but I'd like to find a LV workaround.
My app saves properties in the root level of TDMS files, for compatibility with data files, also TDMS.
I have a VI which will take a reference to any control (any that we use anyway), and store its value into TDMS properties.
For most types, the code to WRITE it is very simple:
For other types, it's a tad more complicated, but not much.
When reading, it's equally simple for most types:
the properties are all VARIANTS - I simply feed the variant to the VALUE property of the generic control, and it's all good. Again, some other types (clusters, arrays) are a tad more complicated, but that's not relevant here.
This all works perfectly - I can pass in a reference to a cluster of arbitrary complexity, and it gets written to the file just fine, and it will read back just fine. The file is readable by DIAdem, which is a requirement. My code even handles arrays and generates names for each item in the control
My problem comes with a BOOLEAN value. A simple, binary, Boolean control.
Could be a switch or slideswitch or rocker, or LED - doesn't matter. Just like the stinkin' "C" language, nobody agrees on how to handle it.
When I write the file from my LabVIEW app, here is what the property looks like:
It shows up as a BOOLEAN. That's right, with a TRUE or FALSE value.
Again, if I read this file right now with my LabVIEW tools, it's all good.
But DIAdem insists on showing it as a 1 or 0, not TRUE or FALSE:
That's STILL OK, because the users can understand it.
The problem is if they EDIT the file, in ANY way, then look what happens to the Boolean when LabVIEW reads it back:
Yes, the edit added some new properties, that's OK.
But it changed the boolean into a U8 !
And, of course, feeding a U8 variant into a Boolean control results in a false always (and an error, I suppose, but I'm not checking.
It's a freakin' BOOLEAN value - it's not that complicated !
So, what do I need to do?
I can have a special case for boolean, I guess I have to coerce the variant into an integer and then check for 0 or not?
Any better ideas?