LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you control LED lights on the front panel to identify the number of steps a stepper motor has taken?

I am controlling a stepper motor that is coupled with a valve with four outlets (using an Arduino).  I've got a general understanding of how to control the motor, but I want LED lights on the front panel to light up that indicate which outlet the valve is currently at after the steps are taken.  The method I'm thinking about involves a lot of repetitive code.  I'm not that experienced with LabVIEW, I'm assuming I need some sort of loop structure but I don't know how to set it up in order to control the sequence of the LEDs.  I've attached my current block diagram for a visual aid if needed.

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

Don't keep us in the dark- explain what your current idea is.

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

I was thinking about using the Stepper To Go and Stepper Write functions four separate times, using the same constants for the steps each time since the distance between each outlet is equivalent.  The only difference would be what's connected to the "steps remaining" node, which would be the function that activates one of the four LEDs (if that makes sense).  I was thinking that doing it this way would be a little counterintuitive since the only thing that needs to be changed is the LED indicator.

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