schur@isi.edu (Sean Schur) (05/13/91)
I am working on an AREXX script and have run into a snag. Basically I am talking and listening to a single frame controller (for animation) via the serial port. The controller accepts and sends standard ASCII characters over an RS232 port. I have been sending characters to it via the writech() command. It then sends ASCII responses regarding what state it is currently in and I pick them up via the readch() command. Here is the problem. I have to pull characters 1 by 1 (readch(1)) because it sends single characters at a time. Sometimes the controller will mess up and not perform the proper function, thereby not sending the correct response. The readch() command waits indefintely for a character. If the controller screws up and doesn't send one, then the AREXX script completely hangs and the only way to get control back is to reboot the machine!!!! All I really need to do is re-send the last command to the controller to have it redo what it screwed up on. However, I can't do that without rebooting because the running AREXX script has control of the serial port. Any suggestions or other ways to receive individual characters without using readch()? ======================================================================= Sean Schur USENET: schur@isi.edu Assistant Director Amiga/Media Lab Compuserve: 70731,1102 Character Animation Department Plink: OSS259 California Institute of the Arts =======================================================================