17.02.2013 Views

Kuhnke Electronics Instruction Manual

Kuhnke Electronics Instruction Manual

Kuhnke Electronics Instruction Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function Libraries<br />

4.5.11 Renaming a File<br />

"MMC_FileDelete" allows you to rename a file by<br />

changing the name of 'adrname' to 'adrname2'.<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 />

adrname POINTER ADR(old name)<br />

adrname2 TO STRING ADR(new name)<br />

result INT<br />

0 running<br />

< 0 error<br />

> 0 job done<br />

Files are renamed compliant to the following convention:<br />

� The drive letter is prefixed to the source file only.<br />

� Specify the path to the destination file.<br />

� Always suffix the file extension (separated by a dot).<br />

FUNCTION_BLOCK MMC_FileRename<br />

VAR_INPUT<br />

adrname : POINTER TO STRING;<br />

adrname2 : POINTER TO STRING;<br />

END_VAR<br />

VAR_OUTPUT<br />

result:INT;<br />

END_VAR<br />

104 E 700 GB

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

Saved successfully!

Ooh no, something went wrong!