LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not display outside the while loop when false do nothing in inside the loop

I have a array of double indicator which is display an output outside a while loop, but it did display 0 at index 0.

Inside the while loop I have false case that do nothing, only output data when it is true. 

In the attachment, the numeric dispalys a correct value, but the array does not? What wrong with it?

Thanks

0 Kudos
Message 1 of 10
(3,714 Views)

Hi cguan,

 

well, the VI looks quite ok. I only added a constant to initialize the shift register correctly. See if this helps...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,709 Views)
You do know that the array indicator will not display anything until you've hit the stop button in your VI, don't you?
0 Kudos
Message 3 of 10
(3,705 Views)

thank you guys, I want to have a real time display, what do I replace the array outside the while loop?

 

0 Kudos
Message 4 of 10
(3,697 Views)

Hi cguan,

 

when you really want a "realtime display" you should place the array indicator in the loop...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(3,685 Views)
But of course, remember, you don't want to be updating faster than about 10x per second (especially if it is a LOT of fp data) as this can bog down your VI. I often times have a "update fp" state that is called every "x" number of milliseconds. I mean, does the user really need data THAT fast anyways?
0 Kudos
Message 6 of 10
(3,676 Views)

Actually, what I really want to send the data to a calculation while loop in another sub vi. The indicator is just to prove if the data can be read outside the while loop.  Can directly send the data to another while loop?  Thanks

0 Kudos
Message 7 of 10
(3,662 Views)
yes you can, use a notifier
0 Kudos
Message 8 of 10
(3,657 Views)

I add a notifier in two while loop but the receiving loop's data deos not updating. It looks like the array of double index 0 desn't change.

In the attachement, the numeric 2 data showing the first value and that stay there, while the numeric keep changing.

Did I do something wrong?

0 Kudos
Message 9 of 10
(3,639 Views)
Because you are always looking at the first (zeroth) row of your array in the consumer loop.  Don't use index array, just look at the whole array in an indicator.
0 Kudos
Message 10 of 10
(3,632 Views)