Copying CSV files to the FTP server (AXC F 2152)
Hello,
Is it possible to copy the CSV file from AXC 1050 to AXC F 2152 using an FTP server? Can I create an FTP server on AXC F 2152 and copy files from AXC 1050 using the ITL_FTP_FileCopy block?
I want to use data from CSV files from AXC 1050 in an application on AXC F 2152.
There are two discussions on this topic in the forum:
https://www.plcnext-community.net/en/discussions- 2-offcanvas / copy-file-between-plcs-with-fb-in-it-library.html # Reply-4358
https://www.plcnext-community.net/en/discussions-2-offcanvas/copying-files-from-ftp-server.html
From the first discussion it appears that this is not possible.
In the second, it says that from the PLCnextBase library it is worth looking at the FileCopyFTP function, but from what I understand it is the function for copying files via FTP in AXC F 2152.
Is there maybe any other way to copy the file than just FTP?
Is it possible to copy the CSV file from AXC 1050 to AXC F 2152 using an FTP server? Can I create an FTP server on AXC F 2152 and copy files from AXC 1050 using the ITL_FTP_FileCopy block?
I want to use data from CSV files from AXC 1050 in an application on AXC F 2152.
There are two discussions on this topic in the forum:
https://www.plcnext-community.net/en/discussions- 2-offcanvas / copy-file-between-plcs-with-fb-in-it-library.html # Reply-4358
https://www.plcnext-community.net/en/discussions-2-offcanvas/copying-files-from-ftp-server.html
From the first discussion it appears that this is not possible.
In the second, it says that from the PLCnextBase library it is worth looking at the FileCopyFTP function, but from what I understand it is the function for copying files via FTP in AXC F 2152.
Is there maybe any other way to copy the file than just FTP?
Comments
it should be possible to copy by AXC F 2152 via FTP from AXC 1050 to AXC F 2152.
AXC F 2152 will be the FTP Client. (https://www.plcnextstore.com/720 if the FTP command does not support this you can still use the ShellCommand_FB + cURL)
AXC 1050 has a FTP Server.
The AXC F 2152 does not have a FTP Server by default.
So it is not possible if you have the FTP Client on the AXC 1050.
(This does not include the option of Adding a FTP Server to the AXCF 2152 this is also possible but might be overkill.)
kind regards,
Oliver
"AXC F 2152 will be an FTP client", so I should be connected by entering AXC F 2152 in the ITL_FTP_FileCopy (AXC 1050 - strIP_AddressDestFTP, strUserDestFTP, strPasswordDest) function block. I had this configuration and the ITL_FTP_FileCopy block did not copy the CSV file. Unless I did something wrong or forgot something.
There are FTP copy function blocks in the PLCnextBase library, but will I use them to copy the file from AXC 1050 to AXC F 2152? I mean the PBCL_FileCopyFtp function block.
How does ShellCommand_FB + cURL work?
Kind regards,
Kacper
copy from FTP to FTP will not work because the AXC F 2152 does not have a FTP Server.
The PLCnext Base library can not copy from FTP but only copy files to FTP.
With the Shell + cURL you are able to use cURL to copy files.
See curl man pages or shell for curl --help for details.
probably something like this has to be inserted at the ShellCommandFB
"curl -u user: password 'ftp://192.168.1.2/files/ -o /opt/plcnext/myfilee.csv"
kind regards,
Oliver