From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Data from I2C continuously

We are trying to program a datalogger, but we encountered a problem.

 

We are using a timed loop to read the data from a analog input on the NI myRIO and to write this data on a .csv file. We are getting the time from a RTC(DS1307) module, which is connected to the I2C interface on the device(http://forums.ni.com/t5/Academic-Hardware-Products-ELVIS/How-to-change-time-on-myRIO/td-p/2806928). The problem is that we want to run the timed loop in parallel mode with the DS1307 module, so we can log the time and the data from the sensor at the same time. When we run the program, the I2C interface is just read once, so we have the exactly same time for more measurements.

 

Does anyone know how we could fix this problem?timed loop.JPGI2C_timestamp.JPG

0 Kudos
Message 1 of 2
(3,188 Views)

Dear harisborovina,

 

I guess that you need to use a second loop which is in parallel to the one you already have.

Without the second loop yo only read the time once.

 

Best regards

Jörg

0 Kudos
Message 2 of 2
(3,122 Views)