LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Front panel : bottom part not updating at runtime

Solved!
Go to solution

Hi all,

We are a NI Alliance member and have +20yrs of experience in LabVIEW development.

In my current LabVIEW project, I am experiencing strange front panel behaviour, and have had this problem in previous projects.

 

This is the front panel of my user interface VI (created in LV2015) :

foto1.jpg 

 

What I am experiencing is this :

When the VI is running, the bottom part of the front panel is frozen. To make things clear, I've edited the upper screenshot with paint, and drawn a red horizontal line. See screenshot below. When the VI runs, nothing below this horizontal line is updated.

At first it seems more like an issue with the graphics card, but it is only this VI.

At the left of the screenshot, you see that we are using tab-buttons to select tab pages in the user interface.

Below you see more screenshot when these other tab pages are selected. You see here clearly that the upper side of the VI is updated (selected tab is showing, but that the bottom part is 'dead'.)

When the VI is not running, the front panel is behaving fine. Then I can switch the tabs fine.

There is also no object of this dead size/position somewhere. Seems like an arbitrary dead zone.

 

Some notes :

- I have had this issue in the past as well (using LabVIEW 2011).

- the position of this "line" is always the same. No idea why exactly at this position.

- Tried multiple things to solve it : forced recompile (ctrl-shift-run), saving as, saving for previous version, opening on other PC.

- So far I have no solution, except rebuilding the VI (by copying everything from the block diagram to a new VI, and then recreating the front panel).

 

Seems like a LabVIEW bug to me...

 

foto5.jpg

 

foto2.jpg

 

foto3.jpg

Does anybody have any advice?

 

 

 

 

 

 

 

0 Kudos
Message 1 of 13
(4,952 Views)

Please share your .vi file

CLD
0 Kudos
Message 2 of 13
(4,929 Views)

Attached you'll find a ZIP with the User Interface and all its subVI's so that you can run it.

 

The Main VI :

..\Broken user interface\User interface\User interface.vi

0 Kudos
Message 3 of 13
(4,923 Views)

Wow!  A State Machine with States named 0, 1, 2, 3, 4, 5, 6, 20, 98, and 99!  So logical, so easy to understand what you want to have happen.

 

Suggestion -- learn about Enums and name your States, for example, Initialize, Check Message, Update Status, Update Stations (I'm using the names you thought to put in as Comments, but what should "Update Stations" be assigned the State value "3"?).

 

Learn about sub-VIs.  Learn about Loops.  Learn about Clusters, Arrays, and For Loops.  Many of these States do the same thing over and over, taking huge amounts of space -- this cries out for Arrays and a single For Loop.

 

One nice thing about such simplification is that you can "choose" to wire "1" into the index of the For loop and just initialize (or whatever you are doing) a single control.  Does this make a difference?  Is this a "run-time error" or a "programming mistake" (i.e. you accidentally drew a rectangular box of height 1 when you meant it to be height 15)?  Hard to tell by looking at the code, and tedious to debug with all of those "are these really identical, or is there a subtle difference in the 7th one" patterns on each Case instance.

 

Bob Schor

0 Kudos
Message 4 of 13
(4,892 Views)

Hi Bob,

 

I should have known that somebody was going to answer this post, only to complain about code structure.

As a LabVIEW trainer, giving LabVIEW advanced courses for more than 10 years, I am really not helped by comments such as 'learn about loops and arrays and clusters'.

 

Just run the code, click on the left buttons to select the other tabpages and see if you see the same thing happening on the front panel as I do.

Or better yet, please don't reply to this post again.

Thx,

Thomas.

0 Kudos
Message 5 of 13
(4,886 Views)
Solution
Accepted by ThomasV

Can't run, some external libraries missing. What toolkits does it need?

 

Nolib.png

 

But yes, even in edit mode there are some redrawing issues, even in LabVIEW 2018.

I agree there is something wrong.

 

Diagram size is not outside the valid range, but there are tons of overlapping objects. Hard to tell if that's the cause of the corruption.

 

If I go to the diagram, ctrl+a (select all), ctrl+c (copy), open a new VI and ctrl+v (paste) to the diagram it looks better to me, so please try that.

0 Kudos
Message 6 of 13
(4,877 Views)

Sorry, Thomas, I didn't realize your many years of experience from looking at your code.  I apologize for mis-judging your efforts (there have been many posts with very complex UIs that make my eyes glaze over).

 

I also apologize for not just trying to run your code.  You are correct, it does execute (I'm not sure why Altenbach had trouble running it ...).  I normally have my Laptop set up as 1920 x 1080, and have the scale set to 125% (or else it is too difficult to read the text).  When I do this and run your code, this is what I see:

1920 x 1080 x 125%.png

As you can see, it appears to fill the screen about where you drew your line.  Unfortunately, the "Stop" controls appear to be "off screen", but Ctrl-Alt-Del gets me Task Manager and I can stop LabVIEW and try again.

 

I then tried 1920 x 1080 at 100% scaling (Windows 10 told me it recommended 125%, but then the UI wasn't all visible ...).  This was a bit better --

1920 x 1080 x 100%.png

Now I can click on the last item on the left hand list and get the Program to stop itself.

 

So my conclusion is that your code largely works, at least on my Dell Inspiron running Windows 10 x64 Version 1803 and LabVIEW 2016, 32-bit.  To see the full screen, without funny lines (and the intervening screens appear to be "normal"), a Screen resolution of 1920 x 1080, with a 100% scale, shows everything.

 

I'm sorry that I can't tell you why it doesn't work on your system.  It may have something to do with the Display settings you are using, as that certainly had an effect on my machine.

 

Bob "Chastened" Schor

0 Kudos
Message 7 of 13
(4,859 Views)

Hi altenbach,

He is using NI-Vision , just delete those 3 objects and turn your code able to run.

CLD
0 Kudos
Message 8 of 13
(4,854 Views)

Hi,

 

Thanks for confirming the issue.

 

You had the same idea as I did : In the past I was only able to solve the issue by recreating the VI. This goes pretty fast by copying the diagram and then cleaning up the front panel. So I did this again and the issue is gone.

 

The issue is indeed probably due to the fact that the front panel is pretty complex.

The reason for this is that our GUI-standard requires multiple 'pages'. I prefer to use tabpages instead of SubPanels. These tabpages require however all objects to be in 1 front panel and this results in multiple 'overlapping' front panel objects.

 

 

0 Kudos
Message 9 of 13
(4,832 Views)
Solution
Accepted by ThomasV

Hi,

 

I got feedback from NI themselves.

 

They confirmed the issue, and found a way to repair the VI :

----

The workaround involves disabling and then re-enabling the front panel updates property (Defer Panel Updates). The attached screenshot shows that. 

----

Need to do this 1 time, and the VI is repaired.

 

Thomas.

 

Message 10 of 13
(4,766 Views)