LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with values changed from timeout to event

Hi all

i've this question.
I'm talking with an instrument (oscilloscope) asking it some values and i can see them into my labview panel (refreshing them every timeout loop).

I can set different values into labview panel and the scope changes its settings so in the next loop my panel reads the new value from the scope.

I obtain this with some events and all is working perfectly.

My problem is this: when i click on an element (click generates an event) labview must finish timeout loop and only then executes the event, so the new value set by the user will be ignored.


What can i do to execute the event "instantly" with new user values?

tnx to all
http://www.sd-studio.it - web design agency
0 Kudos
Message 1 of 3
(2,317 Views)
As per your description, the user input should be delayed, not ignored, because LV will execute the event at last.
Anyway, to shorten the delay, you may simply set a 0 ms (or a very short, e.g. 10 ms) timeout for the event structure and manage a timeout "by hand". For example, you store in a shift register the last time you executed the refreshing code; when the timeout event executes, you subtract the last time value from the current time; if the difference is more than a given threshold, you actually execute the refreshing code.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 3
(2,307 Views)
Hi Dario,
I saw something about event structure and I think that your problem should be caused by a "double" timing:
 
 1 the timeout event timing
 2 the timing of the while cycle (maybe)
 
However the best thing you can do is to send me a screenshot (or some screenshots) of your event structure into the while cycle, so I can better understand your problem.
 
bye, have a nice day!
 
Clara
Message 3 of 3
(2,289 Views)