SERIN WAIT question
Cheetah
Posts: 26
I need monitor a serial line for strings, for example "@1|dda" and "@2|da".
If I don't get either of these sequences with 30 seconds I need to timeout
from the SERIN command and go on to other things and then come back and
check again later. Is it possible to WAIT for 2 strings using the SERIN command?
If I don't get either of these sequences with 30 seconds I need to timeout
from the SERIN command and go on to other things and then come back and
check again later. Is it possible to WAIT for 2 strings using the SERIN command?
Comments
If there is data coming in, it will wait forever for the WAIT string.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My goal is to live forever...Or die trying.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
I'm using the stamp as a watchdog to monitor activity on a serial line.
Actually I don't need the timeout option. I just need to make sure that
I receive either of these 2 strings at least every 30 seconds. Any ideas
how to approach that?
You can't WAIT for either of two different strings.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
All of the data coming across begin with a '@' and end with a '#'.
So I guess I could wait for a '@' and receive up to the '#' and then
check the string for what I'm looking for. There is a lot of traffic
on the line so I just need to make sure i get these 2 strings at
least every 30 secs. Any ideas on how to handle this 30 second thing?
Thanks for the help and I'll take a look at a serial buffer.
Take care.
One serial buffer is www.protean-logic.com/tickit/rsb509B_HTML_Cutsheet.htm. Have a look at the description.
Thanks For sharinng this·with use that just might work for a project that i put on hold because of having·the same type of prolbem that Cheetah·is having in what (he/she) is trying to do..........
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam