From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a RC servo

Hi,

 

This is Abbishek from Auburn University. For my research, I am using a RC servo motor to drive a motion. To control the servo motor, I am sending the PWM signals from the counter 0 port of NI USB-6218. But, the servo did not work. Thinking that something wrong might have happened with the servo motor, I connected it to the NI myDAQ. Fortunately, the servo worked. So, I thought, maybe the PWM signals from the 6218 are not being sent from the servo, and hence I took the signals to the oscilloscope. But, the signals seem to be fine with the correct frequency and pulse width. So, I do not know what is going on with servo interfacing with 6218.

 

The overall application I want to achieve is to start the servo motion after I receive a signal from another device. Servo working with myDAQ is good enough for me. But, when I start the trigger, it gives me an error that the requested value cannot be properly executed or something. So, when I looked into hardware triggering with myDAQ, I found that myDAQ does not support hardware triggering. If so, how do I trigger the servo to start the motion after receiving the trigger? If someone can help me out with this problem, I won't be needing the use of servo with 6218 at all.

 

The program is attached with this message as well.

 

Thanks

 

Regards,

 

Abbishek

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

Hi

 

I would think the PFI lines in myDAQ can be used for triggering, are you using one of these and still getting the triggering error?

 

DIO 0

PFI 0

CTR 0 SOURCE

A

DIO 1

PFI 1

CTR 0 GATE

Z

DIO 2

PFI 2

CTR 0 AUX

B

DIO 3

PFI 3

CTR 0 OUT

DIO 4

PFI 4

FREQ OUT

 

 

0 Kudos
Message 2 of 4
(1,119 Views)

Hi,

 

I circumvented that problem of getting a hardware trigger through data acquisition. Right now, I am getting the trigger signal as a digital input to the DAQ device and getting the boolean output to trigger the servo. Right now, I am having problems with getting the trigger to be recognized properly. 

 

Do you have an idea why the servo is not working with the NI USB 6218?

 

Abbishek

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

 

Hi

 

It is hard to say , since you mentioned the PWM signal is ok in frecuency and duty cycle.

There is a possibility the servo is sinking more current that NiI USB module can deliver. Check the specs of the servo for the control signals and make sure voltage levels and current match with the NI USB module.

how are the ground signals connected between NI USB and servo?

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