Putting robotics at your service™

Free shipping on orders over $200

command to turn off sevo

Print view Share :
Previous topicNext topic

Page 1 of 1 [ 14 posts ]

User avatar
New ( offline )
Posts: 9
Posted: 2010-03-02 12:06 
 Post subject: 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


User avatar
Guru ( offline )
Posts: 9256
Posted: 2010-03-02 12:49 
laurici_4 wrote:
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 <cr>

This will stop the servo pulses on the channels effected.

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

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
New ( offline )
Posts: 9
Posted: 2010-03-02 13:01 
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! :-)
Thanks!


User avatar
Guru ( offline )
Posts: 9256
Posted: 2010-03-02 13:11 
Um, what... :shock:

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...

http://www.lynxmotion.com/images/html/b ... tm#discout

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Guru ( offline )
Posts: 2043
Posted: 2010-11-05 09:35 
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

_________________
Eric Nantel - DiaLFonZo
UAV/Drones Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


User avatar
Guru ( offline )
Posts: 9256
Posted: 2010-11-05 10:10 
The only way would be to attach a relay board like these.

http://www.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. :D

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Novice ( offline )
Posts: 64
Posted: 2010-11-08 21:09 
If you want to power down a Servo for example on Pin 4 you have to send "#4p0\r".

Greetings
Daniel

_________________
The genius mastered the chaos.
I am the Chaos!


User avatar
Guru ( offline )
Posts: 9256
Posted: 2010-11-09 10:57 
Chaosmann wrote:
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. ;)

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Novice ( offline )
Posts: 64
Posted: 2010-11-09 11:19 
Quote:
No, the op is referring to a digital servo. It will not power down by removing the pulses as with analog servos. ;)

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

_________________
The genius mastered the chaos.
I am the Chaos!


User avatar
Guru ( offline )
Posts: 9256
Posted: 2010-11-09 12:09 
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)

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Guru ( offline )
Posts: 2043
Posted: 2010-11-10 11:54 
Good...

I'll try that command.

Tanks

_________________
Eric Nantel - DiaLFonZo
UAV/Drones Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


User avatar
Guru ( offline )
Posts: 9256
Posted: 2010-11-10 12:42 
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. :(

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Guru ( offline )
Posts: 2043
Posted: 2010-11-10 15:14 
If i remember well... mine is a 5645...

I don't have it with me

_________________
Eric Nantel - DiaLFonZo
UAV/Drones Specialist

RobotShop inc.
Putting Robotics at your service!™
www.robotshop.com

Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


User avatar
Guru ( offline )
Posts: 4922
Posted: 2010-11-10 16:06 
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


 

All times are UTC - 5 hours [ DST ]. It is currently 2014-12-22 08:43
Feedback Form
Feedback Form