Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

RC Servo Angle Control

Hello everyone, 

 

I want to control RC servo using LABVIEW. I am using NI USB X-6353. Let me explain the setup detail. I have connected the signal wire of the servo to counter output (port2/line5) to produce PWM signal. The VI is given below. As I understand the theory of RC servo, it has a nutral position at around 1.5ms (7.5% duty cycle for 50Hz PWM). and if I increase or decrease the duty cycle , then the servo will rotate either direction respectively. Anyway right now my problem is that the  servo is rotating contenuously. Changing the duty cycle, either speed up or change rotational direction but never stops the servo unless I hit stop. I need my servo to be fixed in position after desired rotation. plz help.   

0 Kudos
Message 1 of 4
(4,238 Views)

Hi fuadhasan

You can control the position in the DAQmx timing to a finite amout of samples. You may also take a look at this link that has an example onhow to control the servo.

 

0 Kudos
Message 2 of 4
(4,162 Views)

hello,

I have tried with finite sample but in this case its rotating less time but still not performing as it should be. I mean its initializing its nutral poition in each iteration and moving forward. never stops in desired postion. plz help.

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

Hi fuadhasan,

 

Were you able to take a look at this link?

https://decibel.ni.com/content/docs/DOC-19953

0 Kudos
Message 4 of 4
(4,122 Views)