03-02-2016 07:36 AM
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?
03-03-2016 06:54 AM
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