Page 1 of 1

Need no timeout on SERINP$

Posted: Wed Sep 17, 2014 3:50 pm
by umineral
When using the USB's INPUT, it will wait forever for an input string. That is good when waiting for an operator to type in a command that may come at anytime in the future.
I need the same thing for the SERINP$ instruction. A command string is input on the RX pin. I can get about a 12 sec window of opportunity using a timeout = 10000000 to type in a command before the program moves on with a null command which causes an error. It would be nice it a timeout = 0 could be a signal to loop forever. Or if the INPUT instruction also had a port parameter, INPUT <port#>, <string variable>. I'm getting up against the wall to get a project done in 2 weeks. This is the only thing holding up this part. Is there anyway around this problem?
Phil

Re: Need no timeout on SERINP$

Posted: Tue Sep 23, 2014 5:45 pm
by Daniel
Hi

I have changed the definition of the SERINP$ function to take a negative value for the time out parameter. When the <timeout> parameter is negative the function will wait for the termination character to be typed before it returns. The new function applied for v0.80 of the firmware.

Daniel