From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a VI to create a VI? Help me brainstorm

Hi all, 

For my senior design project, our sponsor has requested we use LabVIEW to create an QC test device with a GUI.

We are trying to implement a "programmer mode" that allows a user to define several "test flows" that incorporate an operator doing actions such as entering data, reading from a DAQ, and some simple button clicks. I envisioned having this programmer mode be like an MS powerpoint interface, where new screens can be created, and within those screens exist options to add commands and controls, etc.

 

I now realize that this is probably a much harder task than I anticipated, as I'm trying to have a GUI with buttons whose functions are to create a new GUI with buttons and functions. Is there an "easy" way to do this? Essentially I'm trying to get a VI that can edit or define an existing VI. What are my options or alternatives? We're all very new to LabVIEW and don't know much about its capabilities.

 

I know of DLLs, but not what they do or how to implement them. Is this something to look into?

What is the extent of the functionality of a .txt file? Can the programmer mode write specific commands into a .txt file that could be called by the operator mode that turns those commands from the .txt file into a VI, or the like?

 

I appreciate any ideas and feedback.

0 Kudos
Message 1 of 7
(1,173 Views)

@joeygee7 wrote:

I now realize that this is probably a much harder task than I anticipated, as I'm trying to have a GUI with buttons whose functions are to create a new GUI with buttons and functions. Is there an "easy" way to do this? Essentially I'm trying to get a VI that can edit or define an existing VI. What are my options or alternatives? We're all very new to LabVIEW and don't know much about its capabilities.


In development environment, that's possible by turning scripting on.

 

It will be near impossible to pretty simple, depending on the exact details.

 

Scripting allows LabVIEW code to edit (create\delete\modify) LabVIEW code.

 

In run time environment, it's not possible to use scripting.

 

You can make dynamic GUIs with subpanels. For instance, you can put 2000 subpanels on a Front Panel, and hide them all. Then, fill them with reentrant VI front panels, show them and put them on the right position. That avoids creation of controls altogether. It wont be a beginner project, there will be lots of administration.

Message 2 of 7
(1,142 Views)

I've been working nearly full time the past few years developing a test framework that has it's own IDE with an advanced sequence editor.  I should be done sometime this year.  Maybe you should consider something a little less challenging.

"If you weren't supposed to push it, it wouldn't be a button."
Message 3 of 7
(1,116 Views)

There's an old saying that can be applied here, "If you have to ask how much it cost, then you can't afford it.". What you want to do is a very large and complicated task for a novice.

 

What you could do with less effort is create a program that is flexible allowing selection from a group of predefined tests showing or hiding controls and indicators on your front panel as necessary.

 

I have done similar things using a "Queued State Machine". Each "state" was a complete test that could be ran stand alone. The end user could select what tests to run and the order to run them in. 

========================
=== Engineer Ambiguously ===
========================
Message 4 of 7
(1,102 Views)

It's still weird that it's so hard to make a proper GUI in LabVIEW. LabVIEW being a graphical programming language an all.

 

Once CG LabVIEW provides creation of controls in running VIs (one of the great NXG features), a lot of my GUI problems will simply disappear.

Message 5 of 7
(1,017 Views)

wiebe@CARYA wrote:

It's still weird that it's so hard to make a proper GUI in LabVIEW. LabVIEW being a graphical programming language an all.

 

Once CG LabVIEW provides creation of controls in running VIs (one of the great NXG features), a lot of my GUI problems will simply disappear.


I do that by scripting on a template vi then loading it into a subpanel.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 7
(992 Views)

@paul_cardinale wrote:

wiebe@CARYA wrote:

It's still weird that it's so hard to make a proper GUI in LabVIEW. LabVIEW being a graphical programming language an all.

 

Once CG LabVIEW provides creation of controls in running VIs (one of the great NXG features), a lot of my GUI problems will simply disappear.


I do that by scripting on a template vi then loading it into a subpanel.


For me, it will have to work in an executable.

 

Still, subpanels will allow that, but it will open a can of worms. For instance, you can't insert a control in a sub panel. Only VIs are allowed. The, the VI needs to be running, or the effect won't be the same. If you start it, you'll have to stop it... And so on. It's just way too complex, even before getting a basis setup.

0 Kudos
Message 7 of 7
(960 Views)