04-22-2009 07:35 AM - edited 04-22-2009 07:39 AM
I think I've found a bug in LV 8.6.1's table indicator.
See the pic and attached VI.
The trouble is the indicator doesn't erase old data when it should.
The VI writes "One" to a cell, waits a second, then writes "Two".
The first run is OK, but on the second run, the "One" overlays the "Two" instead of replacing it.
The indicator is transparent, but having a color makes no difference (and it shouldn't).
This forum post says the issue was also in LV 8.2, nothing came of that.
I have reported this to tech support, we'll see what happens.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-22-2009 08:04 AM
More Info:
If the indicator is DISABLED, it still shows the error.
But if it's DISABLED AND GRAYED, then it behaves correctly.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-22-2009 08:07 AM
I think that bug goes back to LV 8.0 but it was only noticed when the background of the table was transparent.
Under LV 8.6 it works Ok if the background is NOT transparent.
So are you sure about the bug when the background is NOT transparent?
Ben
04-22-2009 08:14 AM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-22-2009 08:31 AM
Looks like there's more than one bug.
Notice how the background of the table (in the pic above) is not exactly the same shade of gray as the panel?
If you change the panel color to red or green or purple or something, I would expect the table background to be that same color.
Not so.
Transparent apparently means "a particular shade of gray".
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-22-2009 08:41 AM - edited 04-22-2009 08:41 AM
That gray is due to the style of the table you are using. The "modern" version has an extra decoration. Replace the table with one for the "Classic palette and you will get your transparency along with the same bug.
Ben
04-22-2009 09:36 AM
OK, the "modern" style does introduce the "not-really-transparent" bug.
But either modern or classic - I just can't get it to work right.
I tried displaying an empty array, waiting one second and displaying my data - it won't erase the old.
I tried displaying an array full of empty strings, before my real data and it won't erase the old.
I tried "synchronous display" and not - doesn't matter.
I want to use transparent because in one column, I color the cells RED for danger and yellow for warning, but I want to leave it plain (uncolored) for normal.
I'd rather not have a constant in my code that tries to match the table background color.
I thought I could set the table background to gray, update the data, and set it back to transparent, but there doesn't seem to be a background color property for the whole table, only for a cell.
I could iterate through every cell, set the color to gray, set the new data, set the color back to transparent and have that work, but gosh, what an complicated ugly hack.
Hmmmm..
It works if I set the DISABLED status to DISABLED AND GRAYED, write the new data, wait 200 mSec, then set the status to ENABLED.
That's an ugly hack too, but not so complicated.
Maybe that 200 mSec doesn't work on all machines. It doesn't work with no wait at all.
The thing blinks when it's updated, but I suppose I have to live with that.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-22-2009 09:42 AM
Hi Steve,
If you use cell indexes of "-1" and "-2" you can select all rows columns or the entire the table. Defer FP update before and after to optimize speed.
Ben
04-22-2009 09:47 AM
FWIW,I can use the sequence described:
If T = 9 mSec, it fails reliably,
If T = 11 mSec, it works reliably.
If T = 10 mSec it's erratic.
So I'll set T = 100 and cross my fingers.
Ugly hack, here I come....
Blog for (mostly LabVIEW) programmers: Tips And Tricks
04-22-2009 10:21 AM
If you use cell indexes of "-1" and "-2" you can select all rows columns or the entire the table.
That doesn't work, unless I also do the wait thing. IOW:
That doesn't work if T = 0. T = 9 fails, T = 11 passes, same deal.
Apparently, writing new data triggers a display update AT SOME LATER TIME.
If the color is transparent AT THAT TIME, then the bug shows up.
It's not the color setting at the time the data is written - it's the setting when it's time to actually do the work. (that makes sense).
Blog for (mostly LabVIEW) programmers: Tips And Tricks