Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems between main-programs and sub-programs.

I have written sub-vi1.vi to operate instruments A,

                      sub-vi2.vi to operate instruments B,

 & 1 new open vi start to make my main vi.

 

 I Drag these two sub vi.s  into the block diagram of a new blank vi first,

Then create "controls" or "indicators" ...est. (Everything it needs) to the pins of sub.vi,s,

Combine these 2 sub-vi.s well, save as my main.vi

 

Things happened when I run the main vi:

- On the front panel, all the "indicators" not response, but  at same time the same indicators in subvis response well when running.

 

So, Instrument A & B can operations well using the main.vi,but the front panel of main.vi not response at all,

very headache, hope give some ideals.

 
 
 
Cheers,
Nicosg

anico2127@yahoo.com.sg
0 Kudos
Message 1 of 8
(4,537 Views)
Not sure why you posted this here instead of the LabVIEW board but it would help if you would provide some details on the subVIs - even posting the code. Do you have while loops in the subVIs?
Message 2 of 8
(4,527 Views)
See attached zip document,there is a text document inside got simple introduction about the program and my problems,
hope can get some iedals to solve my problems and improve this program.
 
Any questions let my know, .
Cheers,
Nicosg

anico2127@yahoo.com.sg
Message 3 of 8
(4,512 Views)
Headache,next time will put at correct place.
Cheers,
Nicosg

anico2127@yahoo.com.sg
0 Kudos
Message 4 of 8
(4,513 Views)
I think what your question is 'why don't the indicators on the main VI update until the subVI is done'? If that's what you want to know, well, they aren't supposed to normally. You start up the subVI with some values you pass to it. The subVI runs and only when it is complete, does it return any values back to the main. One possiblity is to simply make the subVI's front panel visible when it is running. In the main, right click on the subVI and select SubVI Node Setup. Select 'Show panel when called' and 'Close afterwards is originally closed'. To avoid displaying the subVI, you need to pass a reference of the front panel control on the main VI you want to update, to the subVI. In the subVI, from the reference you passed, you can write to a property node (i.e. Value). Here's the main and the subVI modified with a single reference to the progress bar.
Download All
Message 5 of 8
(4,510 Views)
Hi,Dennis Knutson,
 
Thanks for your help,its really worked,
DO I need to change one by one follow your exsamples?
does "Static " and another "Call by Reference' VI" will useful or not for my problems.
Cheers,
Nicosg

anico2127@yahoo.com.sg
0 Kudos
Message 6 of 8
(4,503 Views)
Hi,
Its really usefull,Still got some problems.
How to deal with the string(setpoint temperture string) the one?
 
When & how can I learn more about these properties?
Most updata programs (see attachment)
Cheers,
Nicosg

anico2127@yahoo.com.sg
0 Kudos
Message 7 of 8
(4,497 Views)
In your subVI, you are writing to Label.Text. You would want to write to the Value property just like the others.
Message 8 of 8
(4,472 Views)