I am using the FTPClient function to directly from a data table to the server, eliminating the need to first write the data to a local file prior to transfer.
My problem is that when a transmission is not successful the logger doesn’t retry to send the data.
Is this normal?
Is my code the problem?
SlowSequence
Do
' Send data file to the primary FTP server.
If Station_1m Then
FTPFileStatus = FTPClient(PRIMARY_FTP_SERVER_IP, PRIMARY_FTP_USER, PRIMARY_FTP_PASSWORD,"T_Out_1m",FTP_MINUTELY_REMOTE_PATH & MessageOut & "_61_" ,2,1,0,min,15)
EndIf
Loop
EndSequence
Thanks
The "FTPClient" instruction does not have a "retries" option in the parameter definitions. You have the result of the FTP attempt in your result variable :-
This function returns -1 if successful, 0 if it fails, or -2 if execution did not occur when the instruction was called
You will need to build in one or more retries in a loop if this is what you want to do.