FTP transfer by FileZilla

I am facing problem trying to connect eWon Flexy 205 to FileZille server. I configured FTP server on using FileZilla, with Host: localhost (host IP is 192.168.120.99), port 14147, and current password. I added user, Flexy205, with current name and password. I use all other default FileZilla settings (didn’t do any other changes but previous). I configured Flexy205 properly through wizards and check VPN route. I defined home directory folder in FileZilla (i believe for storing files on server).
After that, I added some tags (integer) into Flexy tag list. I also checked that all tags have good reading from PLC.
I now have demand to make .txt or .csv file with value of one tag and current tag reading time. Other plc tag (also added to Flexy) should be trigger. So I tried some action, but all if them end as failure. So I need your help about this situation.

In ABLOGIX IO Server setting I choose GlobalDeviceAddress as my PLC ethIP address with defined port and server. (192.168.120.71,1,0)
In Flexy 205 FTP setting I choose localhost IP(192.168.120.99) as FTP Server Address with FTP server port set as 21. As username I used user which I added in FileZilla with same password.

My question is, what next? :smiley:

I tried to make some planner in Flexy browser configurator, with adding syntax $dtHL$ftT$tnBoxesInLayer as File Content, without filling Destination File Name (as I found in user manual). After that I found here (HMS support) some similar problem and solution for it which was including using of PUTFTP syntax.
Init section
ONCHANGE “PalletDone”,“GOTO ftp1”

ftp1
IF(PalletDone@=1)THEN
a$ = “/PaletizerPecabesco/Boxes.txt”
b$ = “[dtHL$ftT$tnBoxesInLayer]”
PUTFTP a$, b$
ENDIF
END

I put this syntax into BASIC IDE Init section, but I didn’t get any file in.

My laptop is connected to Flexy through 1. LAN port (on Flexy).

Sorry for this kind of huge explanation but I am having this couple of problems for last three days, and I was forced to write you. Thank you for your help. If you have any other additional question, please be free to ask.

Hi @Vuk,

Just to make sure I understand, are you trying to get onto the Flexy’s FTP server to add some tags. I believe it should work with just the default port 21 if that’s the case. I think it also requires you to be logging onto the FTP server using the admin user and password for that device.

Are you getting any kind of error in the Flexy’s event logs after you run this section of code?

Hi Tim,
I added tags in Flexy configuration, and I have good tags reading from PLC(I read values correctly). In Basic IDE I created new section named ftp1, whit next body:

IF(PalletDone@=1)THEN
a$ = “/PaletizerPecabesco/Boxes.txt”
b$ = “[dtHL$ftT$tnBoxesInLayer]”
PUTFTP a$, b$
ENDIF
END

In Init section I defined next syntax:

ONCHANGE “PalletDone”,“GOTO ftp1” (Should this to in Cycle section??)

When I run code, I do not have any error report, but when my tag PalletDone changes its value to 1, I have next error explanation
Screenshot_2020-04-29Pecabesco_Paletizer_Flexy - BASIC IDE
I am logged on localhost server which IP address is 192.168.120.99. Same IP address I put in FTP setting for Flexy205. Flexy LAN IP is 192.168.120.90 and laptop is in same range 192.168.120.xxx
Inside this server, while I am logged on , I defined Users(which could communicate with FTP server). Also, I define SharedFolder as main server directory.
In Flexy205 FTP server setting is required to define Username and Password. Those Username and Password are matching Username and Password of defined User on FTP server (trough FileZilla).
I am just stacked with this error, and do not have any type of file in my SharedFolder.
If you have any suggestion or additional question, please text me.

Hello,

to start with, we do not recommend that you put any code in the cyclic section if possible. This section of code will run once every processor cycle and can very easily cause stability issues depending on how involved the code in that section is.

You should be able to put the whole code in the Init section.

Try running it like this and let me know if it works.

Onchange “PalletDone”, “@ftp1()”

Function ftp1()
IF(PalletDone@=1)THEN
a$ = “/PaletizerPecabesco/Boxes.txt”
b$ = “[dtHL$ftT$tnBoxesInLayer]”
PUTFTP a$, b$
ENDIF
ENDFN

Also question, should I use passive ftp connection, and what that means?

You might be able to get it working with passive if it’s not working with active.This was the easiest way I found to explain passive vs active

Hello,

I tried this code, after value change of PelletDone from 0 to 1, I haven’t get any error, neither any other info.


The value now is 1. The code is ok.

Also, on FileZilla I do not have any info about data changing, Sharing folder is still empty.
Is there maybe possibility of failed FTP server configuring?
Because, when I turn on FileZilla (eWon and laptop are connected, IP range is 192.168.120.xxx) there is no info on FileZilla display of eWon server connection.

See the received bytes, it is 0.

Can I try and jump on to test this over Teamveiwer?

https://s3.amazonaws.com/hms-networks-s3/original/1X/HMS_QS.exe

Hello Tim,
I would appreciate very much, but currently I am not at my work. Here is 6pm. Can we arrange Teamviewer meeting for tomorrow? Please suggest time you will be available most! Thank you.

Hi @Vuk,

I should be free tomorrow from 8:00 AM to 10:30 AM Eastern time

I am good with it. I ll text you here 9am tommorow.

Ok sounds good

Hello Tim,
I am ready for TV.

Sorry about that, I think there was some confusion about the times. We’re on the east coast of the united states and our hours are from 8:00AM to 5:00PM. Are you available now to take a look at this?

Yes I am. Everything is ok.

What was the solution here? I try somethink similar. I want to write historical data via ftp to an client where filezilla is running in local network. It is a peer to peer connection. Localhost is able to connect to ftp server but for my flexy 205 it isn’t possible.

Can you let me know when you’re available and I’ll try and setup a time to take a look at this with you over TeamViewer?

Hi Tim,
i will be back at office Tomorrow (Thursday). I stay at Germany. It would be nice if we could solve the problem tomorrow.

Okay i solve it by my own. I diasable the firewall on ftp server side, and set ewon flexy to passiv ftp mode. Now it works.