UART Express VI

LabVIEW 2015 roboRIO Toolkit Help

Edition Date: June 2015

Part Number: 374999A-01

»View Product Info
Download Help (Windows Only)

Requires: myRIO Toolkit or roboRIO Toolkit

Writes data to or reads data from a Universal Asynchronous Receiver/Transmitter (UART) device through the UART channels on the myRIO or the roboRIO.

With the roboRIO, you also can use this VI to write data to or read data from an RS-232 device through the RS-232 channel.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Node nameSpecifies the name of this Express VI. You can also double-click the name of this Express VI on the expandable node to edit the name.
ChannelSpecifies the UART channel on the myRIO or the roboRIO to write data to or read data from the UART device.

With the roboRIO, you also can specify the RS-232 channel to write data to or read data from the RS-232 device.
ConnectionsShows the myRIO or the roboRIO pins that correspond to the receive input line and the transmit output line.
ModeSpecifies the mode of operation for communicating with the UART device. Mode contains the following options:
  • Write—Specifies to write data to the UART device. With the roboRIO, you also can specify to write data to the RS-232 device.
  • Read—Specifies to read data from the UART device. With the roboRIO, you also can specify to read data from the RS-232 device.
    • Read all available—Specifies whether to read all available characters from the UART device. With the roboRIO, you also can specify whether to read all available characters from the RS-232 device. The default is FALSE.
Communication settingsSpecifies the configuration for communicating with the UART device. With the roboRIO, you also can specify the configuration for communicating with the RS-232 device. Communication settings contains the following options:
  • Baud rate—Specifies the baud rate of transmission. The default is 9,600. The maximum baud rate is 230,400 for UART lines and 115,200 for RS-232 lines.
  • Data bits—Specifies the number of bits in the incoming data. The default is 8.
  • Parity—Specifies the parity bits to write or read characters. The default is None.
  • Stop bits—Specifies the number of stop bits this Express VI uses to indicate the end of a data frame. The default is 1.0.
View CodeDisplays the underlying code of this Express VI.
Connection DiagramShows the I/O connector pinouts on the myRIO or the roboRIO. The highlighted pinouts represent the channels that you configure.

Block Diagram Inputs

ParameterDescription
Characters to WriteSpecifies the characters to write to the UART device. With the roboRIO, you also can specify the characters to write to the RS-232 device. This input is available only when you set Mode to Write.
Character CountSpecifies the number of characters to read from the UART device. With the roboRIO, you also can specify the number of characters to read from the RS-232 device. This input is available only when you set Mode to Read.
error in (no error)Describes error conditions that occur before this node runs.

Block Diagram Outputs

ParameterDescription
Character CountReturns the number of characters that this Express VI reads from the UART device. With the roboRIO, this output also returns the number of characters that this Express VI reads from the RS-232 device. This output is available when you set Mode to Write.
Characters ReadReturns the characters that this Express VI reads from the UART device. With the roboRIO, this output also returns the characters that this Express VI reads from the RS-232 device. This output is available when you set Mode to Read.
error outContains error information. This output provides standard error out functionality.

UART Details

The UART lines on the myRIO and roboRIO MXP ports are electrically identical to DIO lines on the MXP port. The UART signals are transistor-transistor logic (TTL) compatible and have the following characteristics:

  • Logic low—0 V to 0.8 V
  • Logic high—2 V to 5 V

The RS-232 lines on the roboRIO are compliant with TIA/EIA-232-F voltage levels. The following are the valid voltage levels:

  • Logic one—-5 V to -15 V
  • Logic zero—+5 V to +15 V

Related Information

I/O Connectors (myRIO Toolkit)

I/O Connectors (roboRIO Toolkit)

TTL-Compatible Signals

Serial Port Communication

Serial VIs and Functions

WAS THIS ARTICLE HELPFUL?

Not Helpful