Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Count number of PWM pulses in myRIO

Hello!!

I am trying to run a stepper motor using myRIO, for which I am using the PWM signal. To control the number of steps moved by the motor I need to control the number of PWM pulses. The PWM module available for myRIO has options only to control frequency and Duty cycle. I need to stop the PWM after certain number of pulses. How can I do it? 

 

Thank you.

0 Kudos
Message 1 of 4
(3,743 Views)

vi1809,

 

Have you had the chance to look at the following forum? Somebody was trying to perform something similar to you and I believe they found a workaround for this.

 

https://forums.ni.com/t5/Academic-Hardware-Products-ELVIS/How-generate-real-pulses-in-myRIO-from-pul...

 

Regards,

 

 

Tuco100s

0 Kudos
Message 2 of 4
(3,721 Views)

Hi!! Tuco 100s

Thanks for the suggestion, but i went through the forum that you suggested. To generate the number of steps they have used independent "for" loop. But for my purpose i need to use it inside another "while" loop. When I run the "for" loop all other processes in the "while" loop stop that i don't want. Is there any solution to this problem?

0 Kudos
Message 3 of 4
(3,712 Views)

You can use a while loop and implemented to stop at a certain condition

0 Kudos
Message 4 of 4
(3,670 Views)