Hi all,
I am looking to program a UMI RTX Robot arm from a Linux box, I have C code for doing so in DOS 3.1 but due to the fact it uses bios.h and conio.h it will not port across easily. I managed to get this to work correctly under Linux, but I broke the code with no backup whatsoever. I'm pretty sure its a flag problem but I can't be sure. I was just wondering if anyone else has attempted such a thing, and if so what their C flag setting are. The settings I am currently using which results in me getting a frame timeout signal error message back (after sending LOTS of instruction and checking for a response) are:
tcflush(fd, TCIFLUSH); /* I/O speed to 9600 baud */ cfsetispeed(&term, B9600); cfsetospeed(&term, B9600); /* Enable receiver and set local mode */ term.c_cflag |= (CLOCAL | CREAD); /* DONALD NAIRN */ /* Set up the parity to 8 data, 1 stop, no parity */ term.c_cflag &= ~PARENB; term.c_cflag &= ~CSTOPB; term.c_cflag &= ~CSIZE; term.c_cflag |= CS8; /* Each transaction should take 8ms to arrive */ term.c_cc[VMIN] = 0; term.c_cc[VTIME] = 0.08; /* Set new options for the port */ if (tcsetattr(fd, TCSANOW, &term)==-1) { printf("Could not configure port successfully"); exit(-1); } /* Set modem control register to RTS+DTR active */ /* Unclear whether this is necessary in Linux environment */ ioctl(fd, TIOCMGET, &status); status |= TIOCM_RTS; status |= TIOCM_DTR; ioctl(fd, TIOCMSET, &status);
Any help would be greatly appreciated,
Regards Donald Nairn