LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Event Structure Time Out

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

0 Kudos
Message 1 of 7
(6,092 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(6,088 Views)

Run your program in highlight mode and you'll see that you get stuck in the small while loop.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 7
(6,077 Views)

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?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 7
(6,071 Views)

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.

 

 

 

0 Kudos
Message 5 of 7
(6,035 Views)

as far as i can say by the pic you have attached remove the event strut and your so called will run 

0 Kudos
Message 6 of 7
(6,000 Views)

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)

 

  • Please be more clear. What functionality don't you need? What do you want to delete (timeout event? entire event structure?) What did you remove? You don't have a timeout structure, just an event structure with a timeout. Are there also other events? (we cannot tell without seing the code). If the visible event case is the only event case, removing the entire event structure should not do much at all, especially if you use a 0ms timeout (we canont tell what you use!)
  • What are the values of the array feeding into the inner while loop? What is the value of the scalar? Can you guarantee that the while loop always completes even when receiving pathological data?
  • We cannot tell where some of your tunnels are connected, please do some code cleanup before posting. What's up with all these wires going in all possible directions?
  • Why a wait of 0ms? Doesn't seem like much of a wait? 😉 Where exactly did you add it?
  • If the current code works, but the one with the wait does not, you need to show us the code that does not work, right? Why should we troubleshoot what you claim works if the problem is elsewhere??? 😮
  • What's up with the weird queue operations?
0 Kudos
Message 7 of 7
(5,981 Views)