warning: 40501 TIMEOUT

a robot always show the error log :

warning: 40501
TIMEOUT
TASK:MAIN
A time out interrupt the execution of Readbin …

Reacovery: ERR_DEV_MAXTIME

below is the code

FUNC num ReadByte()
VAR num Input;

! Read character from serial channel
Input:=ReadBin(DriveGripperTime:=0.1);
RETURN Input;
ERROR
RETURN -1;
ENDFUNC

and the proc which calls the func

WHILE ReadByte()<>-1 DO
ENDWHILE

what’s the the problem ? caused by software or by hardware? or some system setting?

the robot is IRB6600 M2000 , and I/O CPU Board had been replaced.

please give me some useful information ? thanks!

What happens if you increase the timeout? 0.1 is pretty short…

Do your COM port settings match the device you are trying to connect to?

What happens if you don’t read it from a loop, i.e. can you read it once? Do you have any WaitTime in your WHILE loop? You should have at least 0.1 in the loop.

Have you opened the serial port elsewhere in your code?

Has something changed that made this stop working, or are you trying to debug it for the first time?