LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting input output reference from a loop in subvi to vi

Hi,

 

In my program, I have a subvi with a loop, I want to send an error outside to the main vi before the sub vi ends to run.

This error I want to use as an input to another subvi.

 

How could I do so?

I have tried to send reference and update the value by property node - but then I cannot use it as an input.

 

Thanks in advance,

Hanan

 

0 Kudos
Message 1 of 7
(3,021 Views)

What you can do is call the sub vi using a Open VI reference and let it run independenlty. Inside the sub VI use a Global variable of Error cluster and update the error cluster to the Global variable and in the main VI read that error cluster Global and perform action accordingly (Or simple you can update the status boolean of the error clister alone)

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 7
(3,019 Views)

Under our labview project restrictions we are not allowed to use Global Variable. Is there anyway to avoid the use of GV?

(P.S. we do can use FGV).

 

Thanks,

Hanan

0 Kudos
Message 3 of 7
(3,017 Views)

Then use FGV to pass the error cluster instead of using the reference.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 7
(3,012 Views)

Well, there are Queues and Notifiers you can use to send data.

 


@Hanan-Grisha wrote:

Under our labview project restrictions we are not allowed to use Global Variable. Is there anyway to avoid the use of GV?

(P.S. we do can use FGV).


<Rant>

Do use FGV with just Get and Set cases?  Those are EXACTLY the same as a global variable, just with more overhead.

</Rant>



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(3,010 Views)

If I call the VI dyanmically then for using the queue I have to pass the Queue reference through FGV (unless calling the Queue using the name) so I thought FGV is a straight forward solution.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 7
(3,006 Views)

You can can a vi dynamically with inputs to the connector pane for the sub vi.

When you call the vi dynamically, just supply it with a queue reference

0 Kudos
Message 7 of 7
(3,001 Views)