09-21-2016 02:38 PM
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 ?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-21-2016 02:39 PM
OK that seemed to work...
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-21-2016 02:40 PM
Other question still won't post, either from Safari, or from Chrome.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-21-2016 02:47 PM
You are only scratching the surface of what is wrong with the new board layout.
09-21-2016 02:51 PM
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-21-2016 02:52 PM
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
EXCEPT
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.
Great.
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?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-21-2016 02:53 PM
But I can post the question in THIS post....
Weird.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-21-2016 02:54 PM
No - I can't !
I posted the original question in this post and it appeared in the list of replies.
Now it's not there.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-21-2016 03:05 PM
Does it contain any words that might be considered spam?
09-21-2016 03:18 PM - edited 09-21-2016 03:20 PM
Not really spam, but it apparently objected to the word "f r e a k i n ' ".
I changed that and it posted and stayed...
NO, IT DIDN'T.
Blog for (mostly LabVIEW) programmers: Tips And Tricks