LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to resize huge front panel?

Hi,
I am a new ,frustrated user of Labview 7.0 on Windoze XP. I have created a VI, with quite a few controls and indicators. These appear scattered at random on a HUGE front panel, that I can scroll and pan around. I would like to get everything onto one screen so I can see it at once. I have tried the "distribute", "align" and "resize" objects from the toolbar, but all that happens is that I end up with objects crunched together, somewhere in the huge front panel. SO, what do I do to get this down to a manageable size and group my indicators and controls in a useable way?
Secondly, is there really no "select all" edit option?

Thanks in advance,
Chris

PS I'm trying to remain open minded and patient with LabView, understanding
that it is a different programming paradigm than I am used to...but it is hard accepting the amount of time I am spending diddling with wires, moving stuff around and clicking the mouse just to get a coherent block diagram that will make sense to me in 6 months when I come back to it. Any words of wisdom would be greatly appreciated!
0 Kudos
Message 1 of 9
(3,617 Views)
The front panel is what the user sees, so it should be simple, clean, and logically organized. It should not require a pilot's licese to operate.

It seems to me that you start with the diagram, then randomly do "create control/create indicator" on anything. This is backwards.

Try starting with the design of the front panel, place the indicators and controls as desired, use a tab control to logically group items by function and to hide items that are not suitable for the current state. Create clusters for controls that belong together.

Only once this is done start to wire up the terminals and add code.

Again, the block diagram should have a clean purposeful layout. Since this is a user interface VI, you probably want to go with a state machine usi
ng a while loop and an event structure. Everything that does not need user interaction should go in subVIs. Liberally add comments to each code section.

Have a look at the LabVIEW Developer Guidelines, especially the style guide in chapter 6.

Trust me, the learning curve will be fast and once you get the hang of it, it'll be hard to go back to line based code. Users with considerable programming backgrounds in other programming languages often approach LabVIEW with a few misconceptions that cause a lot of unecessary code. If you want, you can post your "artwork" and we can possibly point out some things that could be dramatically simplified. Remember, you are allowed to make every mistake once, they are required for sucessful learning. 😉
Message 2 of 9
(3,617 Views)
Yes, I understand that the front panel should be designed first; in this case, I was trying to put together a quick test wrapper for some subVI's, so the block diagram was the most important part; I am the only user. I am newly assigned to a project with a couple of years' worth of LV development, the front panels were locked down long ago. From your answer I will conclude that once the front panel has sized itself to "huge" I might as well just start over. There doesn't seem to be any way to save a block diagram and hook it to a new front panel, or vice versa?
Thanks,
Chris
0 Kudos
Message 3 of 9
(3,617 Views)
Hi Chris,

Unfortunately you cannot "hook" it up to a new front panel. What will happen is if you copy your block diagram and paste it into a new block diagram, you will see that all of the front panel objects will be recreated on the new front panel all over the place. Then, you will have to go and again organize all of your front panel objects. The ideal way to have done this is to design your front panel first and then go to your block diagram.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 9
(3,617 Views)
Hi Jeremy,
Thanks for the info; I realize now that this is exactly how I got into this mess, by trying to reuse pieces of other working VI block diagrams to create a new one quickly. Hate to have to start from scratch every time through, but I'll know better next time (or go straight to C)

Chris
0 Kudos
Message 5 of 9
(3,617 Views)
In this case, all these extra front panel objects are obsolete once things are wired together (remember: the wire is the data) and it should not take long to clean up. In newer labview versions, you can delete them straight from the diagram by default.
0 Kudos
Message 6 of 9
(3,617 Views)
Actually, the problem was not extra objects; the problem is that cutting and pasting on the block diagram caused massive inflation of the front panel. I had only the controls that I wanted, I just had them scattered at random on a huge canvas, and some of my attempts to clean it up made it even bigger. Thanks for all the input,
Chris
0 Kudos
Message 7 of 9
(3,617 Views)
check the image for a simple example. The code puts all controls and indicators on a front panel one below another starting from the origin position (0,0). You can make it more flexible such as multiple columns after certain # of controls. Or, you can replace the "current vi path" with a path control, this way you will be able to put this code into separate vi.

-Joe
0 Kudos
Message 8 of 9
(3,617 Views)
Then another option would be if you want to copy and paste your code, go and copy the VIs, but not the controls or indicators. Then paste that into your new block diagram, go to the front panel and create your controls/indicators, and then return to the block diagram and connect your UI objects. This way you get your functionality, and don't have to go back and deal with an enormous front panel.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 9 of 9
(3,617 Views)