I'm still battling with getting things sent reliably using the serial module.
I have a script to set a variable for three passes, then reset it, as a send strobe pulse. Problem is, it's not always sent out.
Lets say it's "S" for strobe, and "n" for the reset condition. The machine runs at 5 - 15 FPS
The serial port is also receiving. Let's say it's getting <cr>12
If I set the send rate to 100ms, and send a Strobe, I see something like;
<cr>12
n
<cr>12
<cr>12
R
<cr>12
n
n
<cr>12
<cr>12
where the R is not always sent. Sometimes I see two R's sent.
However, if I set it to AFAP, which it I presume is a 'process it per pass' I would expect to see;
n
<cr>12
R
<cr>12
R
<cr>12
R
<cr>12
n
<cr>12
n
<cr>12
where R gets sent on three passes because it's processing on in and out on every pass.
However, what happens instead, is you see;
<cr>12
<cr>12
<cr>12
<cr>12
<cr>12
<cr>12
nnnnnnnnnRRRnnnnnnnnnnn
<cr>12
<cr>12
<cr>12
<cr>12
<cr>12
<cr>12
So one can see that the send stuff is being buffered until it's about to ovverun, and then send as a block. I can watch the delay on my LED's. It's not the display that's buffering, there is a real delay before the S gets sent. It's very late.
How do I set the serial module to actually send R R R, one for each pass, as one might expect?
Serial is 9600, 8,N,1
Regards
Roland
|
|