Command to turn off sevo

Hello!

I managed to move the robotic arm AL5A using c++ code complied in Dev-C++ but I have one question. Is it possibile to issue a command to turn off the servos, just like it happens when I push the All=0 button in the LynxTerminal? Because I run the program, I move the arm, then I want to start all over again, and I have to go to LynxTerm, switch it off, the run the code again and so on. I want to do it all in the code.

(For example, writing #3P1500\r\n\0 through serial port, centers the wrist servo, 1500. How can I turn if off?)

Thank you for your help!

Laura

Yay! an easy one… 8)

Just send this command.

#0L #1L #2L

This will stop the servo pulses on the channels effected.

Here is the link to the SSC-32 users manual.
lynxmotion.com/images/html/build136.htm

So I didn’t read the manual well enough after all, I did’t find this command, still don’t now where it is.

But…

while this works

if(!WriteFile(hSerial, “#4P1500\r\n\0”, n, &dwBytesRead, NULL)){
cout<<“writing error occurred”;
}

this doesn’t, nothing happens

if(!WriteFile(hSerial, “#0L#1L#2L\r\n\0”, n, &dwBytesRead, NULL)){
cout<<“writing error occurred”;
}

Is it wrong?

And sorry for bugging you so much! :slight_smile:
Thanks!

Um, what… :open_mouth:

I don’t know anything about the programming language you are using. But sending #0 L forces I/O pin 0 to go low. Stops sending pulses to the servo. This will work with any analog servo. However of you are using digital servos nothing will turn them off. They will hold position as soon as they are powered on.

The command is discrete output…

lynxmotion.com/images/html/b … tm#discout

Robot Dude

There is nothing to do to power down a digital servo ?
I have only one digital servo and it’s the one that sit on the rotating table…

Tanks

DialFonZo
Qc Canada

The only way would be to attach a relay board like these.

lynxmotion.com/c-106-switches-relays.aspx

Then wire the relay in series with the power lead for the digital servo. You would use a spare channel on the SSC-32 to turn the power on and off to the servo. :smiley:

If you want to power down a Servo for example on Pin 4 you have to send “#4p0\r”.

Greetings
Daniel

No, the op is referring to a digital servo. It will not power down by removing the pulses as with analog servos. :wink:

Don’ know which digital Servos he use, but my 5980’s / 5990’s in my Hex power down with this command.

I just tried it. Yes it does seem to power down, but it is really stiff, like the brakes are on. lol I did not know this was possible. 8)

Good…

I’ll try that command.

Tanks

I tried this with a 5645 and it does not have the same effect. It does not turn off the servo. So it must be an undocumented feature of the 5980 / 5990 servos only. :frowning:

If i remember well… mine is a 5645…

I don’t have it with me

I know from earlier it also did not turn off the large servos that are part of the arm (HS-5745). When I asked Hitec if there was anyway, their answer was: no…

Maybe on the 5980… they are closer to the HSR- servos.

Kurt