LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create dynamic subVI's?

I'm writing a program that detects input from a bunch of microprocessors. These microprocessors are collecting data on batteries inserted into the tester. The program requirements state that it should be able to detect if there is a battery there and display only the data for the batteries that are there.
 
So I will be receiving a variable number of signals saying whether there is a battery there or not, and I want to launch a subVI I have already created that keeps track of the data for one individual battery.
 
However, when I try to research how to do this, Labview is very unhelpful and uses terms that confuse me, and doesn't explain really how to set the class and such...
 
Also I would like a front panel image to be launched along with each subVI so that when the operator clicks on the icon he will see the individual subVI data being processed. but again the Labview help and tutorial search is very very low on information when it comes to this topic.
 
thx if you can help
0 Kudos
Message 1 of 5
(2,936 Views)
Hi cutekittenkity,
what do you mean with "... i will receive a variable number of signals ..."? Do you have more than one battery to test? If yes you can use a vi template. The code for each battery is the same, but you can create lots of instances to check a various number of batteries. You will have to each subvi a front panel which you can present to the user.

Please explain what you need and show what you already have.

Mike
0 Kudos
Message 2 of 5
(2,915 Views)
Yeah, that's exactly what I need,
I'm getting a variable number of batteries to test, and for what I have so far...
 
just the block diagram for an individual battery subVI
 
no front panel icon, I have no clue how to make it
and I have no clue how to dynamically make a diff number of VI's every time the program runs
😧
0 Kudos
Message 3 of 5
(2,903 Views)

I think you can do it by making the vi reentrant. Do a little search on the forum, check also the Labview help and see if this is what you need.

(A reentrant vi opens a new instance of itself every time you call it)



Message Edited by Pnt on 07-22-2008 06:41 PM
0 Kudos
Message 4 of 5
(2,897 Views)

Essentially you want to make the vi a vit call this to run in its own thread.  You might consider the communications with your hardware to share a single action engine architecture to make resource locking and management easier.  There are alot of architectural considerations when deploying such systems.  Such considerations migh include how many concurrent instances of the front panel are to be launched, How do you keep each instance from accessing each others resources  .....

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 5
(2,890 Views)