Hola DakVect
No sé que lenguaje de programación estarás usando, pero en Protón existe para SERIN y SEROUT una instrucción que se llama WAIT, es decir que esperará que suceda un evento en el SERIN (al recibir datos).
The SERIN command can be configured to wait for a specified sequence of characters before it retrieves any additional input. For example, suppose a device attached to the PICmicro is known to send many different sequences of data, but the only data you wish to observe happens to appear right after the unique characters, "XYZ". A modifier named WAIT can be used for this purpose: -
SERIN PORTA.0 , 16468, [ WAIT( "XYZ" ) , SERDATA]
The above code waits for the characters "X", "Y" and "Z" to be received, in that order, then it receives the next data byte and places it into variable SERDATA.
Es decir que espera a esos caracteres y a lo siguente lo ubica en la variable SERDATA
Lógicamente, dependiendo de lo que haga el SERIN, el programa mandará a actuar al SEROUT adecuadamente.
Espero haber entendido tu inconveniente y te sirva la ayuda.
Saludos
Mario