08-24-2011 11:48 PM
Hi, as you all can see from the screenshot above, I have a slider that will move automatically from 0-255 with the help of shift registers in the while loop.I also want the slider to reset to 0 and continue to move automatically from 0-255 everytime it reaches 255 and it will not stop until the user stops the VI. As for now, I do not know how to know that.
Hope to receive all your prompt replies.
Thanks.
08-25-2011 12:17 AM
hi fredteng
as i get it
in your second loop place slider on the remainder output and chane the constant value from 18 to 255.
is that what you asking ?????
08-25-2011 12:35 AM - edited 08-25-2011 12:43 AM
08-25-2011 12:50 AM
What I am doing in my top while loop is to make a slider automatically change its value from 0-255 continuosly until the VI is stop.
The bottom while loop is to create an animation. So when my VI is running, the bottom while loop would run and the ring indicator in my front panel would show all the 18 images that I stored in it as an animation. The top while loop would then enable the slider to run from 0-255 but it does not run repeatedly so how do I enable it to run repeatedly from 0-255 until the user stops the VI? Why I am doing this is because, whenever the Ring indicator shows the first image in its memory, the slider would show the value of 0, the value of 15 for the 2nd image and the value of 30 for the 3rd image. Hope that you all understand what I want to achieve here.
Thanks.
08-25-2011 01:03 AM - edited 08-25-2011 01:04 AM
08-25-2011 01:37 AM
Thanks, that is exactly what I want! But whenever I start running the VI, the slider would show the value of 15, how do I change it that whenever I run the VI the slider would show the value of 0 and is there any better way for me to synchronize the slider value to which image I am showing? Because right now, whenever I show the first image from the Ring indicator, the slider is already at the value of 15 and not 0.
Thanks.
08-25-2011 01:42 AM
Well you add 15 to the start value, so ofcourse the first value will be 15.
/Y
08-25-2011 01:48 AM
So how do I set the default value to be 0 and it will increase by the step of 15 everytime?
08-25-2011 02:27 AM
You multiply the loop counter (i) with 15 and add the result to the slider wire.
/Y
08-25-2011 02:35 AM
@fredteng wrote:
So how do I set the default value to be 0 and it will increase by the step of 15 everytime?
Connect the slider directly to the wire coming out of the left shift register. 😉