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.

Stream multiple tables to separate files at once


TimoRoth Jul 1, 2019 04:33 AM

 I would like to stream two of our tables to an FTP server:

SlowSequence
Scan(1, Min, 0, 0)
	If TimeIntoInterval(0, 10, Min) Then
		FTPResult = FTPClient(FtpServer, FtpUser, FtpPass, "Measurements,DiagData", "measurements_" & Status.StationName & ".dat,diagdata_" & Status.StationName & ".dat", 19, 0, 0, Min, -1008, 30000)
		TimeOffset = NetworkTimeProtocol(NtpServer, 0, 500)
	EndIf
NextScan
EndSequence

 This generally works fine, except that in the second file, the DiagData, it appends the TOA5 header lines every time it streams to the file.

I would like to avoid a second FTPClient line, since that means a whole second round of establishing the FTPS connection, which is quite costly over a slow mobile link, on a slowish CR300 CPU.

Is there some flag I need to set to avoid it appending the header to the second file over and over again?


JDavis Jul 1, 2019 03:02 PM

Make sure the operating system version on your datalogger is up to date. There was a bug fixed quite some time ago that would cause the behavior you are seeing.


TimoRoth Jul 1, 2019 03:11 PM

This is happening on a CR300-CELL200 with the latest OS 9.00 from barely a week ago.


ryan42 Jul 8, 2019 06:37 PM

I can also confirm this is not working on CR800.OS32.03

It is not writing anything in the second file, it is just putting an empty file on the server. It also writes a file if the FTPClient instruction is called before any data is logged rather than returning -2

FTPClient (server,username,password,dataTableName & "," & rainTableName, _
dataFileName "," & rainFilename,0,0,0,min,1008)

 

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