Reads the number of characters specified by requested byte count from the serial port indicated in port number.
![]() |
port number varies by platform. The parameters for serial port numbers depend on the whether you use Macintosh, Windows, or Unix.
On the Macintosh, port 0 is the modem, using the drivers .ain and .aout. Port 1 is the printer, using the drivers .bin and .bout. You must install other boards, with the accompanying drivers, to get more ports on a Macintosh. Additional serial port numbers are assigned dynamically. When you use the serial port VIs under Windows, port number can have the values in the following table.
Because other vendor's serial port boards can have arbitrary device names, LabVIEW has developed an easy interface to keep the numbering of ports simple. A configuration option exists to tell LabVIEW how to address the serial ports. LabVIEW supports any board that uses standard UNIX devices. Some manufacturers suggest using cua rather than tty device nodes with their boards. LabVIEW can address both types of nodes. The file .labviewrc contains the LabVIEW configuration options. Set the configuration option, labview.serialDevices, to the list of devices you intend to use to set the devices the serial port VIs use. For example, the default is: labview.serialDevices:/dev/ttya:/dev/ttyb:/dev/ttyc:...:/dev/ttyz.
|
||||||||||||||||||||||||||||||||
![]() |
requested byte count specifies the number of characters to be read. If you want to read all of the characters currently at the serial port, first execute the Bytes at Serial Port VI to determine the exact number of bytes ready to be read. Then use the byte count output of that VI as the requested byte count input to the Serial Port Read VI. | ||||||||||||||||||||||||||||||||
![]() |
string read The VI returns the bytes read in string read. | ||||||||||||||||||||||||||||||||
![]() |
If error code is non-zero, an error occurred.
You can connect 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.
Some error codes returned by the serial port VIs are platform-specific. Please refer to your system documentation for a list of error codes. |