LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Num control starts over with the mouse wheel

Solved!
Go to solution

Hi everyone,

 

I have an issue with my numeric controls when changing the value with the wheel of the mouse. When I increment to the maximum limit (lets say 10) and continue to roll the wheel, the control starts over to 0. Same when decreasing to 0, the next value is 10,then 9,8,7...

 

This only happens with the executable, not when I run the program in LabVIEW 18 32bits. The executable was tested on 2 computers, one only have the runtime installed. 

Changing the value with the arrows of the keyboard works fine, it does not go over the limits.

 

Yesterday I reproduced the problem with only a num control in a while loop. The control had the following properties (it also works with "coerce up/down") :

 Capture.PNG

 

The computer I work was ON for a few days. But last night, the power turned off and the computers shut down. This morning I turned on my computer, I built again the program to reproduce the problem, but the behaviour is now normal for the new executable. For the executable I created yesterday, the issue is still there.

 

Maybe the problem came from the builder ? With that in mind, I ran a previous build from a few weeks ago, everything is normal.

 

Does someone have an explanation ? How to avoid that to happen again ?

 

Yddet

Message 1 of 15
(1,036 Views)

Hi Yddet! 

 

Im a little confused, it sounds like you resolved your issue, is this correct? 

 

Thanks!

JFP

0 Kudos
Message 2 of 15
(991 Views)

Hi JFP, 

 

The problem is not here anymore for the new builds. As I did nothing else than reboot the computer, I don't believe we can say I resolved anything

 

My question is : Why did it happen ? and would it happen again in the future ? 

 

Thank you for your question

Yddet

0 Kudos
Message 3 of 15
(977 Views)

Hi everyone,

 

I thought the problem was gone but it is back on the source code this time. Today my control went from -150 volts (lower limit) to +150 volts (upper limit) in a single step while using the wheel of the mouse to decrement the value.

Another control with the same parameter worked as expected : it stopped at -150 volts.

 

Now, when I run the program the behavior is back to normal. As you can imagine it is annoying when it happens with +/-10kV power supplies.

 

Did it happen to somebody else ? I could create a VI to watch each control and forbid to switch the polarity so quickly but I would rather understand and completely eliminate this risk.

It happens on several computers and different brand of mouses 

 

Thank you for your help

0 Kudos
Message 4 of 15
(872 Views)

Attach a VI that demonstrates this problem.  Which version of LabVIEW?

 

I just created a quick control in LV 2018 and did not notice a problem.

0 Kudos
Message 5 of 15
(864 Views)

In your position, I would disable the built in scroll wheel support. There is a property node for this.

 

I haven't seen the behaviour you mention, but it sounds like a bug.

 

0xDEAD

0 Kudos
Message 6 of 15
(862 Views)

I wonder if this is related to the issue about floating point numbers and numeric control increment/decrement?  I remember something about someone using a knob and it wasn't obeying the limits, either.  There was some huge discussion, but nothing concrete ever came of it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 15
(840 Views)

Thank you for your answers

 

The version is LabVIEW 2018 32bits. 

I don't observe the issue anymore. I still attach a VI of how I reproduced the behaviour back in November (control in a while loop with "Coerce value if outside of limits")

 

Yes disabling the scroll wheel support is an option. It is not preferred as the users are used to use the wheel to adjust the controls easily while looking at the results.

 

@billko : I am not able to find the posts you are talking about. If you find it I am interested to read it and see if this is related.

Download All
0 Kudos
Message 8 of 15
(820 Views)
Solution
Accepted by Yddet

@Yddet wrote:

Yes disabling the scroll wheel support is an option. It is not preferred as the users are used to use the wheel to adjust the controls easily while looking at the results.


You don't necessarily need to disable mouse wheel support, you just need to disable "built in" mouse wheel support.

 

As far as I know, you could still use an event structure to catch mouse wheel events and handle them as you see fit.

 

0xDEAD

0 Kudos
Message 9 of 15
(815 Views)

Ah I see ! I like the idea. I will try to implement it 

0 Kudos
Message 10 of 15
(805 Views)