Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-9402 I2C Reading Erroneously from a Sensor

Solved!
Go to solution

Hello Amy4082001,

 

If the CH0 is having this behavior, it's likely to be a hardware problem and might need to be sent for repair. Please, open a Service Request for handling this

 

Regards,

PedroR

0 Kudos
Message 11 of 13
(846 Views)

Thanks, I'll do just that.

0 Kudos
Message 12 of 13
(844 Views)
Solution
Accepted by topic author Amy4082001

Hello Brian et al,

 

I figured out the solution to the erroneously/noisy/shifted sensor output.  Basically, I needed to provide adequate WAIT times for the I2C read.  I was providing WAIT times, but it wasn't enough, and apparently, the WAIT times for the 1st sensor is different than the other 3 sensors (IDK why). 

 

I've attached the image of my block diagram and I highlighted where, in this loop, I provided this WAIT time.  I am also attaching my Labview code so if other people want to use the NI-9402 as an I2C module, they don't have to go through the pain of figuring out how it works.

 

For my system, I'm using the NI-9402 as an I2C module to talk to four MC3672 sensors.  Then, I'm calling my NI-9402 code in my cRIO-9039 environment to sync with some motors that I'm running. 

0 Kudos
Message 13 of 13
(830 Views)