From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cursor move event dicrease frequency

Solved!
Go to solution

Hello!

 

A long time ago I remember I saw a forum post or a community doc, where it was explained how to decrease a certain Event to be triggered too frequently.

I have a graph with a cursor, and when the user starts to move the cursor, I do some minor calculations and output some values into indicators. I would like to discard some of the "mouse move" events, so when the user pulls the cursor "too fast", I do not overload the CPU with processing. I know I could just use the "cursor release" event, but it is not that nice, the user does not get feedback about the values between the two locations.

So I cannot really remember what was the trick to discard the too frequent triggering, it involved some time stamp comparison I think...

Could someone help me out, how to properly solve this task?

thanks!

0 Kudos
Message 1 of 3
(2,631 Views)
Solution
Accepted by topic author Blokk

In newer LabVIEW version you can limit the size of the event queue. Try this first. (See this completed idea).

 

In earlier version I would compare the current cursor position with the position obtained from a property node and execute an empty case structure unless they are equal. The old discussion is here. (Also make sure to disable "lock front panel until event completes").

 

The cursor idea in in this reply, see the right side of the following image.

 

 

Message 2 of 3
(2,623 Views)

Thanks! I need to implement this in LV2014, so I will go with the first option.

0 Kudos
Message 3 of 3
(2,606 Views)