Hello all. I am trying to figure out a problem I am having with data logging. It is my hope you could help me out with this.
I am running a V1210 with a V200-18-E4XB IO snap in. I am trying to log data to an SD card for long periods of time.
To do so, I am using the "Write Data Table to SD" utility and copying the data from a previously populated table. I have already checked and found that I am able to write the data to the table no problem. However, when i run the data logging for an extended period of time, eventually data logging to the SD card stops (I am watching the write success bit, which gets set to 0 permanently when data logging stops). It seems to be stopping within ~30m when there are zero user inputs being applied.
I am writing to the DT1 folder using the udt file name of Testlog.udt. I am selecting to append to .udt file.
My code waits for the data logging toggle to be pressed from the hmi. When it is, a direct contact goes to a 1 second timer. After 1 second, I check to see that my counter (starts at 0) is less than 5, update the clock values, then write 10 values to the data table using the "Data Table Write Row" function. I then increment my counter. Note that my data table has 5 rows.
The next net checks if the counter is greater than or equal to 5. If so, the code passes through inverted SB 341 (to make sure the SD card is not currently being written), then runs the "Write Data Table to SD" utility. I then reset the counter after the data write utility is executed (this is in series with the utility and is not called when data logging to the SD card fails).
I have attached images of the code, the write to sd card utility settings, and the data table.
Any help is appreciated.