10-11-2013 03:33 AM
Hi all
I'm trying to get some acquisition data (frequency / level) from a device (Spectrum Recorder).
All is fine, when I use the Event Structure with Time Out inside the While Loop. But I don't need this functionality for my purpose, I want to delete it.
If I remove it the programm does not work, even if I replace the Time Out structure with a Wait function which waits exactly the same time (0 ms).
Why ? How can I suppress this time out structure ?
(Please see attachment)
Thanks for your help
Paola
10-11-2013 06:31 AM
First of all, you posted this in the wrong board. You should be asking these kind of questions in the LabVIEW board. I already asked the moderator to move this thread.
The thing that I see that concerns me is the while loop inside of the event structure. Once that little loop is complete it is passing a stop to the larger loop. So your acquisition is only going to happen once.
10-11-2013 09:50 AM
Run your program in highlight mode and you'll see that you get stuck in the small while loop.
/Y
10-11-2013 10:25 AM
Hi Paola,
waiting for 0 ms is of no help in this context. You should wait a time corresponding to the value of Reading Speed Delay. Is it 0 as well?
10-11-2013 01:47 PM
Yamaeda is correct
WHenever developing an application that uses a while loop it is probably a good idea to handle that rare situation when the loop is not going to be satisfied no matter what. Thats is a hang up condition with no exit strategy.
I usually take the time in mission critical code to create a means to exit out a while loop if the iterations are too high.
A lot of it can be reomoved when the design is thouroughly tested.
10-12-2013 04:02 AM
as far as i can say by the pic you have attached remove the event strut and your so called will run
10-13-2013 08:17 AM
paola_ wrote:All is fine, when I use the Event Structure with Time Out inside the While Loop. But I don't need this functionality for my purpose, I want to delete it.
If I remove it the programm does not work, even if I replace the Time Out structure with a Wait function which waits exactly the same time (0 ms).
Why ? How can I suppress this time out structure ?
(Please see attachment)
Please attach an actual VI instead of a picture! Thanks! (if possible modify it so it works with simulated data so we don't need your hardware to run it)