Overview
Type:
|
Function
|
Available as of:
|
SystemInterface_1.32.6.0
|
Versions:
|
Current version
|
Task
Open the file for reading. The file is opened only with reading rights.
Description
This function opens a file i_sFilename for read access.
The standard device is "ide0:". i_sFilename can be a short standard name or a complex name. A default name consists of one to eight characters (A ... Z, 0 ... 9). The device name "ide0:" and the file name extension ".dat" are appended by the system. A complex name consists of device name, file name, and file name extension.
NOTE: The operating system on the PacDrive III controller allows opening a file multiple times at the same time. No diagnostic message is generated.
NOTE: The processing time of this function is a few hundred milliseconds. This is why the times for the cycle check of the task in which this function is performed should be increased one-time. For example FC_CycleCheckTimeSet(500, 2).
Interface
Input
|
Data type
|
Description
|
i_sFilename
|
STRING[80]
|
Name of the file from which you want to read from
|
Return Value
Data type
|
Description
|
DINT
|
FileID: Identification number of the open file (> 0)
-1: File not existent
-2: Too many files open
|