LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a specific number of PWM pulses to control a motor using myRIO

Hi,

 

I am trying to control a stepper motor and need to be able to generate a specific number of PWM pulses so i can control exactly how many steps the motor is taking. I have attached a picture of the code I am currently using. I can control the speed of the motor with this code but not the number of steps.

 

I'm fairly sure there is an easy way to do this but I am very new to Labview and struggling a little.

 

Any help would be hugely appreciated!

 

Thanks,

 

Rory

0 Kudos
Message 1 of 2
(2,608 Views)

Hey RoryM, 

 

There's a tutorial at Pulse Width Modulation (PWM) Using NI-DAQmx and LabVIEW that's probably your best starting point. 

 

Otherwise, have you checked out the LabVIEW forums and community examples for similar applications?

Generate a Software Timed Pulse Train Using a Digital Output

PWM labview using NI USB 6251 - suggest using a Digital channel, depending on how quick you need changes?

Update Digital Pulses from Multiple Counter Output Channels On The Fly is a more common approach with counters.        

 

Let us know how you get on. 

Rebecca

 

 

 

0 Kudos
Message 2 of 2
(2,569 Views)