LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple stepper motor operation without specialized driver

Solved!
Go to solution

Hello,

I am very new (<1 week) to labview and stepper motors, and have a simple application - stepping a unipolar stepper motor at 10 steps/second while taking data. For the motor side of things I believe I want a loop that executes at 10 Hz, but I need help with the actual labview code that will drive the motor. The motor specs are 12V nominal, 1 deg step angle, and I am using a NI USB-6211 controller. My LabView version is 12.

 

Thank you! 

0 Kudos
Message 1 of 5
(3,889 Views)

Hello,

 

welcome to LabVIEW!

 

By clicking this link right Here you will be directed to a useful tutorial on Stepping motor.

After watching it, you will be provided enough tools to start your program. And if you have further questions, please ask.

 

Have fun programming in LabVIEW.

 

Greetings and Regards,

James.

 

PS: Some recommendations for new LabVIEW Users…

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

 

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

 

 

 

Greetings and Regards,
James
0 Kudos
Message 2 of 5
(3,843 Views)

You'll also need a drive to provide enough power to run the motor.  Your data acq board won't source enough current.  

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 5
(3,825 Views)

Thanks James! After watching the video and trying a bit on my own I have a few questions. First, I believe my motor has a slightly different stepping scheme than in the video http://www.hurst-motors.com/asabsgeared.html (second figure from bottom). I tried making a fixed array and iterating over that to send different step signals at each loop iteration, but it does not appear to be working.

 

Currently I have the DAQ error that the number of channels in my task is 1 but the number of channels in my data is 4. Changing the DAQ configuration from port output to line output and selecting the four lines available (P1.0 - P1.3) causes a broken wire and the error "the type of the source is 1D (sub)array of long 32 bit integer, the type of the sink is 1D array of long 32 bit integer".

 

Where are my errors here?

 

Also, I do not entirely understand his need in the video you posted to change the values in the array from 1 to 2 to 4 to 8. Could you clarify this?

 

Thanks!

0 Kudos
Message 4 of 5
(3,811 Views)
Solution
Accepted by topic author cmuchi

Hello,

According to you question:

Also, I do not entirely understand his need in the video you posted to change the values in the array from 1 to 2 to 4 to 8

In the video (1:33) he explains this multiplication (Figure 13-6). In the clockwise direction, by stepping from one bit to the next one (1,2,4,8), you need two times the previous digit. So changing the values in the array makes the motor take a step further.

Since your motor has a different binary order (equivalent to 5,9,10,6), you don’t need that method.

  

I took a look in your VI. You created an array of single 1 and 0 but these are not the binary numbers you want.

What you could do is following:
Keep only one column of array elements.

Right click the elements >> Representation >> I8

Right Click>> display format >> Type >> Binary.

 Binary display format.jpg

 

Do you still have the problem after those configurations?

Greetings James.

 

 

Greetings and Regards,
James
0 Kudos
Message 5 of 5
(3,783 Views)