Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR6, TableFile, continuous mode


xfrantzis Jul 6, 2018 07:58 AM

Hello,

I have used the TableFile instrucion in CRbasic programming to store dalily files in the SD card

DataTable(water_level,True,-1)
DataInterval(0,6,Min,10)
TableFile ("CRD:KVR_",8,-1,0,1440,Min,OutStat,LastFileName)
Minimum(1,BattV,FP2,False,False)
Average(1,Temperature,FP2,False
Sample(1,KVR7,FP2)
Average(1,KVR7,FP2,False)
Sample(1,KVR6,FP2)
Average(1,KVR6,FP2,False)
Sample(1,KVR6_voltage,FP2)
Average(1,KVR6_voltage,FP2,False)
EndTable

1. Is there a way to store the same data in continous mode (append to the same file) in the SD card?

2. Also I have used the Timestamp instruction to rename the SD card files:

 If IfTime( -1,1440,Min) Then
Filename=LastFileName
TStamp=Public.Timestamp(1,1)
(TStamp,12,2)+"_"+Mid (TStamp,15,2)
TStampParse="CRD:KVR_"+Mid(TStamp,7,4)+"_"+Mid (TStamp,4,2)+"_"+Mid(TStamp,1,2)
FileRename(LastFileName,TStampParse+".log")

the result from the above renames the stored files (KVR6_X.dat) to  KVR_2018_07_06.log (for 06 July 2018).

My problem is that the above date reffers to the rename time, which is performed one day later.

data correspond to the 5th of July. Can I use negative vallues in the TimeToInterval options? For example:

TableFile ("CRD:KVR_",8,-1,-2,1440,Min,OutStat,LastFileName)

which will write the file 2 min before middnight, and

If IfTime( -1,1440,Min) in the rename process, which will rename the file 1 min before midnight.

Thank you very much


Uri Jul 6, 2018 06:06 PM

You can use 'CardOut' instruction to continuously store data to the MicroSD card.

Remember to press the eject button befor removing the card.

Log in or register to post/reply in the forum.