Timing issues with SERIN
jgannon
Posts: 2
I am trying to read in a reasonably complicated serial string on my BS2e. The command I am using is:
If I manually type:
into the debugging terminal (with a trailing space), I get the expected values in my variables. If I set up a macro to send the same string, it gets hung up waiting for either command or joint. I suspect that this is because of serial timing issues, but I don't really know where to start in order to fix this. Different speed for the port? Different code to handle the strings? Any suggestions are very much appreciated.
SERIN 16, 16468, [noparse][[/noparse]WAIT("L07 "), DEC command, DEC joint, sign, DEC parameter]
If I manually type:
L07 1 1+99
into the debugging terminal (with a trailing space), I get the expected values in my variables. If I set up a macro to send the same string, it gets hung up waiting for either command or joint. I suspect that this is because of serial timing issues, but I don't really know where to start in order to fix this. Different speed for the port? Different code to handle the strings? Any suggestions are very much appreciated.
Comments
You may be able to squeak by if you grab the whole set of data at once with the STR modifier and put the individual parts into an array. for ex: SERIN 16, 16468,[noparse][[/noparse]WAIT ("L07"), STR grab\6]
Then, check the bytes to see what was received.
In my experience, 2400 is usually rock-solid and 4800 is doable .
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·