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?
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.
This is happening on a CR300-CELL200 with the latest OS 9.00 from barely a week ago.
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)