Serial Extender, Timeouts and BoxText
Keywords: Timeouts
Question:
I'm having problems with the timeout values. It seems so straightforward, but I'm obviously doing something wrong. My state list times out in California after just a few seconds. I thought I set the timeout value to 2 minutes! The list should go clear through to Wyoming.Here's part of my code...
------------------ pPutLine(port,"1") RetCode = pWaitFor(port,"choice !","+",0,3000) If RetCode == 0 Then goto Abort BoxText("1 for List") pPutLine(port,"1") RetCode = pWaitFor(port,"=No:","+",0,120000) If RetCode == 0 Then goto Abort BoxText("1 for List by State") pPutLine(port,"Y") RetCode = pWaitFor(port,"Dallas","+",0,120000) ;timeout is 2 minutes! Dallas is just a test. If RetCode == 0 Then goto Abort BoxText("States being listed...") goto NormalEnd :Abort BoxText("Run aborted...") goto eoj ---------------I'm also curious as to the placement of the BoxText command. It seems that I need to place it AFTER the real code rather than BEFORE it for it to show what's really happening. Where is the documentation for the BoxText command?Also, is there a way I could watch what's happening in real time (like in Hyperterminal) rather than just going to my browser output after the fact? That would sure be nice.
Answer:
- BoxText placement is generally before the operation it describes. It is documented in the SMALL manual and also in the WINBATCH.HLP file (not the WIL help file).
- Timeouts look OK. Try bigger values? Values up to 1000000 are legal. There may be a conversion problem someplace, but I looked and it seemed OK.
- Sorry, no real time looks, but add some pCaptureLog("text") statement to your code to write debugging info to the capture file as you go...
Article ID: W12578Filename: Serial Extender - Timeouts - Boxes Functions.txt