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.

4.5.2 Registering with the File System<br />

Function Libraries<br />

Function "MMC_Attach" enables the user program to<br />

register with the file system. The transfer parameter is a<br />

pointer to "systeminfo", a global variable of data type<br />

"MMC_SYSINFO" which is defined in library MMC.LIB.<br />

In "systeminfo", the runtime system stores a link to the file<br />

system. The file system can be used only if this link is<br />

found.<br />

Parameter Typ<br />

e<br />

MMC_Attach INT<br />

Value Explanation<br />

1 successfully registered<br />

0 error<br />

FUNCTION MMC_Attach : INT<br />

VAR_INPUT<br />

pSysInfo:POINTER TO MMC_SYSINFO;<br />

END_VAR<br />

Example:<br />

PROGRAM Call_MMC<br />

VAR<br />

INIT_MMC : BOOL := TRUE ;<br />

OK : INT;<br />

END_VAR<br />

IF INIT_MMC THEN<br />

OK := MMC_Attach(ADR(systeminfo)) ;<br />

INIT_MMC := FALSE;<br />

END_IF<br />

93

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

Saved successfully!

Ooh no, something went wrong!