What Do the Error Numbers Received from the Serial Port VIs Mean?
Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 7.1
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Serial
Problem: What do the error numbers received from the serial port VIs mean?
Solution: The Serial Port VIs in LabVIEW for Windows return the errors reported by the Windows GetCommError function. Error numbers returned by the Serial Port VIs are 0x4000 (16,384) 'OR'-ed with the error numbers in the following table. The error returned reflects the status of the serial port. The error might have been generated as the result of a previous serial port function. The return values can be a combination of the following errors:
| Hex Value | Error Name | Meaning |
| 0x0001 | CE_RXOVER | Receiving queue overflowed. There was either no room in the input queue or a character was received after the end-of-file character was received. |
| 0x0002 | CE_OVERRUN | Character was not read from the hardware before the next character arrived. The character was lost. |
| 0x0004 | CE_RXPARITY | Hardware detected a parity error. |
| 0x0008 | CE_FRAME | Hardware detected a framing error. |
| 0x0010 | CE_BREAK | Hardware detected a break condition. |
| 0x0020 | CE_CTSTO | CTS (clear-to-send) timeout. While a character was being transmitted, CTS was low for the duration specified by the fCtsHold member of COMSTAT. |
| 0x0040 | CE_DSRTO | DSR (data-set-ready) timeout. While a character was being transmitted, DSR was low for the duration specified by the fDsrHold member of COMSTAT. |
| 0x0080 | CE_RLSDTO | RLSD (receive-line-signal-detect) timeout. While a character was being transmitted, RLSD was low for the duration specified by the fRlsdHold member of COMSTAT. |
| 0x0100 | CE_TXFULL | Transmission queue was full when a function attempted to queue a character. |
| 0x0200 | CE_PTO | Timeout occurred during an attempt to communicate with a parallel device. |
| 0x0400 | CE_IOE | I/O error occurred during an attempt to communicate with a parallel device. |
| 0x0800 | CE_DNS | Parallel device was not selected. |
| 0x1000 | CE_OOP | Parallel device signaled that it is out of paper. |
| 0x8000 | CE_MODE | Requested mode is not supported, or the idComDev parameter is invalid. If set, CE_MODE is the only valid error. |
For example, if Serial Port Write VI returns the error 16,408, then the errors returned are CE_BREAK and CE_FRAME (16,408 = 16,384 + 16 + 8 = 0x4000 + 0x0010 + 0x0008).
Related Links:
Attachments:
Report Date: 10/10/2000
Last Updated: 09/14/2004
Document ID: 229C96LJ