Kuhnke Electronics Instruction Manual

Kuhnke Electronics Instruction Manual Kuhnke Electronics Instruction Manual

17.02.2013 Views

Function Libraries FUNCTION_BLOCK MMC_FileOpen VAR_INPUT adrname : POINTER TO STRING; mode:UINT; END_VAR VAR_OUTPUT handle:INT; result:INT; END_VAR 102 E 700 GB

4.5.10 Reading from a File Function Libraries "MMC_FileRead" lets you read data from a file. The parameters required are the file handle of the open file, a pointer to a buffer plus the number of bytes to be read. This is an asynchronous Function Block. It transfers the job to the file system and checks if it has been completed. It needs to be run until the job has been handled successfully. Parameter Type Value Explanation handle INT file handle buff DWORD pointer to read buffer count INT result INT number of bytes to be read 0 running < 0 error > 0 job done FUNCTION_BLOCK MMC_FileRead VAR_INPUT handle:INT; buff:DWORD; count:INT; END_VAR VAR_OUTPUT result:INT; END_VAR 103

Function Libraries<br />

FUNCTION_BLOCK MMC_FileOpen<br />

VAR_INPUT<br />

adrname : POINTER TO STRING;<br />

mode:UINT;<br />

END_VAR<br />

VAR_OUTPUT<br />

handle:INT;<br />

result:INT;<br />

END_VAR<br />

102 E 700 GB

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!