IEC file transfer

General

In the IEC driver the Controlling and the Controlled part of the file transfer are implemented. They are handled completely in the driver. No mapping on DPEs of the file transfer telegrams is done. So the interface to the application is the transmitted file. File transfer can be used with the IEC 101 and 104 driver.

Controlling Station:

If the driver is the controlling station the file transfer is triggered by the internal _Iec.FileTransfer DP of the corresponding driver. On the Command DPE the file transfer can be initiated and the state will be reported on the Status DPE.

The command for the retrieval of a file from the controlled station (SelectFile) is:

122 <coa> <filenumber> <section number>

E.g. "122 3.4 1234 1". This means get the file with the name ”r;1234” starting from section 1 from the COA ”r;3.4”.

(The COA is given as in the peripheral address panel HB.LB.)

The command for a indication to the controlled station, that a file can be retrieved (FileReady) is:

120 <coa> <filenumber> <section number>

E.g. "120 3.4 1234 1". This means, that the controlled station shall retrieve file ”r;1234” starting with section 1.

The format of the status response is:

<coa> <filenumber> <ERROR|OK>

E.g. ”r;3.4 1234 OK”.

Sending of a ”r;directory” command is currently not supported.

Controlled Station:

As a controlled station the driver will respond according to the IEC to the relevant file transfer telegrams.

File names

The files build the interface between the driver and the application. The application must provide the files in the "Out" directory, which should be transmitted and it can read the files from the "In" directory, which has been received (see also config entries "ftRootDir", "ftInSubDir" and "ftOutSubDir" for the definition of these directories).

In WinCC OA the IEC file sections are stored in separate files. So the sections 1 to 3 of IEC file 123 are named 123_1, 123_2 and 123_3 in WinCC OA. This was done to avoid a dependency on the file content.

Config file entries

The description of the relevant config entries for IEC file transfer ("ftTimeout", "ftRootDir", "ftInSubDir", "ftOutSubDir", "ftSegmentsPerLoop", "ftMaxQueuedReq") can be found in the chapter Possible IEC driver config entries.

The entries can be defined in the section for IEC 101 as well as for IEC 104.

Debug options

With the debug option:

-dbg ft

debug messages related to file transfer with IEC is written to the log file.

-dbg 2

can be used to show the telegram traffic.