LabVIEW myRIO Toolkit

Read VI

  • Updated2023-02-21
  • 3 minute(s) read

Read VI

Owning Palette: I2C VIs

Requires: myRIO Toolkit or roboRIO Toolkit

Reads a specified number of bytes of data from an Inter-Integrated Circuit (I2C) channel. This VI returns the result when finishing reading all the bytes or when timing out.

Timeout ms specifies the number of milliseconds this VI waits for receiving a single byte before timing out.
I2C Ref In specifies the reference to the I2C channel. Use the Open VI to open a reference to the I2C channel. Do not modify the I2C Ref In values.
Slave Address (7-bit) specifies the address of the I2C slave device from which this VI reads data. You must specify the address in 7-bit. Some I2C devices might have a 8-bit address in which the first 7 bits represent the address and the last bit represents the mode of operation. For these kind of I2C devices, you must specify Slave Address (7-bit) using the seven most significant bits.
Byte Count specifies the number of bytes of data this VI reads from the I2C slave device.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Keep Bus Busy specifies whether to keep the I2C channel open so that you can perform additional operations. For example, set Keep Bus Busy to TRUE if a slave device requires a read operation followed by a write operation to perform a command. The default is FALSE.
I2C Ref Out returns the reference to the I2C channel that you specify.
Bytes Read returns the data that this VI reads from the I2C slave device.
error out contains error information. This output provides standard error out functionality.

Log in to get a better experience