12/8/2019 4:04 AM | |
Joined: 12/1/2018 Last visit: 11/28/2023 Posts: 18 Rating:
|
Dear everybody, I need to send .txt file (format as attached image) from s7-1200 to FTP server by FTP protocol. Can anyone help me? |
Last edited by: LeonardoDang2708 at: 12/08/2019 04:07:27Last edited by: LeonardoDang2708 at: 12/08/2019 04:08:14Last edited by: LeonardoDang2708 at: 12/08/2019 04:08:32 |
|
12/8/2019 1:17 PM | |
Joined: 9/27/2006 Last visit: 4/15/2025 Posts: 12346 Rating:
|
Hello Leonardo; This application example should provide guidance for your project: FTP client communication with S7-1200 /1500 https://support.industry.siemens.com/cs/ww/en/view/81367009 Hope this helps, Daniel Chartier |
This contribution was helpful to
1 thankful Users |
12/8/2019 3:04 PM | |
Joined: 12/1/2018 Last visit: 11/28/2023 Posts: 18 Rating:
|
Hello Daniel Chartier, Thank for your help. I saw this link, but this program creates .csv file, so when i open the file with .txt format, "," is added between words (wrong required format). I don't know to fix it. |
12/8/2019 3:33 PM | |
Joined: 9/27/2006 Last visit: 4/15/2025 Posts: 12346 Rating:
|
Hello Leonardo; This post by pat_lukas shows that these FTP functions work well for a .txt file on a S7-1500 (for a short file, < 10kB). There should be no variance with a S7-1200, it is the same function with the same family of processors. What error messages do you get when the file is refused by the server? Is your S7-1200 v4.2 or higher, as pointed out in the application example? What about your FTP server? Is it a server developed with the FileZilla Server program proposed in the application example, or is it a different server software? Is it enabled for only certain types of files? Hope this helps, Daniel Chartier |
Last edited by: dchartier at: 12/08/2019 15:34:31 |
|
12/8/2019 4:04 PM | |
Joined: 12/1/2018 Last visit: 11/28/2023 Posts: 18 Rating:
|
Hello Daniel Chartier, My problem is the file's format not same the required format. When i open the sent file, which was created by this program, it as photo below, different from the format i attached at first question. I think this program creates .csv file, so when i open it with text format, "," is added between words. |
Last edited by: LeonardoDang2708 at: 12/08/2019 16:05:29Last edited by: LeonardoDang2708 at: 12/08/2019 16:25:32 |
|
12/9/2019 8:16 AM | |
Joined: 4/25/2017 Last visit: 4/15/2025 Posts: 436 Rating:
|
Hi, You can create txt-files without ",". Just fill the array and send the file to the server. But note, the FB is only a limited function solution described in the document. For a better and more reliable function you should use a S7-1500 with CP 1543-1...
|
Best Regards, |
|
2/9/2020 6:10 AM | |
Posts: 1 Rating:
|
como haces, para que en el archivo .txt dimensiones todo sin ningún carácter invalido? porque yo lo creo y yo enviamos datos pero con otros caracteres. Espero tu respuesta |
2/9/2020 2:41 PM | |
Joined: 9/27/2006 Last visit: 4/15/2025 Posts: 12346 Rating:
|
Hola MZjean; Este foro de Siemens atrae a miembros del mundo entero, y no es cierto que todos entienden el español. Para que todos intercambien con facilidad, hemos escogido al ingles como idioma internacional. Haznos el favor de escribir en ingles a su próxima visita; si no es fácil para Ud, podemos recomendar a Google Translate, produce traducción muy comprensible si la lengua de órigen es escrita sin fallos. Hello MZjean; The Siemens forum attracts members from the world over, and it is not certain that all understand Spanish. To make exchanges easier,, we have selected English as an international language. Please write to us in English on your next visit; if this is a problem, we can recommend Google Translate, it produces a very understandable translation if the original text is without fault. Please send us a screenshot of the data you are sending through the archive, so we may see the results of the transmission. And point out the offending characters you would like th remove. Maybe someone here can help you. Hope this helps, Daniel Chartier Translation from the Spanish message:
|
2/10/2020 7:45 AM | |
Joined: 4/25/2017 Last visit: 4/15/2025 Posts: 436 Rating:
|
Do you mean the two characters at the beginning of the transmitted string? These are the first two bytes, which indicate the maximum and actual length of the string.
|
Best Regards, |
|
We are working on a new user interface with better overview and more relevance.
Follow us on