I2C Express VI

LabVIEW 2015 myRIO Toolkit Help

Edition Date: June 2015

Part Number: 373925C-01

»View Product Info
Download Help (Windows Only)

Requires: myRIO Toolkit or roboRIO Toolkit

Writes data to or reads data from an Inter-Integrated Circuit (I2C) slave device through the I2C channels on the myRIO or the roboRIO.

The roboRIO uses a 3.3 V voltage rail on the I2C port for powering I2C peripherals and provides 3.3 V DIO lines for generating I2C signals.

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 I2C channel to which to write data to or read data from the I2C slave device.
ConnectionsShows the myRIO or the roboRIO pins that correspond to the data line (SDA) and clock line (SCL).
ModeSpecifies the mode of operation that this Express VI uses to communicate with the I2C slave device. Mode contains the following options:
  • Write—Specifies that this Express VI writes data to the I2C slave device.
  • Read—Specifies that this Express VI reads data from the I2C slave device.
  • Write/Read—Specifies that this Express VI writes data to the I2C slave device and then reads a specified number of bytes from the I2C slave device.
SpeedSpecifies the transfer rate of the I2C channel. The default is Standard mode (100 kbps).
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
Slave Address (7-bit)Specifies the address of the I2C slave device which this Express VI reads data from or writes data to. You must specify the address in 7 bits. Some I2C devices might have an 8-bit address in which the first 7 bits represent the address and the last bit represents the mode of operation. For this kind of I2C devices, you must specify Slave Address (7-bit) using the seven most significant bits.
Bytes to WriteSpecifies the data bytes to write to the I2C slave device. This input is available when you set Mode to Write or Write/Read.
Byte CountSpecifies the number of bytes to write to the I2C slave device. This input is available when you set Mode to Read or Write/Read.
error in (no error)Describes error conditions that occur before this node runs.

Block Diagram Outputs

ParameterDescription
Bytes ReadReturns the data bytes that this Express VI reads from the I2C slave device. This output is available when you set Mode to Read or Write/Read.
error outContains error information. This output provides standard error out functionality.

I2C Details

Related Information

I/O Connectors (myRIO Toolkit)

I/O Connectors (roboRIO Toolkit)

Power Supply for Peripheral Devices (roboRIO Toolkit)

DIO Lines (roboRIO Toolkit)

WAS THIS ARTICLE HELPFUL?

Not Helpful