FILE.Flush (FB; Prefix filfl)

This function block flushes data from the file system cache to the disk for the file with given file handle hFile. Calling this function block guarantees that data will be stored on the disk.

Input:

xExecute

BOOL

Rising edge: Action start

Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError, iError) are present at the outputs for exactly one cycle.

hFile

CAA.HANDLE

Handle of the directory or the file

Output:

xDone

BOOL

Action successfully completed

xBusy

BOOL

Function block active

xError

BOOL

TRUE: error occurred, function block aborts action FALSE: no error

eError

FILE.ERROR

Local library error ID (0: no error; 5101: time out)