LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

the attached vi dosent work

if case is true app quits when attempting to run nested for loop
0 Kudos
Message 1 of 5
(2,775 Views)
What do you by quit? Do you get an error, does the inner for loop not run the expected number of times, or is it something else?
0 Kudos
Message 2 of 5
(2,775 Views)
it doesnt error out. the nested loop fails to execute even once
0 Kudos
Message 3 of 5
(2,775 Views)
Create an indicator for Error Out from AI Waveform Scan.VI and see if you get an Error Out when you run the program. Place a probe on the wire for the array output from AI Waveform Scan.VI. If the array is empty, the auto-indexed for loop won't execute once and the VI will end.
0 Kudos
Message 4 of 5
(2,775 Views)
Then check the size of the arrays going into the for loop. You're autoindexing a whole bunch and a for loop will execute the number of times equal to the size of the smallest array. If one of the arrays has zero elements, the for loop loop won't execute at all. While you're at it, it's considered bad style to run wires underneath objects and to run from right to left. That big sequence structure you've got isn't necessary either. Use dataflow and connect some error clusters to enforce execution order.
0 Kudos
Message 5 of 5
(2,775 Views)