FILE.Write (FB; Prefix filwr)

This function block of the CAA_File.library writes data into the file, which was previously opened via FILE.Open. The contents of the memory area indicated by pointer ”pBuffer” should not be modified during the write action! The size of the structure of the memory containing the bytes to be written as well as the number of bytes to be written will not be checked.

If the stability of the pointer on the data structures and their contents cannot be guaranteed in case of an online change, an online change must be avoided with the help of functions from the ”CAA_Application.library”.

Input:

xExecute

BOOL

see: “CAA 指南”

xAbort

BOOL

see: “CAA 指南”

udiTimeOut

UDINT

 

hFile

CAA.HANDLE

File handle

pBuffer

CAA.PVOID

The address from where the data can be obtained, can be determined with the help of operator ADR.

szSize

CAA.SIZE

Number of bytes to be written (can be determined via operator SIZEOF)

Output:

xDone

BOOL

see: Guidelines for CAA libs 

xBusy

BOOL

see: Guidelines for CAA libs 

xError

BOOL

see: Guidelines for CAA libs 

xAborted

BOOL

see: Guidelines for CAA libs 

eError

FILE.ERROR

Error ID