01-17-2025 03:54 AM
My coworker discovered a feature while using a program I had written in Labview. If he place the curser on the data entry of a numeric control, he could increment the value by scrolling with the mouse wheel. However if the numeric control is set up with Data Entry limits, there seems to be a bug.
When setting Data Entry limits to a numeric control to -10 and 10 in this example. Then incrementing the value using the mouse wheel, I would expect the value to stop at 10, but the value goes like this:
0, 1, 2, 3, ..., 9, 10, -10, 0, 1, 2, 3, ...
Same for decrementing:
0, -1, -2, -3, ..., -9, -10, 10, 0, -1, -2, -3, ...
This is in Labview 24.
Solved! Go to Solution.
01-17-2025 09:38 AM
It does not do that in LV 2022 at least...It stops at -10 or 10 as you (I assume) expect (I have not got access to 2024 at the moment to see if it differs, but others hopefully can).
If it was just wrapping it could have been a nice feature in some cases making it quicker to get from 8 to -9 for example by just scrolling upwards...😀. Many devices work like that...but if it goes from 10 to -10 to 0 that is not the case🙁. Are you sure there is no code interfering with the value?
01-17-2025 10:24 AM
Thanks, I just checked in LV 2016, there it also works as expected.
In LV 2024 I can replicate by placing a numeric control in a empty VI and configure the Data Entry limits, so there is no interference.
Same response if i place the control in a while loop and run the VI.
01-17-2025 10:32 AM
Hmm, interesting, you're right, at least:
Wheel Up:
and wheel down:
01-17-2025 11:49 AM
Thank you for verifying, and the very nice demonstration 😎
I have reported the bug by following this knowledge article: Report an NI Software Bug.
01-17-2025 12:55 PM - edited 01-17-2025 01:01 PM
Tested it now in 2024, it works as expected there too:
(As the demo shows it will still generate a value change event whenever you try to set the value even when the attempt is to set it outside its limits though, that also happens if it is set to ignore instead of coerce... 🤔)
01-17-2025 01:11 PM - edited 01-17-2025 01:12 PM
That is strange...I recreated the code you had with mouse wheel events, a double etc. and it reports the expected behaviour, not the rollover you get.
This is in 2024Q3. Perhaps you could post the malfunctioning code example, to make sure everything is exactly the same.
01-20-2025 09:18 AM
I think the weird jump is due to the cursor jumps in front of the number around 0 and 10. So as soon as the value reaches 10 it starts incrementing by 10 at a time, thus jumping from -10 to 0 in one event. As soon as there only is one digit, it increments by 1 at a time again.
In the image above I made sure to always keep the cursor at the back of the number, thus only incrementing by one.
Still, ideally it should stop at the limit, not wrap around.
I am also on LV2024Q3, windows 10. See attached vi..