Problems Giving Outside Commands

A while ago, I was helping work on a project to make an autonomous robot worker. One of the components is a 5 servo arm that uses the SSC-32 controller. The component sending it commands is a small EIDC. The EIDC contains a small program that interprets information and then send it to the arm. The language that the EIDC code is written in is very similar to C.

Now, this had actually been working a couple monthes ago. Seemingly without reason, the arm no longer responds to commands and I’m totally at a loss. We’re looking at the commands being sent via the serial port and they all look fine. The controller looks to be receiving the commands as well, the light blinking after every command is sent. For some reason though, the servos just do not respond. It’s not the servos themselves as I’ve gone into the terminal and run commands similar to the ones the arm normally receives. At this point, I’m at a loss. The only thing I can think of is that there is some problem with how the carriage return is simulated in the commands being sent. Here’s an example of a command:

sprintf(lcom,"#0 P%s T%d #1 P%s T%d #2 P%s T%d ",basepw, t, shldrpw, t, elbwpw, t);
wfd cof_serBputs(lcom);
waitfor(DelayMs(t));

Any ideas? Like I said, this had been functioning a few monthes ago. We need it for a show and were considering changing some things, but can’t get it to function as it was before. I’m suspicious of the “”, but don’t know what it could be replaced with. It’s just a desperate shot in the dark now, since I have no idea what else it could be.

what are the baud setting in the program and on the SSC-32?

Currently, they’re set to 9600.

Yeah, for C, the in the printf looks a little suspicious:

sprintf(lcom,"#0 P%s T%d #1 P%s T%d #2 P%s T%d <cr>",basepw, t, shldrpw, t, elbwpw, t);

I’d suggest (assuming EIDC is like C):

#define CR 13 sprintf(lcom,"#0 P%s T%d #1 P%s T%d #2 P%s T%d", CR, basepw, t, shldrpw, t, elbwpw, t);

Thanks much, I’ll give it a try and see if that doesn’t get things going again.