LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shift register

slider.png

 

 

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.

0 Kudos
Message 1 of 17
(3,516 Views)

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 ?????

0 Kudos
Message 2 of 17
(3,512 Views)
  • What is the purpose of the inner while loop? Remove it!
  • Why is the shift register not initialized?
  • Simply divide the number by 256 using quotient&remainder and feed the remainder to the slide.
0 Kudos
Message 3 of 17
(3,507 Views)

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.

0 Kudos
Message 4 of 17
(3,500 Views)

Try something like this:

 

 

Message 5 of 17
(3,495 Views)

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.

0 Kudos
Message 6 of 17
(3,483 Views)

Well you add 15 to the start value, so ofcourse the first value will be 15.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 17
(3,481 Views)

So how do I set the default value to be 0 and it will increase by the step of 15 everytime?

0 Kudos
Message 8 of 17
(3,478 Views)

You multiply the loop counter (i) with 15 and add the result to the slider wire.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 17
(3,472 Views)

@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. 😉

0 Kudos
Message 10 of 17
(3,467 Views)