i have some problem about VC++ to control ZX-SERVO16
I·use MFC to make ROBOT but i have problem about syntax command.
I hope someone can help me!
this link to my project
http://members.thai.net/goengine/ROBOT.rar
I hope someone can help me!
this link to my project
http://members.thai.net/goengine/ROBOT.rar
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
that link include my project i want sending command for control servo, but it doesn't work.
void CROBOTDlg::SendServoPos(CString cServo, int iPosition, int iSpeed=0)
// Move a servo to a specified position at a specified speed
// by sending the adecuate information via RS232 to NX-ZX-SERVO16
{
if (num_switch)
{
if (iSpeed==0) iSpeed=1;
//send "!SC" ch ra pw.L pw.H $0D
port.Write("!SC", 3);
port.Write(cServo,strlen(cServo)); //ch
DecToHex(iSpeed, cHex); //ra
SendCommand(cHex);
DecToHex(iPosition, cHex); //pw 250-2500
port.Write(cHex, 3); //change data int to hex
port.Write("$0D", 3);
}
}
this function mean i want to send command code in VC++ from stamp code :
i think it doesn't work because i send wrong "syntax"
can you help me!!
sincerely
Archy
p.m. sorry my word it not excellent.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
link :· http://www.parallax.com/detail.asp?product_id=28023
Post Edited (Archy) : 12/16/2006 6:52:16 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
http://forums.parallax.com/showthread.php?p=611904
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.