Quote Originally Posted by Rony View Post
... but the problem i am facing is how can i know the number of bytes received because the trame's length is not constant.

is there any internal variable that contains the info i need ??
There is ...
The number of bytes to receive (50 in your case) is counted DOWN in the HighByte of R4 (PBP system variable).

So after a timeout, you can ...
Code:
RXcount = 50 - R4.HighByte
It has to be the very first thing you do after a timeout.
Executing any other PBP statements before getting the count, may change the R4 value.

hth,