LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW display changes when I run a program.

Solved!
Go to solution

I am using LabVIEW 2019 SP1 (32-bit) version 19.0.1f5

 

I have a working program. I line up the GUI perfectly on my screen but when I run the program, it brings me to the bottom of the window. I don't want to reenter my GUI every time I run the program.

 

I have tried adjusting minimizing and maximizing the window and making adjustments. Saving and closing out, but nothing works.

 

Any advice would be appreciated!

0 Kudos
Message 1 of 10
(1,410 Views)

Hi txteng,

 


@txteng101 wrote:
Any advice would be appreciated!

Attach your VI(s) so we can inspect them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(1,380 Views)

Write yourself a simple VI.  (I just did this -- a While Loop with a Numeric (floating) Control, a String Indicator, a Stop Button to stop the While Loop, and a Format Into String to connect the Numeric Control to the String Indicator).  I "save" this VI to my desktop (so I can use it later).  I run the VI -- it stays on my screen right where I left it, I can input Numbers and it displays them, and stops when I push the Stop button.  If I resize the VI and/or move the Front Panel (which only takes up a small part of the screen) and run it again, it (again) runs right where I left it.  But if I close the VI, open it again, and run it again, it runs not "where I last left it", but where (and how big) it was when I last saved it.

 

Nothing magic.  No special Window Properties needed.

 

If this doesn't work for you, then you are doing something "weird" in your VI (which we haven't seen).  Incidentally, I'm also using LabVIEW 2019 ...

 

Bob Schor

0 Kudos
Message 3 of 10
(1,371 Views)
Solution
Accepted by txteng101

In the VI Properties Run-Time Position is the Scroll panes to origin at run time checked?

 

If so uncheck it or move your front panel objects so they line up at the origin.

 

eCapture.PNG  

 

The panel is auto-scrolled to place that little dot in the upper left corner at startup when Scroll panes to origin at run time is checked 

 

eeCapture.PNG 

========================
=== Engineer Ambiguously ===
========================
Message 4 of 10
(1,361 Views)

Thanks, RTSLVU, you can teach an Old Dog New Trix.  I never noticed that little dot on the Windows Run-Time Position page, hence I never used it.  I have, on the other hand, often used the OpenG "Fit VI Window to Largest Decoration", then drawn a Frame around what I want to have displayed.

 

Bob Schor

0 Kudos
Message 5 of 10
(1,331 Views)

Hi RTSLVU,

 

thanks for reminding on that option. It appeared between LV2016 and LV2019, as I can see from the both LabVIEW versions I have installed on my cmputer.

 

As I have the habit of defining ALL frontpanels with their origin in the upper left corner I never need this option…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(1,313 Views)
Solution
Accepted by txteng101

There are (at least) two things I always do for any UI front panel:

 

Make sure that the controls are aligned with the origin dot in the upper right corner, then set it to "Scroll to origin at runtime". Similarly, I set the runtime panel size exactly how I want it.

 

At edit time, my front panel is larger and contains sufficient extra space to temporarily park controls (e.g. when I need to move a few to a new tab), or place controls that only have meaning for the connector pane, but not the user, as well as free text to remind me of my recent changes or things I still need to do. The nice thing is that after the program stops, I am back at the larger play area to efficiently work on it.

 

Note that the current implementation is great (probably partially inspired by my idea here! 😄 ), and none of the old kludges are needed anymore!

 

runtimeWindow.png

Message 7 of 10
(1,248 Views)

Very clever, @altenbach.  I was introduced to the OpenG Library very early in my LabVIEW experience, and have used "Fit Window to Largest Decoration" for almost all of my "serious" VIs, but this has "Cake, and Eat It, Too" appeal.  Also Shout-out (again) to @RTSLVU for the "Origin" setting I failed to notice.

 

Bob Schor

0 Kudos
Message 8 of 10
(1,237 Views)

Thank you everyone for the input! I appreciate it! 

 

After looking through what everyone said, it looked like all I missed was lining up my objects with the little dot like @RTSLVU said.

0 Kudos
Message 9 of 10
(1,198 Views)

@txteng101 wrote:

After looking through what everyone said, it looked like all I missed was lining up my objects with the little dot like @RTSLVU said.


The option "Scroll panes to origin at run time" is NOT the default, so you must have enabled that yourself at one point. I recommend to leave options at the default until you fully understand what they do.

 

Unfortunately, you did not attach your Vi so we had to blindly guess. Fortunately we were still able to help 😄

 

 

0 Kudos
Message 10 of 10
(1,182 Views)