From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

ni 6221 and servo

So, lets begin with: "I have no idea what I am doing"...

 

I have a parallax standard sero, an NI 6221 USB and a power supply.

I am trying to figure out how to make the servo either move a notch left or right; so for the moment I want to leave out PWM/trains.

 

I have the servo connect to the power supply (using 5V, black(-) and red(+( wires) and then I have connected the white wire to the NI 6221 anaolg output (AO 0).

I wrote a simple waveform that would give me a sine wave between 0 and 3V that would have intervals of 1.5ms, however the servo doesn't seems to respond.

Then I hook the voltmeter to the NI 6221 to check what I am getting and the signal seems to stay a about 2V and not moving?

 

any ideas of what I should do?

 

 

0 Kudos
Message 1 of 9
(3,305 Views)
Hello Roddy,

I have a few follow up questions;
What type of signal does your servo need?
How are you measuring the AO lines, and are you running your task while you are measuring with a DMM.
Keep in mind if your  measuring Vrms, you should be getting roughly 2V on a 0-3V sine wave. 

Regards,
Glenn
0 Kudos
Message 2 of 9
(3,271 Views)

 

Hi there,

 

 

What type of signal does your servo need?

 

I assume it needs a analog sigal, because it is a "parallax standard servo"

 

How are you measuring the AO lines, and are you running your task while you are measuring with a DMM.

DMM... digital multi meter???

Yes, while I run the task and I try to create a pulse I can not get any response from the DMM. I am not talking of a 1.5ms pulse.

 

Keep in mind if your  measuring Vrms, you should be getting roughly 2V on a 0-3V sine wave. 

You are right about that, but what I am not understand is whyI get and steady values not matter what.

0 Kudos
Message 3 of 9
(3,239 Views)
Why would you assume that it's some analog signal. The Parallaz web page says it needs a PWM signal.
0 Kudos
Message 4 of 9
(3,228 Views)
Hello Roddy,

From a brief online search, assuming most of Parallaz's servos are controlled the same it does appear that your servo needs a PWM signal. In which case you will need to look at your specific servo's documentation for the appropriate PWM to control the device. You will need to use either the counter or digital lines of your 6221 to control your device.

I recommend looking into the NI Example Finder, Browse according to: Task, Hardware Input and Output>>DAQmx>>Generating Digital Pulses for some examples.

I was also able to find the following Multiple PWM with runtime value changing community example, that uses your onboard counters to generate a PWM.

Can you clarify what you mean by getting steady values no matter what? Does the output not change when you change the amplitude of your AO?

Regards,
Glenn
0 Kudos
Message 5 of 9
(3,212 Views)

clarification:

 

What I meat is that if I set the vi to output (digital or analog) voltage (lest say 1 V) every 500ms, I expected to see the DMM oscillate between 0 and 1 V every 500ms; I only get a continuos 1 V reading. Is that better?

 

Now, how do I connect this to the servo?

Should I conncet both counter outputs to the white cable of ther servo???

0 Kudos
Message 6 of 9
(3,199 Views)

As I said at the beginning, I was trying to left out the PWM signals. I wasn't trying to fully controll the servo left or rigth. I was only trying to "press a button and the servo moves rigth one notch and then stops".

 

I  guess there is no way to controll this without leaving out the PWM.

0 Kudos
Message 7 of 9
(3,198 Views)

Hello Roddy,

 

Can you provide screenshots or code on how you are sending the output? Also, do you have a manual for your device that can specify the signal requirements?


Regards,
Glenn
0 Kudos
Message 8 of 9
(3,179 Views)

You're not going to get around using PWM if you want to use this servo...the circuitry inherent to the modeling grade servo requires it. 

 

The following link gives you some background, shouldn't be too hard.

 

http://www.brookshiresoftware.com/rd_how_servos_work.htm

 

 

 

0 Kudos
Message 9 of 9
(3,176 Views)