LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event in 1st "While Loop" must stop 2nd "While Loop"

Attach your latest VI,  not just a half picture screenshot, so we can see what changes you've made to the VI based on the responses you have already gotten.

0 Kudos
Message 21 of 24
(1,178 Views)

If you turn on hightlight execution when this happens, does it appear something is running, or a particular function is hung up?

 

Is what is being read at the analog input based on what is being sent out at the analog output?  The two parts of code are running in parallel.  I'm wondering if something takes too long in one part, the other part is done executing too soon.

 

I would convert the feedback node in teh analog read loop to a shift register.  I think what you have is okay, but if I want to be certain that the shift register is re-initialized when the VI restarts, I'd turn it into a shift register and move the constant outside.

 

Are you sure about your conditions for incrementing the counter in the top loop.  You have AND all array elements.  Maybe all of those elements aren't staying above the threshold long enough and the read loop keeps running?

 

Make sure you use troubleshooting tools like probes to see what the data actually looks like and know if the code is executing.

0 Kudos
Message 23 of 24
(1,148 Views)
Thank you for feedback. Finally we've discovered where is the problem.
The problem was due to 2-step initialization of waveform generation module.
1st time it is configured before Start Task and 2nd time inside the While Loop.
I've found this 2-step concept of run-time control somewhere in NI forums and after using it since certain time completely forgot the 1st initialization.
Sorry for having troubled you.
 
Best Regards
0 Kudos
Message 24 of 24
(1,137 Views)