FTP

The Ewon gateway can act as an FTP client.

If your field device features an FTP server, The Ewon gateway is able to download and/or upload files through the FTP protocol.

This is done using the commands GETFTP and PUTFTP which are available in BASIC scripting as well as in JAVA language.

For example: if the field device's FTP server hosts a file (*.txt, *csv,...) that contains its IO values, the Ewon gateway can download the file, parse it and then copy the IO values in to its own tags.

Example in BASIC

ONSTATUS "goto GETFTPACTION_END"
REM: Field Device URL to get live data is ftp://10.0.0.54/IOdata.txt
GETFTP "IOdata.txt", "/usr/iovalues.txt" ,"user:pwd@10.0.0.54:21,1"
a% = GETSYS Prg,"ACTIONID"
END

GETFTPACTION_END:
	b% = GETSYS Prg,"EVTINFO"
	REM: CHECK THAT THE ONSTATUS EVENT HAS BEEN LAUNCHED BY THE GETFTP ACTION
	IF a% = b% THEN
		REM: TREAT THE FILE /usr/iovalues.txt HERE
	ENDIF
END

To get more details about the use of these functions, please refer to: