Driver TFTP For Elipse: 1. Overview
Driver TFTP For Elipse: 1. Overview
1. Overview
The driver TFTP implements a TFTP client that can read (receive) and write (send) files from/to remote servers,
using the UDP protocol. This driver is implemented using Windows Socket services 32 bit version 2.0, so the
Windows version used must support it (default for Win98, 2000, Me). The TFTP protocol is a very simple protocol
that allows the transfer between two systems. This driver implements the option extension that can be used if
desired.
Only one transfer at a time is supported. The transfer is started using a BLOCK tag write, and its status can be
polled using another BLOCK tag read.
The driver was implemented using the description of this protocol that can be found in RFCs 1123, 1350, 2348
and 2349 (available at many Internet public servers).
This driver can be used with default parameters leaving all parameters in zero.
The parameters are as follows:
= 0: 512 (default standard, recommend if the server can't be configured or doesn't support the
options extension.)
= 8 .. 65464 (valid block size range, in bytes)
P3: Enables or disables TFTP option's extension. This options allows the driver to request the total file
size from the server, and also negotiate
a size different from the standard 512 bytes.
= 0: Don't try to use this TFTP extension (it's recommend to use the default block in this case)
= 1: Try to use options extension
= 2 .. 65535 : Other values are invalid and result in error
0 - Transfer mode: Set the transfer mode used when reading the files and writing them to the disk.
Value: MODE (numeric format), one of the following:
0: binary mode - no translation ("octet")
1: text mode ("netascii")
This PLC tag can be read/write automatically and supports scan reads.
99 - Abort transfer: writing any value to this tag aborts (cancels) the current transfer.
0 - Get Status: this function returns the driver status including the following 4 numeric elements:
This BLOCK tag can be read automatically and supports scan reads.
1 - Read File: this function requests a file from a TFTP server and saves it locally, it can be used with 2 or 3
text format elements, as follows:
Element 0 (Text format) - Valid IP address (doted format) or machine name of the server
Element 1 (Text format) - Name of the remote file to be retrieved, can include a path name if supported
by the server. If the tag is used in 2 elements format, the same name (excluding the path) is used for
the local file that will be saved in the current directory.
Element 2 (Text format) - This optional element, when used, specifies the name of the file created
locally. It's a normal file name and can include an optional path.
This BLOCK tag is recommend only in non-automatic reads, because only one transfer can be done
at a time.
2 - Write File: this function send a file to a TFTP server and saves it locally, it can be used with 2 or 3 text
format elements, as follows:
Element 0 (Text format) - Valid IP address (doted format) or machine name of the server
Element 1 (Text format) - Name of the local file to be sent, can include a path name if supported by the
server. If the tag is used in 2 elements format, the same name is used for the remote file (excluding the
path).
Element 2 (Text format) - This optional element, when used, specifies the name of the file created
remotely. It's a normal file name and can include an optional path (if supported by the server).
This BLOCK tag is recommend only in non-automatic reads, because only one transfer can be done
at a time.