07-03-2011 04:53 PM
Hello
Iam building a positioning control system using a stepper motor. using labview.and I am planning to use an encoder to feedback the position.
Iam not using any sophisticated software like motion controller, it is just a school project that Iam working on it. In using a school's lab, it is equipped with labview and NI ELVIS with a built in DAQ.
I have created VI in the labview that takes the input angle from the user and outputs the series of pulses to turn the motor to a used specified angle. I know that I can operate the motor in full step and half steps. the VI I've created in labview can also control the frequency of the pulses that are to be applied to the stepper motor. Iam also going to attach some kind of load like a piece wood. Now the question i have is- if the motor misses an steps and the encoder shows me an error--then in this what will I need to do to correct the position error.
Thanks
SK
07-06-2011 06:45 PM
Hi SK,
Unfortunately, motion controller's typically make this feedback data easier, but since you're writing the functionality yourself what you'll have to do is write some error handling code that can determine which direction and how many steps the motor misses. If you have a quad encoder, then using this data to calculate the misses is the way you'll need to handle the error. Depending upon the state and the encoder data, you could have a case structure with different scenarios (i.e. behind by two steps, etc.) that would correctly adjust the stepper motor after each move.
03-11-2015 01:02 PM
Is there any chance you could post a screenshot of your LabVIEW block diagram? I am trying to do something very similar but with a motion controller also but I've never used LabVIEW before.
03-12-2015 08:58 AM
Hey GypsyEngineer,
Please find below a couple of examples for using a servo motor with DAQmx, hopefully this can help you to get started:
"Community: PWM Servo Control with DAQ"
https://decibel.ni.com/content/docs/DOC-19953
"Community: Motor Control with NI DAQ Motor Control System"
https://decibel.ni.com/content/docs/DOC-8306
"Community: Proximity-Controlled Servo Motor"
https://decibel.ni.com/content/docs/DOC-16989
Have a great day!
Regards,
>>Daniel C.