HMI Pad Forums Main Forums General How to create a Slider with "Auto-middle"?

This topic contains 2 replies, has 2 voices, and was last updated by  hcuser 4 years, 6 months ago. This post has been viewed 1602 times

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #21717


      I’d like to simulate an analog control input between -10V and +10V, which has a 0V Position in the middle, which is hit by a spring-loaded dial as soon as you release the dial.

      How can i have a slider in HMI Draw to jump to the middle position when i untouch it?
      How can i achieve a constant or immediate write to the PLC when the slider value changes?

      Btw, does anybody know the status or future of HMI Draw, is it a project under constant development and with further features or is it already “dead”?
      The Website and News-Tweets seem to be pretty deserted…

      Thank you for any assistance.



        Hi hcuser,

        You can get the instant or immediate value of a slider by accessing the ‘slider.continuosValue’ property. This will give you the slider value as the slider moves.

        To achieve the reset to zero when you release the slider you need a ‘delayOn’ timer object. In the ‘delayOn.value’ property enter ‘slider.value’. Set the timer to fire in 0.1 seconds, or 0 seconds. This is entered in the ‘delay.On.time’ property. At this point you have a timer that will fire when the slider is released with a non-zero value. Now, in the ‘slider.value’ property enter this expression: ‘if delayOn.delayedValue then 0′. With this setup the slider will return to zero as soon as you release it (or after 0.1 seconds if you have set the timer that way. Having this smallish delay feels more natural to the user)

        I hope this helps,


        • This reply was modified 4 years, 6 months ago by  John.
        • This reply was modified 4 years, 6 months ago by  John.


          Hello John,

          thank you very much for your fast response and help!

          As a Ruby- and HMI Draw-Beginner, i would have needed at least a year to solve this as nice as you did!

        Viewing 3 posts - 1 through 3 (of 3 total)

        You must be logged in to reply to this topic.

        Copyright © SweetWilliam, S.L 2009-2013. All rights reserved.
        Science and Technology Park of the University of Girona, Emili Grahit, 91 (NarcĂ­s Monturiol building, Office P3-B03) 17003-Girona. Phone +34972183244