Dears, suggestions will be appreciated, thank you in advance.
despite some attempts, I can not make sure that every add a new file in a already exist file on server, is not re-inserted the column headings. I have included a portion of the wrong file that I find on the server.
Here I include the instructions that I consider important to the case.
I have already updated the S.O. 29 of CR1000.
..............
DataInterval(0,60,Min,10)
TableFile ("USR:abr01_60min",8,0,1,0,Hr,newfile,lastfile)
......
OK_ftp=FTPClient (IPAddress,UserName,Password,"USR:abr01_60min.dat",Path,9,1,0,min,-1008)
or (but nothing has changed)
OK_ftp=FTPClient (IPAddress,UserName,Password,lastfile,Path,9,1,0,min,-1008)
The help fileoption seems clear:
".....The file created on the server will automatically be appended with an incrementing file number and a “.dat” file extension. If 1000 is added to the format (e.g., 1008), the datalogger will not automatically append the incrementing number or “.dat” extension to the uploaded file. If the FileOption parameter is entered as a negative value (e.g., -1008), if a file of the same name is already present, no additional header will be appended to the file. Instead, only new records are appended so that data records are contiguous............"
Here, part of the file that does not meet my needs.
It should have only the first header and this happens automatically every day with the new file name, but then not only append hourly data, but always inserts all headers.
I hope I was clear
regards
Smile
TOA5","E8810","CR1000","E8810","CR1000.Std.28.02","CPU:collelongo_lug16-tim-test.CR1","18775","Table101
"TIMESTAMP","RECORD","ta1_Max","ta1_TMx","ta1_Min","ta1_TMn","ta1_Avg","ta1","ta2_Max","ta2_TMx","ta2_Min","ta2_
"TS","RN","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp
"2016-07-18 09:00:00",0,NAN,"2016-07-18 09:00:00",NAN,"2016-07-18 09:00:00",NAN,NAN,225.8,"2016-07-18 08:11:00",
TOA5","E8810","CR1000","E8810","CR1000.Std.28.02","CPU:collelongo_lug16-tim-test.CR1","18775","Table101
"TIMESTAMP","RECORD","ta1_Max","ta1_TMx","ta1_Min","ta1_TMn","ta1_Avg","ta1","ta2_Max","ta2_TMx","ta2_Min","ta2_
"TS","RN","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp
"2016-07-18 10:00:00",1,NAN,"2016-07-18 10:00:00",NAN,"2016-07-18 10:00:00",NAN,NAN,225.9,"2016-07-18 09:01:50",
TOA5","E8810","CR1000","E8810","CR1000.Std.29","CPU:collelongo_lug16-tim-test.CR1","18775","Table101
"TIMESTAMP","RECORD","ta1_Max","ta1_TMx","ta1_Min","ta1_TMn","ta1_Avg","ta1","ta2_Max","ta2_TMx","ta2_Min","ta2_
"TS","RN","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp
"2016-07-18 14:00:00",2,NAN,"2016-07-18 14:00:00",NAN,"2016-07-18 14:00:00",NAN,NAN,225.8,"2016-07-18 13:00:50",
TOA5","E8810","CR1000","E8810","CR1000.Std.29","CPU:collelongo_lug16-tim-test.CR1","62265","Table101
"TIMESTAMP","RECORD","ta1_Max","ta1_TMx","ta1_Min","ta1_TMn","ta1_Avg","ta1","ta2_Max","ta2_TMx","ta2_Min","ta2_
"TS","RN","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp
"2016-07-18 16:00:00",1,NAN,"2016-07-18 16:00:00",NAN,"2016-07-18 16:00:00",NAN,NAN,224.9,"2016-07-18 15:58:30",
TOA5","E8810","CR1000","E8810","CR1000.Std.29","CPU:collelongo_lug16-tim-test.CR1","62265","Table101
"TIMESTAMP","RECORD","ta1_Max","ta1_TMx","ta1_Min","ta1_TMn","ta1_Avg","ta1","ta2_Max","ta2_TMx","ta2_Min","ta2_
"TS","RN","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp
"2016-07-18 17:00:00",2,NAN,"2016-07-18 17:00:00",NAN,"2016-07-18 17:00:00",NAN,NAN,225.1,"2016-07-18 16:01:40",
TOA5","E8810","CR1000","E8810","CR1000.Std.29","CPU:collelongo_lug16-tim-test.CR1","62265","Table101
"TIMESTAMP","RECORD","ta1_Max","ta1_TMx","ta1_Min","ta1_TMn","ta1_Avg","ta1","ta2_Max","ta2_TMx","ta2_Min","ta2_
"TS","RN","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp
"2016-07-18 18:00:00",3,NAN,"2016-07-18 18:00:00",NAN,"2016-07-18 18:00:00",NAN,NAN,225.4,"2016-07-18 17:01:50",
TOA5","E8810","CR1000","E8810","CR1000.Std.29","CPU:collelongo_lug16-tim-test.CR1","62265","Table101
"TIMESTAMP","RECORD","ta1_Max","ta1_TMx","ta1_Min","ta1_TMn","ta1_Avg","ta1","ta2_Max","ta2_TMx","ta2_Min","ta2_
"TS","RN","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp","Max","TMx","Min","TMn","Avg","Smp
"2016-07-18 19:00:00",4,NAN,"2016-07-18 19:00:00",NAN,"2016-07-18 19:00:00",NAN,NAN,225.5,"2016-07-18 18:01:50",
I think your problem is mainly caused by you mixing two different ways of storing and transferring data by ftp.
Originally we only used to support the tablefile method of creating a file (normally on the USR drive) and then later calling the ftpclient instruction to send that file. Tablefile itself does not support the append option as it creates a new file each time on the local drive.
FTPClient has no functions to take that stored file and change the headers if you choose the append option.
In OS26 we introduced the concept of streaming data into the ftpclient and emailsend commands where no file is stored on the local drive (so no need for Tablefile or a USR drive). Instead the data is read out of the normal datatables and sent directly either as separate files or, for ftp, you can append to a file that is already on an ftp server. If you use that option the logger should not repeat writing of the headers with the latest operating systems.
The streaming process is briefly described in the CRBasic help for these instructions. We probably need to write a tutorial on this topic, which I will suggest, but meanwhile can I refer you to the help and the examples associated with the help for these instruction. Please study the extra help on data streaming.
Note: we are aware that the append option does not work with some ftp servers which have slightly "non-standard" ftp responses. If you have a problem with the ftp append option not writing any data please contact your local support team who can provide you with pre-release copies of firmware for the logger, as we have fixing issues for different server types as they are reported to us.
Dear APS
many thanks.
I had underestimated the description of "streaming" named in the help and your note made me curious. Now I understand the two mechanisms, and everything works. Thanks again.
Smile