Neil Pate Posted June 1, 2020 Report Share Posted June 1, 2020 I am struggling with something I would have assumed is trivial. All I want to do is to be able to programatically set the range of a slider (and also its digital display. I had assumed the digital display would take the same range as the slider but apparently they are separate items.) Anyway, a simple example is shown here and does not work, the Error 1192 comes from the second property node. The first property node correctly sets the slider range. I guess I am being stupid here, can anyone suggest what is wrong with my code? Temperature Slider.vi Quote Link to comment
JKSH Posted June 2, 2020 Report Share Posted June 2, 2020 (edited) There are 2 separate sets of limits: Scale.Maximum/Scale.Minimum and Data Entry Limits.Maximum/Data Entry Limits.Minimum. The digital display simply shows the value stored in the Slide -- in other words, it shows what you'd see from the Slide's terminal, local variable, or Value property node. The underlying issue is that the Slide's value remains unchanged when you update the Scale limits. The Scale limits set the visible range on the GUI but they don't set the range of allowable values. To get the behaviour you want, you don't need to use a property node on the digital display but you must: Set "Respond to value outside limits" to "Coerce" instead of "Ignore" Programmatically update the Data Entry Limits Edited June 2, 2020 by JKSH 1 Quote Link to comment
Neil Pate Posted June 2, 2020 Author Report Share Posted June 2, 2020 Thanks, I cannot believe I did not see the Data Entry Limits as part of the slider properties! For some reason the DigDisps[] property caught my attention and I thought this was the right place to go poking around. This works (as expected!). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.