How to Initialize a slider AND indicate a change

I have a Slider change a Gauge and also sends the position on to an Arduino. I've added an Inject node to initialize the Slider's position when the flow is deployed, which does change the Slider's position, but that number isn't being sent on to the Gauge or the Arduino.

How can I get the Slider to initialize AND think it was changed so it also passes on the initialized variable to the Arduino?

Welcome to the Forum.
have you ticked this box in the settings of slider control ?


Thank you. Yes. That box is checked, and it also makes no difference whether the slider's output is on release or continuous.

Also connect the inject node direct to the gauge and the Arduino.

  1. What version of NR and node.js are you running? (you can get this from the startup log)
  2. what are you sending out of the inject node?
  3. if you add a debug node to the output of the slider node, what do you see?

Note the slider does not pass msg's on unless the value changes. This is from the Help tab of the slider node:

An input msg.payload will be converted to a number, and used to preset a value. The min value will be used if conversion fails, and it will update the user interface. If the value changes, it will also be passed to the output.

Thank you all for your help. Based on zenofmud, I realized that sometimes when the flow deployed, there wasn't any change, so I added a 2nd Inject node set to 0.05 sec BEFORE my initializing Inject node and set the value to different number before really initializing it. That triggered a value change and passed it as an output.

Not elegant, but it works for now. Thanks again.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.