Jump to content

Setting range of slider and its digital display


Recommended Posts

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?

image.png.3f4c48b78b7d641b4b4abcb2b486521a.png

Temperature Slider.vi

Link to comment

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 by JKSH
  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.