KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q31432: Communications "Device Timeout": Increase CS and DS Time Limit

Article: Q31432
Product(s): See article
Version(s): 2.00 2.01 3.00 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | B_BasicCom | mspl13_basic
Last Modified: 21-DEC-1989

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

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.