LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hi


I'm trying to pass loop index value from sub vi to progress bar in main vi(without interrupting the measurement in the loop) !
how can I make it ?
I'm working with LV 6.0.
T.U
0 Kudos
Message 1 of 19
(4,547 Views)
You could use a global variable. Write the value from the loop index to the variable in the loop and then read the value from the variable to the progress bar in the main vi.
0 Kudos
Message 2 of 19
(4,547 Views)
I'ts not working with Global var.
the Global var. can not be read at the loop time.
Regards
0 Kudos
Message 4 of 19
(4,547 Views)
Did you change the variable to read? You can do this by right clicking on the variable and selecting "Change to read" from the pop-up menu.
0 Kudos
Message 5 of 19
(4,547 Views)
I'ts still not work.
0 Kudos
Message 7 of 19
(4,547 Views)
Put the reading of the global variable in a loop separate from the loop that called the subVI.
0 Kudos
Message 6 of 19
(4,547 Views)
Hi,

I think the only way is to use a global variable.

Have the subVI write too this global and read it in the VI.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 3 of 19
(4,547 Views)
Hi Mor,

You could try Notifiers to pass the data. To pass a number using a
notifier you have to flatten to a string and then unflaten afterwards.

Since you are using LV6 you could access the indicators 'value'
reference node from the loop.

Another way is to use the built in datasocket connection in your
indicators.

To make all of this work you have to have a running loop in your
progress bar VI.

Tim

Mor wrote:

> Hi
> I'm trying to pass loop index value from sub vi to progress bar in
> main vi(without interrupting the measurement in the loop) !
> how can I make it ?
> I'm working with LV 6.0.
> T.U
Message 8 of 19
(4,547 Views)
Hi, I think the only way is to use a global variable.Have the subVI write too this global and read it in the VI.RegardsRay Farmer
0 Kudos
Message 9 of 19
(3,842 Views)

The Global should work, but it will not update your progress bar during a measurement unless your progress bar is actually inside the measurement loop.  Attaching your VI would be a great help.  Instead of a global, I would actually use a "functional global" (search the forum - you'll find lots of info) because you can get better control over the sequence of execution.

 

Michael Tracy

Synergy Microwave

(still using LV7.1)

 

0 Kudos
Message 10 of 19
(3,837 Views)