11-23-2018 05:48 AM
Hi,
I programatically transfer a n ASCII file from a PC to a Compact RIO using 'FTP Put File VI'.
It works in that sense, the changes are in the file, but the last lines from the file are missing.
The screenshot shows it in a KDiff3 window: left is the new file, right is the old for reference.
It is not a serious issue in my case, as the Compact RIO software starts with the new file, but it would be useful to find out if I do something wrong or this is a issue with the VI. In either case, any suggestions would be welcomed. Thanks.
Regards,
Zoltan
11-23-2018 09:18 AM
Seems to me the FTP upload is sending a file that isn't flushed. Are you sure the file you upload is containing all the data? If it's written right before sending it, you might need a flush after the write.
01-21-2019 05:26 AM
Yes, I was searching for something like flush, but I could not find anything like that.
As it is not causing problems for me and it seems I am the only one with this issue, there is no need to do any further digging.
Thanks,
Zoltan
01-22-2019 03:06 AM
@ZoltanMTS wrote:
Yes, I was searching for something like flush, but I could not find anything like that.
The Flush File function does that. Quick drop for "Flush" makes that easy.
01-22-2019 06:30 AM
Hi,
I am using the FTP pallet: and I cannot see a Flush vi
The only Flush I have found is under FileI/O > Advance File Functions
But the FTP file transfer vi has no refnum
Regards,
Zoltan
01-22-2019 07:27 AM
Can you write to a new file (as opposed to overwriting) and see if all of the data is there?
01-22-2019 09:06 AM - edited 01-22-2019 09:08 AM
It might not be an FTP problem. You're FTP-ing a file, that might not be completely written, because it needs to be flushed. If it's not flushed, you might be FTP-ing an incomplete file. So the file needs to be flushed before FTP-ing it.
This is all speculation, as we can't see what you're doing. But if you write a file and then send it through FTP, it might be (part of) the problem.