Kuhnke Electronics Instruction Manual

Kuhnke Electronics Instruction Manual Kuhnke Electronics Instruction Manual

17.02.2013 Views

Function Libraries 4.5.13 Writing to a File "MMC_FileRead" lets you write data to 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 written. 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 write buffer count INT result INT number of bytes to be written 0 running < 0 error > 0 job done FUNCTION_BLOCK MMC_FileWrite VAR_INPUT handle:INT; buff:DWORD; count:INT; END_VAR VAR_OUTPUT result:INT; END_VAR 106 E 700 GB

4.5.14 Initialising the File System Function Libraries Use "MMC_InitMMC" to re-initialise the file system after changing the medium. You are advised to run this function every time you change cards because the file system will otherwise perform uncontrolled data access. 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 result INT FUNCTION_BLOCK MMC_InitMMC VAR_INPUT END_VAR VAR_OUTPUT result:INT; END_VAR 0 running < 0 error > 0 job done 107

4.5.14 Initialising the File System<br />

Function Libraries<br />

Use "MMC_InitMMC" to re-initialise the file system after<br />

changing the medium. You are advised to run this function<br />

every time you change cards because the file system will<br />

otherwise perform uncontrolled data access.<br />

This is an asynchronous Function Block. It transfers the<br />

job to the file system and checks if it has been completed.<br />

It needs to be run until the job has been handled<br />

successfully.<br />

Parameter Type Value Explanation<br />

result INT<br />

FUNCTION_BLOCK MMC_InitMMC<br />

VAR_INPUT<br />

END_VAR<br />

VAR_OUTPUT<br />

result:INT;<br />

END_VAR<br />

0 running<br />

< 0 error<br />

> 0 job done<br />

107

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

Saved successfully!

Ooh no, something went wrong!