LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

output terminal connection inside a while loop

I am trying to incorporate a moving average sub-vi into my data acquisition program but can't seem to get the output terminal to transfer. The output terminal is inside of a while loop.
0 Kudos
Message 1 of 3
(2,697 Views)
I'm not exactly sure what you mean by "can't get the output terminal to transfer". Are you getting a data type mismatch or something else? Is your moving average subVI expecting an array input and your while loop is not generating an array? It's easy to have a while loop generate an array. Right click on the terminal where it exits the while loop, and select "Enable Indexing". If it's somehting else, attach your program so someone can take a look at it. Be sure to save the entire hierarchy by doing a Save with Options and select Development Distribution.
0 Kudos
Message 2 of 3
(2,697 Views)
Something else to be aware of when you have an output terminal inside a loop of any kind is that if you are looking at the front panel you will see the value update each time the loop iterates, however only the last value will be made avilable to a VI calling the routine.

If you want to seel all the data, move the indicator outside the loop, change it to an array and implement the "Enable Indexing" like Dennis described.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,697 Views)