LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in LabVIEW Table Display

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.

 

Message Edited by CoastalMaineBird on 04-22-2009 07:39 AM
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Download All
0 Kudos
Message 1 of 12
(4,305 Views)

More Info:

If the indicator is DISABLED, it still shows the error.

But if it's DISABLED AND GRAYED, then it behaves correctly.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 12
(4,289 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 12
(4,287 Views)
You're right - I must have gorched something when I tried it before.  Having a background color makes the bug disappear.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 12
(4,282 Views)

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". 

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 12
(4,276 Views)

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

Message Edited by Ben on 04-22-2009 08:41 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 12
(4,261 Views)

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. 

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 12
(4,241 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 12
(4,238 Views)

FWIW,I can use the sequence described:

 

 

  1. Set table status to DISABLED AND GRAYED (just DISABLED doesn't work).
  2. Write new data
  3. Wait T mSec
  4. Set table status to ENABLED.

 

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.... 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 9 of 12
(4,234 Views)

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:

 

  1. Use your idea to set entire background to green (just so I can see it happening)
  2. Write new data
  3. Wait T mSec
  4. Set entire background transparent.
  5. Set column 2 to the colors I want

 

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). 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 10 of 12
(4,224 Views)