LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slider Reset and Slider direction change

Hi, i was wondering how i would go about resting a slider once it has reached its maximum?

 

I am using a slider control to mimic a conveyor but would like it to start filling again from zero once it hits its maximum limit? I am assuming this is possible i just do not know how to do it?!

 

On another note is it possible to start a slider in the middle and have it fill for a certain condition and empty for another? does it require two pointers? For example fill from 5 to 10 when i have good parts being made, empty from 5 to zero when i have bad parts?

 

Any help greatly appreciated as always 

0 Kudos
Message 1 of 3
(2,124 Views)

A slider is typically a control. Seems you are using it as an indicator.

 

We probably could point you in the right direction if you would attach a simplified version of your VI. Problem seems quite trivial.

0 Kudos
Message 2 of 3
(2,119 Views)

Are you using the Slider as a Control (an input) or an Indicator (an output)?

 

If you are using it as an Indicator, then you can make it take on any value in its range simply by writing that value to it.  For example, if it goes from 0 to 10, and you have something that goes from 0 to 100 and want to make it do 0..10, 0..10, 0..10, then you can take your value (say, 23), pass it through the Quotient/Remainder (or "Div/Mod") function with 10 as the divisor, and wire the Remainder (which will be 3) to the Indicator.  Similarly, if you want it to start at 5 and go up for some inputs and down for others, just figure out what it should show and wire it.  I notice that you specify it should "reset to 5" when bad parts are made, so if it's been Good, Good, Good (so 5, 6, 7), then it goes Bad, Bad, Bad, you'd send 5, then 4, then 3.

 

On the other hand, if it is a Control, you can still "reset" it by either writing whatever value you want to a local Variable for the Control, or using a Property Node for the control and writing to the Value property.

 

Bob Schor

0 Kudos
Message 3 of 3
(2,116 Views)