How to connect a B&R PLC to an FTP server

Hi, is there a way to connect to a FTP server using a B&R PLC as client I’ve trying to use DevLink but I get error 20730. Is there a newer library or a better way to do it.

I’m using a X20CP1684 running AR S4.93.

thanks.

Hi @Jose_Veliz ,
when you call at least twice DevLink with the same device name it’s normal to get the error 20730: “A device with this device name already exists”

Ciao
Valerio

Hi, thanks for the response, the help page tells you that “This function block is executed asynchronously and must be called continuously until it returns a status other than ERR_FUB_BUSY (65535).” So I don’t know how to handle that without getting the error

I asked AI an example:
As you see below It developed a small state machine with 4 steps:

  1. You set you parameters
  2. You check the status of FUB
  3. In this step you can call FileIO function blocks for create, open, copy, close…file or directory
  4. error state: for error handling

Outside the state machine it calls the function block

Don’t forget to call DevUnlink to remove the device link.

==========================
in AS Help there are some examples how to use some FileIO function blocks

Ciao
Valerio

DevLink.zip (1.5 KB)