Communications "Device Timeout": Increase CS and DS Time Limit (31432)



The information in this article applies to:

  • Microsoft QuickBASIC
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0

This article was previously published under Q31432

SUMMARY

When you get run-time error 24, "device timeout," you need to specify a greater time limit for CS (Clear To Send) and DS (Data Set Ready) in the OPEN statement.
The default for CS and DS is 1000 milliseconds or one second. This value can range from 0 to 65535. If zero is specified, the status is not checked.
This information applies to all versions of QuickBasic and to the Microsoft Basic Compiler Version 6.00 for MS-DOS and OS/2.
The following code will give a device time-out error if Clear to Send or Data Set Ready are not detected after two seconds:
   OPEN "COM1:9600,N,8,1,CS2000,DS2000" AS #1
				

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:KB31432