FTP Connection from B&R

I am having Problem regarding connecting a FTP Server in network from B&R in my Host PC.

This is my code

zpMU_Unit.Inst.Prv.Temp.device := ‘FTPTest’;
zpMU_Unit.Inst.Prv.Temp.param := ‘/SIP=192.168.0.50 /PROTOCOL=ftp /USER=username/PASSWORD=password’;
zpMU_Unit.Inst.Prv.Temp.ftpClient(enable := TRUE, pDevice := ADR(zpMU_Unit.Inst.Prv.Temp.device), pParam := ADR(zpMU_Unit.Inst.Prv.Temp.param));

With this code, I keep having Error No 65535 and i_result 9999

My IP address of FTP is inside a pc with ip address 192.168.0.50 and we are in the same network. My ARSim is H4.93 and I could save the file locally but I cannot connect to FTP.

Hi,

You are using ArSim and by default ArSim as access to 127.0.0.1 interface. This interface cannot access your IP 192.168.0.50. You can change ArSim IP address from configuration and set it to 0.0.0.0 but take care it will be able to listen on all your PC interfaces.

Hope that could help,

Regards,
Florent

Thank you for the response. I have tested that way but it is not connected to my FTP Server yet.
I have found this on CPU Properties - FTP Server and maybe it might be the problem of no connection as mine is ARsim H4.93

I will have to test it on actual hardware and see the update, if it works or not.

Regards,
Myat

Hi,
Hum I think that this CPU properties “FTP server” is not available on ARSim, but it means that you can’t create a FTP server with an ARSim, but I’m pretty sure that you can be a FTP client.

But your right testing on real hardware could be a good solution :slight_smile: