Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!isi.edu!schur From: schur@isi.edu (Sean Schur) Newsgroups: comp.sys.amiga.programmer Subject: AREXX Question: Reading ser: port Message-ID: <17683@venera.isi.edu> Date: 23 Apr 91 09:13:41 GMT Reply-To: schur@venera.isi.edu (Sean Schur) Organization: USC-Information Sciences Institute Lines: 62 I am trying to use AREXX to control a Lyon-Lamb Minivas. This is a single frame recorder controller for single framing images to videotape. The MiniVas has a standard RS232 port. It accepts standard ASCII characters for control. I have had complete success in using AREXX to control the MiniVas. I have an AREXX script that will display a series of images one by one on the Video Toaster and tell the MiniVas to grab the frame once it is displayed. No problem. Now I want to turn things around. Supposedly the MiniVas also sends out standard ASCII characters reporting on it's current state. What I want to be able to do is to have the MiniVas tell the AREXX script when it gets to a particular frame, then activate the Toaster at that point to do a framegrab. The reason I want to do this is to be able to grab a series of images to do animated image maps for Lightwave. So, for example I could grab a series of 60 frames of a movie, then have those frames play on the screen in an animation in Lightwave. The problem I am having is how to run tests to figure out what ASCII characters are being sent by the MiniVas at exactly what point. For my earlier script (to send characters TO the MiniVas) I could set up a simple script that would open the SER: port as a logical file, then pull a character from the keyboard and do a "writech" to send the character to the SER: port. Easy enough to do a loop so I could type a "+" and it would start to play, and a "<" and it would rewind. I had direct control over the MiniVas from the keyboard. I want to be able to do the same thing now, to send characters to the MiniVas, but I also want to be able to find out what the MiniVas is sending back. Optimally I would like some process watching the SER: port for any incoming characters while I send out characters as well. I can't run two separate AREXX scripts. If I have one running that has the SER: port open and I run a second, the second one fails when it tries to access the port. The other option is to run one script in a loop. Allow me to send a character to the MiniVas then look for a response, if there is none let me send another character, etc. The problem I am having with this (and it is probably AREXX ignorance) is that after sending a character with "writech" I am using "readch,1" to look for a single character. The program isn't receiving one and the script completely freezes, I can't get out of it at all without rebooting. I am pretty sure that I need to send a particular character first to tell the MiniVas that I want it to start sending it's status. The documentation for the MiniVas is pretty bad and I need to be able to try several different things before I figure it out. So, how do I tell AREXX to TRY to read a character, if it doesn't get one within a specified length of time, to return control of the program to me so I can type another character. It would also be desirable to have the script echo the character to me immediately as opposed to writing it into a file to look at later. Any suggestions and help would be appreciated. Thanks. ======================================================================= Sean Schur USENET: schur@isi.edu Assistant Director Amiga/Media Lab Compuserve: 70731,1102 Character Animation Department Plink: OSS259 California Institute of the Arts =======================================================================