Hello Scott,

Scott>>
wait_for_t0:

if portb.0= 0 then wait_for_t0 ' loop until rssi goes high

pulsin portd.4,1,PLENGTH1 ' MEASURE TIME C2 IS HIGH AND STORE
IF PLENGTH1 > 255 AND PLENGTH1 < 270 THEN COUNTPULSes ' 42 usec error allowed


serin2 b2,16780,1000,wait_for_t0,[WAIT ("$$"),cmnd] ' get command wait $$ timeout 1 secs added
GOTO wait_for_t0<<

Try changing it to this then:

Code:
wait_for_t0: 

if portb.0= 0 then wait_for_t0 ' loop until rssi goes high

pulsin portd.4,1,PLENGTH1 ' MEASURE TIME C2 IS HIGH AND STORE
IF PLENGTH1 > 255 AND PLENGTH1 < 270 THEN COUNTPULSes ' 42 usec error allowed

receivedata:
serin2 b2,16780,1000,receivedata,[WAIT ("$$"),cmnd] ' get command wait $$ timeout 1 secs added
GOTO wait_for_t0

This way, if your Serin times out before it is supposed to , it will re-initialize itself and wait for your data again.

I am taking this on assumption that you said there was plenty of time between the two signals...

If you want, you could put a counter and if the counter goes above 10 loop back to the wait_for_t0.

Since I don't fully understand your project... I apologize if I read you wrong.

Dwayne