Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Serial Port Read (PDA Module and Embedded Module)

Reads the number of characters specified by the requested byte count input parameter from the serial port indicated in the port number input parameter.

port number is the serial port. The following table shows the available port number and the corresponding device name on different operating systems.

port number Windows, Pocket PC Palm OS VxWorks eCos UNIX
0 COM1 1 /tyCo/0 /dev/ser0 /dev/ttyS0
1 COM2 2 /tyCo/1 /dev/ser1 /dev/ttyS1
2 COM3 3 /tyCo/2 /dev/ser2 /dev/ttyS2
3 COM4 4 /tyCo/3 /dev/ser3 /dev/ttyS3
4 COM5 5 /tyCo/4 /dev/ser4 /dev/ttyS4
5 COM6 6 /tyCo/5 /dev/ser5 /dev/ttyS5
6 COM7 7 /tyCo/6 /dev/ser6 /dev/ttyS6
7 COM8 8 /tyCo/7 /dev/ser7 /dev/ttyS7
8 COM9 9 /tyCo/8 /dev/ser8 /dev/ttyS8
requested byte count specifies the number of characters to read. If you want to read the characters currently at the serial port, first execute the Bytes At Serial Port VI to determine the exact number of bytes ready to read. Use the byte count output parameter of the Bytes At Serial Port VI as the requested byte count input parameter to the Serial Port Read VI.
string read is the bytes read from the serial port.
error code is the error or warning code. If error code is nonzero, an error occurred. You can wire error code to one of the error handler VIs, which describe the error and give you options on how to proceed when an error occurs.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit