LabVIEW myRIO Toolkit

Write Read VI

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

Write Read VI

Owning Palette: I2C VIs

Requires: myRIO Toolkit or roboRIO Toolkit

Writes data to an Inter-Integrated Circuit (I2C) slave device and then reads a specified number of bytes of data from the I2C slave device. This VI returns the result when finishing writing or reading all the bytes, or when timing out

Timeout ms specifies the number of milliseconds this VI waits for writing or reading 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 to which this VI writes data or 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.
Bytes to Write specifies the data to write to the I2C slave device.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Byte Count specifies the number of bytes of data this VI reads from the I2C slave device.
I2C Ref Out returns the reference to the I2C channel with the transfer rate configuration.
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