LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling the velocity of a stepper motor using a chirp signal

Hi all, 

 

I am using myRIO to program a stepper motor to generate a rotary oscillation motion. I am supposed to use a chirp signal to operate the stepper motor but I can't seem to find a way to do that. Any help would be appreciated.

 

Cheers!

0 Kudos
Message 1 of 7
(3,195 Views)

What kind of behavior are you looking for?  Do you want the motor to speed up with your signal increasing in frequency?  As for generating a chirp, I think you will have to program your myRIO to create this manually, as I don't believe there are any chirp-specific nodes for FPGA.

 

Also, please tell me more about your system.  You have a motor and a myRIO.. What else do you have?  What software are you using?

Julian R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,147 Views)

Hi, Sorry for the vague question. I am looking to speed up the motor with the signal increasing in frequency. The motor will drive an end arm affector with a motion similar to that of a pendulum.

I m looking for the motor to operate in such a way that for the ends of the amplitudes in the chirp signal (max and min) the end affector should be at the extremities.

I m using LABVIEW 2013 and a Pololu A4988 Stepper motor driver. I can only find two possible inputs (STEP and DIR), and I am clueless on how to run the stepper motor using chirp signal. 

 

0 Kudos
Message 3 of 7
(3,134 Views)

Hi Prabakar,

 

I am not very familiar with the Pololu A4988, but using a chirp signal and a stepper motor, it seems like you could map the amplitude of the signal to the steps you're sending to the motor.  The fact that you want to move the motor in a pendulum shape seems to lend itself to varying the steps according to amplitude (you don't have to worry about making the motor do multiple rotations).  So, take the amplitude and set your max/min, then map it to the steps you're sending.  How is your computer connected to the motor drive?

Julian R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(3,107 Views)

Hi, I m pretty new to LABVIEW to signals and hence I dont understand what mapping the amplitude to step means. I think I may have found a way, I have taken the waveform of the chirp signal and converted it into a digital waveform. The LSB of two consecutive values are compared  and if they are not equal then a pulse is sent to the step signal. Thus in this way I can control the velocity of the stepper motor. But what I m not sure is on how to change the direction of the stepper motor once it reaches the max/min amplitude. 

My PC is connected to myRIO and a stepper motor driver is attached to it. I have a seperate source of power supply for the stepper motor.

0 Kudos
Message 5 of 7
(3,092 Views)

And, i was just wondering if there is anyway to determine the LSB in a boolean array so that I can just take it alone and compare 

0 Kudos
Message 6 of 7
(3,082 Views)

Hi Prabakar,

 

By mapping the signal I mean taking the max/min values of your signal and setting them to the max/min values that you're looking to move your motor to.  Then within those limits move the motor according to that ratio.  So if you signal is from 0-10V and you're moving from 0-1000 steps, then at 5V you would be at step 500, and at 10V at step 1000.  This would be done manually, I don't think there are functions in LabVIEW to do this.  This would seem to solve the issue of reversing direction, too.  Does this seem feasible for you?

 

As for your least significant bit question, you can use the index array function to isolate just the last boolean value in the array.

Julian R.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 7
(3,041 Views)