LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the loop sequence time (i) out of the while loop in the sub-vi to the main vi?

I tried to search for the answer but no much luck.  My situation is that I used a sub-vi containing a while loop in my main vi. Now I need to see the while loop sequence number (i) from that sub-vi in my main vi.  In the sub-vi I have the indicator to show this loop sequence flawlessly, but that's inside the loop itself.  If I use this indicator as a terminal in the sub-vi, I can only see the last sequence number in the main vi after the loop finished its execution.

 

Is there a way to accomplish this? Thanks.

 

0 Kudos
Message 1 of 4
(2,335 Views)

Hi nobody,

 

well easiest (but error prone) way is to use globals to move data from subvi to main vi. You can also give the reference of the main vi indicator to the subvi to write to a "value" property node. You can also use queues, and there are other techniques too Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,322 Views)

Is this question related to one in this thread? If so, please try to stick to a single thread and avoid confusion.

 

Thanks,

Mathan

0 Kudos
Message 3 of 4
(2,301 Views)
No, Mathan, they are different.  It's similar but still different.  Here I'm asking about sub-vi and main vi (both standard vi), and in the other thread, I was asking about FPGA vi and host vi, although the problems I wanted to solve were similar.
0 Kudos
Message 4 of 4
(2,289 Views)