So i did some scouring but I couldn’t find an official document that details the outline of logging to the SD card. However, i was able to find some example code.
Tset 1,600 //timer set for 600 seconds
Ontimer 1, “@write_data” // every 600 seconds it will call the function write_data
T$ = TIME$ // grabs the current time
$Date$ = T$ (4 To 5) + “" + T$ (1 TO 2) + "” + T$ (7 TO 10) + “" + T$(12 To 13) + "” + T$(15 To 16) + “_” + T$(18 To 19) // puts the time into this format MMDDYYYY HHMMSS
$CustomFileName$ = “Historical_Log_” + $Date$ //names the file “Historical_Log_” followed by the current time
$FileName$ = “/usr/” + $CustomFileName$ + “.csv” //writes it into the usr directory and writes it as a csv file
$EBD$ = “$dtHL$ftT$st_m10$et_m0$ut” //dtHL is historical logs for all tags, ftT is saying its a text filetype st_m10 means it’s grabbing all the data from 10 minutes ago
// et_m0 means that it’s going from 10 minutes ago to the current time.
// to modify what is being grabbed please visit: https://ewonsupport.biz/ebd/
Print $FileName$ // just says the current name of the file
WriteEBD $EBD$,$FileName$ // writes the csv to the sd card
print “Historical data written” // just a check to see that it made it to this step and lets you know that it performed the writeebd
You can modify the code above to write the write to the Card.
As for the buffer space, The buffer space is defined with the memory. You will need to create frequent logs files, in order to ensure that none of the data is overwritten if you increase the speed of logging.