LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I program more than one VI in one main VI?

I have to have three different VIs to run off a main VI. I want to control all VIs off the main VI.
0 Kudos
Message 1 of 29
(3,523 Views)
You can make subvis that run in your main vi.  there are many ways to control the subvis and you may want to look at the architecture examples included with labview.

If you can give more information an what you want to do with your vis, we can give you a more targeted answer.  Otherwise, go through a bunch of the Basic examples.

Kenny
Kenny

0 Kudos
Message 2 of 29
(3,491 Views)
Mizar-

You may want to check into global or shared variables to establish communication between main and sub Vi's. But, as Kenny mentioned, we need some more information about exactly what you are trying to do and what you mean by "controlling" your sub VI's
0 Kudos
Message 3 of 29
(3,461 Views)

Hi:

 

1.  I want to have one VI with an Analog Output signal.  The Analog output is to be ramped from 0-10 Volts.  I need to specify a certain delay between each step. 

2.  As the VI from 1 sends a voltage, I need to use another VI to read two analog outputs from two sensors

I need one interface where I have to incorporate VIs from 1 and 2.

 

Mizar

0 Kudos
Message 4 of 29
(3,439 Views)
Mizar-

Based on your description, you might just want to program a single VI with parallel loops of execution. This would be the easiest way to incorporate all of the functionality described under a single front panel. If you want to use Sub VI's in your program, you can use Global or Shared variables to communicate between your main VI and two sub VI's
0 Kudos
Message 5 of 29
(3,415 Views)
Since you had said in a previous post that you have 6.1 and are using traditional DAQ, I wrote up this basic example. Modify as needed.
0 Kudos
Message 6 of 29
(3,407 Views)
Hi Kenny:
 
Thanks a lot for the sample VI.  I am sorry, but I am a novice in VI programming. When I run the VI, it runs great, but the values do not seem to step. 
 
Thanks
 
Mizar
0 Kudos
Message 7 of 29
(3,392 Views)
Did you populate the array constant on the diagram with the values you wanted? Not knowing what values you wanted to step through, I left it empty and put the comment on the diagram.
0 Kudos
Message 8 of 29
(3,376 Views)

Hi Kenny:

 

Thank you for getting back to me.  Yes, I did, however I am unable to generate the values.  I have AO-Ch01 from SCB68 hooked upto an voltmeter.  I have a screen shot of my current VI.  I know I am doing something really wrong here. 

 

Thanks,

 

Mizar

0 Kudos
Message 9 of 29
(3,369 Views)
Actually, Dennis has been the one sending the example, not me.  As much as I would like to, I cant take credit for it Smiley Happy
 
Can you repost with the screenshot attached??
 
Kenny
Kenny

0 Kudos
Message 10 of 29
(3,366 Views)