LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Controls on Font Panel when vi is running?

Is it possible to create a Control on the Front Panel,
when the vi is running? (Also in a *.exe)
I get a structure from an File, and want to create a Contol (Cluster with different contents) programmatically. How have i to do this in LabView? Is this possible? Somebody told me in other programming languages this feature exits!
Is it possible to make it with a variant DataType ??
Thanks for help.
0 Kudos
Message 1 of 6
(3,061 Views)
It's possible but it's neither supported or documented in LabVIEW 7. Maybe 7.1 will have it. If you are willing to experiment a bit, there is a scripting forum on the LAVA Forum. Click the Programming Discussions and then LabVIEW Scripting to see what others have found.
0 Kudos
Message 2 of 6
(3,061 Views)
bobby wrote:

> Is it possible to create a Control on the Front Panel,
> when the vi is running? (Also in a *.exe)
> I get a structure from an File, and want to create a Contol (Cluster
> with different contents) programmatically. How have i to do this in
> LabView? Is this possible? Somebody told me in other programming
> languages this feature exits!
> Is it possible to make it with a variant DataType ??
> Thanks for help.

It isn't possible on a "running" VI. As Dennis has pointed out there are
some undocumented functions you can use, but they will only work on idle
VIs, as they consist of editing operation (and would modify the code
necessary to compile for a VI to be runnable) and LabVIEW has a strict
separation into edit operation which can only occur o
n idle VIs and
runtime operations which can usually occur on any VIs and sometimes only
on running VIs.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 6
(3,061 Views)
Thanks for the clarification. I sort of skipped over the part of his question on "running".
0 Kudos
Message 4 of 6
(3,061 Views)
Although you cannot create "real" LV controls and indicators in a running VI, you can make it look that way.

See this link where Jean-Pierre first suggested a practical approach.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=506500000005000000AF5E0000&HTHREAD=000024239000024248&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

I have implemented variations on this technique in quite a few applications since then.

It take some work behind the scenes, but coupled with the events from the picture control, you can create "virtual" controls and indicators. The biggest draw back is that you find yourself double clicking on the vitual control expecting to find its terminal.

So you you really need it, IT CAN BE DONE.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(3,061 Views)
Hi

>It isn't possible on a "running" VI.

This is correct, but depending on what Bobby want to do, scripting might be used to make it "appears" that it is done in a running VI.

If it is just for data display, a VI can be dynamically generated (and the control as well) insert in another VI (through a subpanel for example) and the data can be pass using VI server.

If that VI that contain the control is expect to do something other that display data, this is still possible (VI Template + VI code editing ...), but the difficulty increase quickly.

> Also in a *.exe

I have no idea if scripting is working in exe file, my gut feeling is telling me no, but I have not tried it.

PJM


  


vipm.io | jki.net

0 Kudos
Message 6 of 6
(3,061 Views)