Servo moving in negative direction

how to make servo move only in negative degrees

:question:

I think you’ve to define your question a little better.
More background info about what you are trying to do. Do you use a BA/BAP+BB2 + SSC32? Is it a programming question?

Read…
lynxmotion.com/images/html/servo01.htm

OK, what I think you’re asking is a basic scaling problem.

Study this example taken from classic AH3 code:

HipH_Pulse(Index) = (((HipH_PulseMax - HipH_PulseMin) * (HipH_Angle - HipH_AngleMin) | / (HipH_AngleMax - HipH_AngleMin) + HipH_PulseMin) max HipH_PulseMax) min HipH_PulseMin

This code matches your angle (in degrees) to the range of the servo (in pulses)

You must provide the “Min & Max” values, and the variables should be signed. But otherwise it’s just math.

Might also need a negation (-) term in there if you also want to reverse the servo direction.

Is this what you’re after? If you supply an example, we might be able to offer more.

Alan KM6VV

hi
im moving knee motor with labview. …designing a force feedback controller…im sending a pwm signal…but the motor is not moving in negative direction

realtion between pwm signal and negative degrees(negative angle)…im using hs-645 MG

mannat

We still have very little information about HOW you are attempting to drive the servo.

Is Labview communicating with an SSC-32?

Is Labview generating an R/C servo PWM signal all by it’s self?

An R/C servo generally requires a PWM signal that is one 500uS to 2500uS pulse width in a 20 mS frame. Who generates that?

If you desire to have the servo turn the opposite direction, then this can be accomplished by the below expression:

ServoPulse = 3000 - ServoPulse

This reverses the direction the servo will rotate in response to a pulse width sent to whatever generates you pulse widths.

You really must explain more! we can understand that it might be tough if English is your second language!

Where do you live?

Alan KM6VV

Are driving this with labview directly from a DAQ and no ssc-32?

If you are then you need to put an oscilloscope on the PWM signal going to the servo and verify it is proper.

There should be a positive pulse width between 1 milisecond and 2 milisecond in duration, 1.5 milisecond being 0 degrees of shaft rotation.

The pulse frequency should be close to 50Hz, that is the pulse occurs every 20mS.

The situation you seem to describe suggests you are sending either an pulse duration outside the range I indicated or not sending pulses at the correct rate.

Please follow the link RobotDude provided earlier as it describes in detail the signals necessary to control an r/c servo.

Eddie,

With a DAQ? I’d think he’d use a digital output. It would be useful to know what Labview module he’s using. I wonder if he’s using the Lego stuff? What do they use?

Alan KM6VV

I may over-generalize the term DAQ. We have different multi-I/O boards that get used with labview and just call them DAQs. They usually have digital i/o, analog i/o, and timer resources on them. Some use a PXI chassis and others are run from a USB port. I usually just get to write requirements documents though and not get to pick the specifics of what hardware is to be used. Damn test engineers! :frowning:

No idea on the Lego stuff. Sorry. :blush:

Hay! Be nice to us Test Engineers!

We have something like an NI SCXI chassis, with 1180,1182,1183 and 1104 boards in it. I’ve yet to write any code for it, or do much more then modify some of the test fixtures that we “plug in” via the Virginia panels. They are run with CVI, though, not Labview.

Documents. Yeah, I write a lot of documents! Even get to design a stand-alone test fixture now and then. Lately, I’ve been designing test fixture boards that we mount on top of a Cirris cable test box.

Alan KM6VV

Hey you engineers be nice to us test developer floor roaches ok? :imp: :laughing: :stuck_out_tongue:

I feel your pain brother!

You’ll have to move over to the Test Engineering department!

Alan KM6VV

Alright! If you test developer / test engineer / engineer people can’t get along I will turn this forum around right now! lol

hi
im controlling motor using labview–and daq card

i am getting sensor input–analog and then convert it into force—comapare it with desire force----then error signal is multiplied with prop control value to generate pwm signal to drive the motor…i just want to know—what will be the pwm signal to drive the motor in negative direction

aaand is your PWM signal going to the servo actually a positive pulse in the valid range of 1 to 2 miliseconds and happening every 20 miliseconds? hhmmm???

because if it isn’t you can put any number you want out there and the servo will stay locked against a rail until it dies. :wink:

actually I’m also wondering if you understand the PWM signal simply controls the position… a 1.5ms pulse is considered 0 degrees, a 1ms pulse is usually CCW (I think) so that would be -45 degrees, and a 2ms pulse would be CW for 45 degrees.

of course none of that works if you don’t have the daq setup to send the pulses correctly to begin with… which is why I keep harping on your breaking out an oscilloscope and verifying this. :slight_smile:

You have been told to read this three times now. The answer to your question is right there… :confused:

lynxmotion.com/images/html/servo01.htm