09-02-2011 06:48 AM
Hi,
I have a question about process waveform using for loop.
I get a 6-channel, 36-sample data from DAQmx read vi, and pass these data to a for loop(N=1). With the highlight run, 1*36 was passed into the for loop. But when I use probe, I found all the data were passed into for loop.
My confusion:
If I use for loop(N=1) to get 6*36 array data, I can only get the first row(1*36).
Anyone correct me, please.
Have a nice holiday!
09-02-2011 07:06 AM
You are missing the concept of Auto Indexing. You should never have an array wired into the For Loop with Auto Indexing on, AND have the N (loop iterations) wired.
For one loop: Right Click where the array enters the loop and turn off Indexing.
For six loops: Delete the 1 wired to N.
09-02-2011 07:07 AM
you auto indexed the array, thus the loop runs through the single entries of the array (and stopps after the 1st one (N=1) ). Right klick the connection to change the behaviour.
If you want to process all the entries one after another, just remove the N=1.
09-02-2011 07:08 AM
aww too slow 😞
09-02-2011 07:09 AM
09-02-2011 07:15 AM
Thank you all!
09-02-2011 07:24 AM
@Ivymerciqq wrote:
Thank you all!
Thank you for saying "Thank you".
Oh, and please click the Diagam Cleanup button.
09-02-2011 07:28 AM
@broken Arrow wrote:Oh, and please click the Diagam Cleanup button.
NOOOO, this button cost me dozens of gray hairs!
Actually a colleague of mine always locks his computer now that I threatened him with using this button for his VIs when he is not looking...
Use it with great care.