DrShanester (Customer) asked a question.

I am using FTPPUT to send a saved log file to an ftp server. More than half the file is missing at the destination. Interestingly, the 1st missing data is ALWAYS right after the 1st 8192 bytes. I get a confirmed success bit very time.

I am using the latest Do-More Designer ( 2.11.3) and I have updated the firmware as well. I am also emailing the file to myself, which SOMETIMES works, but is often missing data as well. The ftp server (vsftpd) is on a linux box


  • HOST_franji1 (HOST Engineering)

    I highly recommend you try to isolate the issue with a non-VPN'd FTP server, just to ensure that the issue shows up on the PLC side, not the VPN side.

    Selected as Best
  • HOST_franji1 (HOST Engineering)

    Q1. How big is the file?

     

    Q2. What File System are you using, SD Card or RAM drive?

     

    Q3. Have you tried transferring the file via Do-more Designer (PLC->Browse PLC File System). Do you see the same issue(s) with the file using Designer?

     

    Q4. Is this the same file name all the time, or does it happen with all instances of any file name?

    Expand Post
  • DrShanester (Customer)

    Q1. File size: 37KB

    Q2. SD card. I've tried both. Problem seemed to be worse on RAM FS.

    Q3. File is intact when retrieved using Do-more Designer Browse PLC File System.

    Q4. I've tried so many different approaches; right now, I'm using the "Use unique file name in Remote Directory" option and it happens regardless. I have sent the same file repeatedly and get similar results every time: missing rows after 8192, then good data for a few rows, then more missing rows. Sometimes the break happens in the middle of a row, but sometimes not. I have a sequence number in every row, and timestamp, so I can tell very easilly where the missing data should be. Sometimes the file is truncated, rows missing from the end as well. The EMAIL instruction seems to work better, but not reliable. btw, the way I am determining where the 1st missing data happens is by deleting everything after the 1st break in continuity and checking the filesize (always 8192-8196 bytes).

    Expand Post
  • HOST_franji1 (HOST Engineering)

    How is the file being created/generated on the PLC? FILELOG, or manual FILE OPEN/WRITE, or ?

    • DrShanester (Customer)

      The file I'm sending is a copy of a FILELOG that is saved using FILECOPY. When the FILECOPY succeeds, I start a 500ms ONDTMR, then trigger the EMAIL of the copied file (using a rising edge contact on the delay tmr .done bit), then I wait for the success bit of the EMAIL instruction to trigger another 500ms delay before triggering the FTPPUT (rising edge of the delay tmr .done bit).

      • DrShanester (Customer)

        I've also downloaded the file using Do-more Designer, edited it using Excel to add columns and increased the file size to over 100K, uploaded it back to the SDCardFS and manually triggered the EMAIL and FTPPUT to prove that the problem ALWAYS starts at 8192-8196 bytes.

      • DrShanester (Customer)

        I should also mention that the PLC and vsftpd FTP server are in different physical locations connected via "SpeedFusionVPN"

      • HOST_franji1 (HOST Engineering)

        I highly recommend you try to isolate the issue with a non-VPN'd FTP server, just to ensure that the issue shows up on the PLC side, not the VPN side.

        Selected as Best
      • HOST_franji1 (HOST Engineering)

        FTPPUT utilizes the Do-more Logger detailed logging mechanism (see Debug->Do-more Logger, help topic DMD0283). Enable the dump and turn on Level 2 (errors and messages - remember to turn this OFF once done "debugging")

         

        I also ran this through AI (i.e. issues on partial files using non-secure FTP PUT via VPN) and one of the things it said to try was force PASSIVE MODE (that's one of the options in the Designer FTP Device setup - make sure that's checked).

        Expand Post
      • DrShanester (Customer)

        Eliminating the VPN was the solution. I set up a Windows FTP server on my local network and viola, no missing data.

      • HOST_franji1 (HOST Engineering)

        What about EMAIL? Or do you not need EMAIL to work over VPN since the local FTP works???