Read (FB; Prefix filrd)¶
FUNCTION_BLOCK Read EXTENDS CBM.ETrigToA
This function block reads the file, which was previously opened via ”FILE.Open”. If less characters can be read than specified in ”
szBuffer”,
the function block returns an active ”xDone” and indicates the current number of characters in ”szSize”. The size of the target memory structure
for the bytes to be read and the number of bytes to be read 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.
- InOut:
Scope
Name
Type
Comment
Input
hFileCAA.HANDLEFile handle
pBufferCAA.PVOIDTarget address for the first byte to be read; can be retrieved via operator ADR
szBufferCAA.SIZEMaximum number of bytes to be read; can be retrieved via operator sizeof
Output
eErrorLocal library error ID (0: no error; 5101: time out)
szSizeCAA.SIZECurrent number of successfully read bytes; this value is already valid before
xDonehas been set