LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pb how to Control a VI with connectors

Solved!
Go to solution

Hello,

 

I create a VI and I try to control it with connectors but I haven't a good result, I would know what is the best way to do this.

I used references, connectors, or variable but I have never control a VI I don't know the best way to do that, what I must do and what I musn't do.

The big problem I have is that my continue to run and this freeze my while loop.

 

I join my VIs.

Download All
0 Kudos
Message 1 of 11
(3,600 Views)

I forget this.

 

The main VI is testVI.vi.

0 Kudos
Message 2 of 11
(3,599 Views)
You can control a subvi using Globals,Reference,Connector etc... I attached the Example to control with globals, have a look on the attached vis(8.6).
Message Edited by Baji on 07-31-2009 03:29 PM
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 3 of 11
(3,589 Views)
Solution
Accepted by topic author leo2b
This package is the example to pass the value to the sub Vi through Connector,Reference and Globals.
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 4 of 11
(3,581 Views)

Thank you, could you send me the files for Labview 8.5 please?

i can't open Labview 8.6.

 

Regards.

0 Kudos
Message 5 of 11
(3,569 Views)
The Version1 Is in 8.0 only.
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 6 of 11
(3,566 Views)
Ok thank you, the two files are the same? Just the version change?
0 Kudos
Message 7 of 11
(3,561 Views)
The Information is usefull?
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 8 of 11
(3,559 Views)

Hello,

 

Sorry but I have an other problem, in fact I want to use a VI with three parameters (in: index, and a chain table; out: enum)

 

The aim is to transform the chain at the index "index" in an enum type, but when I change the index on my VI I don't look a good result, there is nothing, like if the program was freezed in the sub VI.

 

I choose the solution with connectors.

 

Do you have a solution ?

 

Best regards.

 

PS: I put it my new example.

 

The other files are the same: lecturCSV.vi and testJC.csv.

Download All
0 Kudos
Message 9 of 11
(3,544 Views)

You are correct. The subVI is freezing the program.

 

You've made a very elemental mistake. The subVI has a while loop that is only terminated by clicking on the front panel Stop button. Since you do not make the front panel of the subVI visible, there is no way to stop it. If you want to call the subVI, get rid of the whole event structure and while loop. It does not make any sense to have them.

 

Your passing a reference from the first subVI is also silly. All you have to do is wire the table up to the connector pane and in the main, wire that directly to Index Array function.

 

Less important but a bit of bad style is your stop event. Just wire the stop terminal out of the event to the conditional terminal. The True constant is just a waste.

0 Kudos
Message 10 of 11
(3,533 Views)