04-18-2023 07:11 AM - edited 04-18-2023 07:42 AM
Hello, I have a slider that goes 0 to 10 and numeric input from 0 to 10. When either is changing its value, I want value of that control to be stored and don't do anything until either slider is changed again. Let's say first value is typed 7, I see 7, then I change slider to 3, value remains at 3, then change slider to 5, value stays at 5. Thanks
edit: the problem with my current approach is that my case structure goes to False state after 200 ms have elapsed, and value is flipped again.
s
04-18-2023 08:07 AM
Thank you for attaching your LabVIEW code (much more useful than a "picture" of code). Unfortunately, you are using the most recent release of LabVIEW, and many of us have not "upgraded" yet. Can you open your VI, then "Save for Previous Version" and save it as LabVIEW 2019 or 2021? You'll get a lot more "eyes" on your problem, and quicker responses.
Bob Schor
04-18-2023 08:33 AM - edited 04-18-2023 08:39 AM
Use Event based state machine to update based on event to update.
04-18-2023 08:55 AM
Another thing you could do is turn on the digital dispaly for the slider and get rid of the numeric control. On the slider, right-click and choose Visible Items->Digital Display. You can now enter a value directly and the slider value will update accordingly for you.
04-18-2023 01:02 PM - edited 04-18-2023 01:11 PM
@John32d wrote:
Hello, I have a slider that goes 0 to 10 and numeric input from 0 to 10. When either is changing its value, I want value of that control to be stored and don't do anything until either slider is changed again. Let's say first value is typed 7, I see 7, then I change slider to 3, value remains at 3, then change slider to 5, value stays at 5. Thanks
edit: the problem with my current approach is that my case structure goes to False state after 200 ms have elapsed, and value is flipped again.
First of all, we have a problem with terminlology. LabVIEW does not have variables. I guess you are talking about the indicator named "Numeric 2" for some random reason. Why not give it an intuitive name?
Are you talking about the "value" of Numeric 2"? Something else?
How can something remain at 3 if you change it to 3? Where does the +1 (note that there is a primitive for that!) in the true case fit in all of this?
Maybe all you need is a slide with the numeric control visible?
04-18-2023 01:10 PM