0% found this document useful (0 votes)
42 views3 pages

Driver TFTP For Elipse: 1. Overview

This document describes the TFTP driver for the Elipse PLC. The driver implements a TFTP client using UDP to read and write files from remote servers. It supports transferring one file at a time. The driver status and operations can be monitored and controlled using PLC tags of type MODE and BLOCK. The BLOCK tags allow starting file transfers, getting transfer status, and aborting operations. The driver uses default settings but these can be configured using communication parameters.

Uploaded by

jonathanmartin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views3 pages

Driver TFTP For Elipse: 1. Overview

This document describes the TFTP driver for the Elipse PLC. The driver implements a TFTP client using UDP to read and write files from remote servers. It supports transferring one file at a time. The driver status and operations can be monitored and controlled using PLC tags of type MODE and BLOCK. The BLOCK tags allow starting file transfers, getting transfer status, and aborting operations. The driver uses default settings but these can be configured using communication parameters.

Uploaded by

jonathanmartin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Driver TFTP for Elipse

Driver file: TFTP.DLL


Manufacturer: None, generic protocol
Product: TFTP Client
Protocol: TFTP (using UDP)
Release: January 19, 2001

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).

2. Communication driver's (p) parameters

This driver can be used with default parameters leaving all parameters in zero.
The parameters are as follows:

P1: Transfer Block size (in bytes)

= 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)

P2: Time out value (seconds)

Valid range is from 1 to 255


= 0: 5 s (default driver value)
= 1: 1 s
= 2: 2 s
=.
=.
= 255: 255 s

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

P4: Socket Port

= 0: default TFTP service port (69 decimal, recommended default option)


= 1 .. 65535 : port number (not recommend, unless explicitly needed by an non-standard
server)
3. Addressing parameters for PLC type Tags

Read/ Write N1 N2 N3 N4 Value


(Read/Write) 0 (Transfer mode) (Not used) (Not used) (Not used) MODE
(Write only) 99 (Abort transfer) (Not used) (Not used) (Not used) (Not used)

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.

This PLC tag should not use automatic writes.

4. Addressing parameters for BLOCK type Tags

(Read/ Write) N1 N2 N3 N4 Size


(Read only) 0 (Get Status) (Not used) (Not used) (Not used) 4
(Write only) 1 (Read file) (Not used) (Not used) (Not used) 2 or 3
(Write only) 2 (Write file) (Not used) (Not used) (Not used) 2 or 3

0 - Get Status: this function returns the driver status including the following 4 numeric elements:

Element 0 (Numeric format) - Driver status code, like follows:


-1: Busy, requesting / transferring file from the server
0: Current operation canceled (finishing connection)
1: Idle, no transfer
2: Last file transfer successfully finished
3: Last file transfer finished with error
Element 1 (Numeric format) - Error code for the last operation
0: No errors
1: Server address error, server invalid or not found
2: Error accessing the local file (disk full, access violation)
3: Error from the TFTP server
4: General communication error
5: Busy, can't start another transfer, already working
6: Last operation cancelled
Element 2 (Numeric format) - Total bytes transmitted in the current/last operation
Element 3 (Numeric format) - Total file size for the current/last operation (only informed if the server
supports the TFTP extensions and the driver uses it)
-1: Unknown (TFTP options not used)

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.

You might also like