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.

CR1000X Datalogger - Reading from SD Card for FTP Streaming

Shreeshant Jan 4, 2021 06:21 AM


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? 

GaryTRoberts Jan 4, 2021 09:09 AM

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.

Shreeshant Jan 4, 2021 09:44 PM


Below is the code for the CR1000X:



WindVector (1,WS_ms_2,WindDir_2,FP2,0,0,0,1)




' 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

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?

GaryTRoberts Jan 4, 2021 09:59 PM

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.

Shreeshant Jan 4, 2021 10:15 PM

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. :)

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