Hi!
I have been writing the data on the SD Card using the CardOut Function. While posting the data to the server, i am using FTPClient with the TableName. How can i confirm that the data retrieved is from the SD Card and not the datalogger memory as the table name will be same for both?
If you would post your CRBasic code with the FTPClient instruction to this site, we can then tell if the FTPClient instruction is streaming the data from memory or from the logger's stored table files. If streaming, the filename option will show "USR:" or "CPU:" or "CRD:" in the file name string. If streaming, it will just list the table name "DataTableOne" or something like that.
Hi!
Below is the code for the CR1000X:
DataTable(Minute10,True,-1)
DataInterval(0,10,Min,10)
CardOut(0,-1)
WindVector (1,WS_ms_2,WindDir_2,FP2,0,0,0,1)
FieldNames("FF_2_10M,DD_2_10M")
Average(1,TempC,FP2,False)
FieldNames("T_10M")
Average(1,RH,FP2,False)
FieldNames("RH_10M")
EndTable
SlowSequence
Scan(30,Sec,3,0)
' If OutStat Then OutStatTrig=True
TStamp = Public.Timestamp(5,1)
Result(1) = FTPClient (Server,User,Pass,"Minute10","/source/Dingboche_MIN_10 " & TStamp & ".dat",2,0,10,Min,1008)
' OutStatTrig=False
NextScan
EndSequence
So do i need to write "CRD:Minute10" as a source while streaming data from the SD Card?
My code is currently just posting the one last 10 minutes data. Is there anything i could do so that it will stream the previous data which were which were not able to stream before due to lag in communication?
That code shows us that the logger is streaming the data directly from the datalogger's memory. You will have to generate more CRBasic code if you want to have it send the data table files created on the datalogger's file system. Just changing the source to "CRD:Minute10" won't do the trick. You will have to find the last file name created and then put that in a variable then feed it to the FTPClient instruction. It is a lot more involved.
Streaming, as you have it now, if more effective as the logger is able to keep track of successful and failed transmissions and automatically adjust the sending of all the data. If you chose the use the file (non-streaming method) you will have to generate the CRBasic code to keep track of successful and failed transmissions, delete files, etc. Something along the lines of the example code shown at the end of this thread (using TableFile instead of CardOut).
More information on why streaming is better than using TableFile is also listed here with examples.
Hi Gary!
Thank you for the Explanation. I am trying to get the data posted from the Card in case of communication failure and if the logger memory runs out as i have more data to be added to the table. I will check out the TableFile and the examples and review my codes. :)