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.

FtpClient


passat Oct 2, 2018 07:40 PM

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


nsw Oct 12, 2018 02:46 PM

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.

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