File_Open - Phoenix Contact ILC 330 User Manual

Inline controllers
Table of Contents

Advertisement

UM EN ILC 330/350
3-4
PHOENIX CONTACT
3.5.1

FILE_OPEN

The FILE_OPEN block is used to open a file in the parameterization memory with a specific
name.
Figure 3-2
FILE_OPEN block
Assign a STRING variable containing the name of the file to be opened to the "Name"
input.
Activate the block on a rising edge at the "Execute" input. The file is opened.
If the file to be opened does not exist, it is created on the data carrier. The file is opened
with read and write access rights. If "Done" is set to 1 and "Error" = 0, a valid file handle is
present at the "Handle" output.
If an error occurred during execution, the value at the "Error" output = 1.
"ErrorID" indicates the number of the cause of the error.
When using the block, please note:
This block can activate up to eight instances at the same time. This means that only
eight different files can be opened at the same time.
The same file may not be opened more than once.
The file to be opened must not be write-protected, because files are always opened
with read and write access rights.
The variable in which the file name is entered must be a STRING data type.
The file name must not exceed 80 characters in length.
The status of the "Done", "Error", and "ErrorID" outputs is maintained until a falling
edge is detected at the "Execute" input.
6959_en_05

Advertisement

Table of Contents
loading

Table of Contents