Reading Zeros from I2C Device with myRIO-1900

Updated Nov 29, 2023

Reported In

Hardware

  • myRIO-1900

Software

  • LabVIEW myRIO Software Bundle

Issue Details

I am using a myRIO-1900 to communicate with an I2C device. I am using the I2C Express VI, but I am reading all zeros. How do I communicate with my device?

Solution

The I2C Express VI may be encountering an error and returning zeros because no acknowledgement is received from the slave device. The following troubleshooting steps may help resolve this issue. 
  • Review the device's manual and the myRIO-1900 manual to insure you have the proper wiring. You will likely need to have the following four lines wired from the myRIO to the I2C device:       
    • Power Supply
    • Ground
    • SCL 
    • SDA
  • Make sure the I2C device is wired to the connector used by the I2C Express VI. The myRIO has two connectors, connector A and connector B. You can configure which one the I2C Express VI uses by double-clicking on the express VI and selecting A/I2C or B/I2C in the channel dropdown. 
  • Review the device's manual for its I2C address. These addresses are often listed in hexadecimal. Check that you are wiring the correct value to the Slave Address input of the express VI by changing the input's representation to hexadecimal