Need no timeout on SERINP$

umineral
Posts: 3
Joined: Mon Jul 14, 2014 12:59 pm

Need no timeout on SERINP$

Unread post 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
Daniel
Posts: 133
Joined: Tue Nov 13, 2012 2:10 pm

Re: Need no timeout on SERINP$

Unread post 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
Post Reply