Function Description
The WR_DATA_TO_FILE function enables a direct address
variable (%MW1000), a located variable (VAR0
@ %MW1000), or an unlocated variable to be written to a file.
The value written is added after the current position in the file. After writing, the current position of the file is updated.
The additional parameters EN and ENO can be configured.
FBD Representation
The representation in FBD of the WR_DATA_TO_FILE function is as follows:

Ladder Representation
The representation in Ladder of the WR_DATA_TO_FILE function is as follows:

IL representation
Representation:
CAL WR_DATA_TO_FILE_Instance (REQ:=WriteDataToFileStart, FILEDESC:=WriteDataToFileDescriptor, VARIABLE:=WriteDataToFileVariable, DONE=>WriteDataToFileDone, ERROR=>WriteDataToFileError, STATUS=>WriteDataToFileStatus)
ST representation
Representation:
WR_DATA_TO_FILE_Instance (REQ:=WriteDataToFileStart, FILEDESC:=WriteDataToFileDescriptor, VARIABLE:=WriteDataToFileVariable, DONE=>WriteDataToFileDone, ERROR=>WriteDataToFileError, STATUS=>WriteDataToFileStatus);
Parameter Description
The following table describes the input parameters:
Parameter |
Type |
Comment |
|---|---|---|
|
|
This parameter specifies the file
descriptor returned by the |
|
|
This parameter specifies the variable to write to the file. Any direct address variable ( To
write a table of |
Description of common parameters.

