char buf[100];
short int i;
double x[6];
unsigned short length, encode();

for (i=0; i<6; i++)
{
  length = encode(buf, "joint %d=%#lf", i, precision, x[i]);
  send(PIC, buf, length);
}
