LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FTP transfer from host to cRIO in Labview

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.

configDiff.png

 

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

0 Kudos
Message 1 of 7
(2,840 Views)

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.

Message 2 of 7
(2,815 Views)

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 

0 Kudos
Message 3 of 7
(2,737 Views)

@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.

0 Kudos
Message 4 of 7
(2,725 Views)

Hi,

 

I am using the FTP pallet: and I cannot see a Flush vi 1.png

 

2.png

 

The only Flush I have found is under FileI/O > Advance File Functions

  3.png

But the FTP file transfer vi has no refnum

 4.png

 

Regards,

 

Zoltan

 

0 Kudos
Message 5 of 7
(2,720 Views)

Can you write to a new file (as opposed to overwriting) and see if all of the data is there?

0 Kudos
Message 6 of 7
(2,711 Views)

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.

0 Kudos
Message 7 of 7
(2,703 Views)