LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Control Stepper Motor in LabVIEW in Angle and With Rotary Encoder as Feedback

 

Hi, I am a beginner in LabVIEW. We are tasked to do a robotic arm with a stepper motor as a motor. I used A4988 as its motor driver and can move it in steps. But I want to control it in angle in LabVIEW. Like, if I input 90 degrees in the dial in LabVIEW, the stepper motor will rotate 90 degrees. Also, we have a rotary encoder to measure the angle position at the end. It will act as feedback. I'm confused about how to interface all of this in LabVIEW. Can you please help me? 

 

0 Kudos
Message 1 of 3
(858 Views)

First port of call should be the search bar. This exact question has been answered multiple times. 

0 Kudos
Message 2 of 3
(800 Views)

You do realize, I hope, that a Stepper Motor "steps".  You don't need "feedback", you need only to know the position of the motor at one point in time (like when you start).

  1. Energize the motor (so that it "holds" the joint in an "unknown" position).
  2. Use the Rotary Encoder to tell you the value of the "unknown" position, changing it to a "known" position.
  3. To move to any "new" position, use the stepper motor to move from "known" to "new" position.
  4. Reset "known" position to the "new" position.
  5. Repeat steps 3 and 4 as often as needed.  You don't need the Rotary Encoder any more.

Bob Schor

0 Kudos
Message 3 of 3
(759 Views)