FC_DeleteFile - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.32.6.0

Versions:

Current version

Task

Delete file.

Description

The function deletes the file which is designated as i_sFilename. i_sFilename can be a short default 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 processing time of this function is a few hundred milliseconds. There must be a one-time increase in the times for the cycle check of the task in which the function is executed. For example FC_CycleCheckTimeSet(500, 1000).

If you try to delete a system file that is not editable with this function, then you get -5 as the return value (see below). The system file is not deleted.

Also refer to controller-specific system files and general system files.

Interface

Input

Data type

Description

i_sFilename

STRING[80]

Name of the file that has to be deleted

Return Value

Data type

Description

DINT

0: OK

-5: You are trying to delete a system file.

-7: Error while deleting (file may not exist)