Kuhnke Electronics Instruction Manual

Kuhnke Electronics Instruction Manual Kuhnke Electronics Instruction Manual

17.02.2013 Views

Function Libraries Example: Set the watchdog to 2.5 s VAR Mode : WORD:=1; WDT_Time: WORD:=2500; FirstCycle: BOOL:=TRUE; END_VAR IF FirstCycle THEN SET_WATCHDOG ( Mode, WDT_Time ); FirstCycle:=FALSE; END_IF ; 90 E 700 GB

4.5 Library MMC.LIB Function Libraries Together with the Target installation data (see page 53) CoDeSys is sent libraries provided by the target system, Ventura Remote PLC. � MMC.lib provides the functions and function modules Ventura Remote PLC needs to use the multimedia card as a data memory. MMC.lib contains the following: Name Purpose MMC_Attach registers with the file system MMC_FileClose closes a file MMC_FileCopy copies files MMC_FileDelete deletes a file MMC_FileFreeSpace finds out how much space is left on the MMC MMC_FileMkDir creates a subdirectory MMC_FileMove moves a file MMC_FileOpen opens a file MMC_FileRead reads from a file MMC_FileRename renames a file MMC_FileSeek sets the edit bookmark in a file MMC_FileWrite writes to a file MMC_InitMMC initialises the file system MMC_ORC opens, reads, closes a file MMC_OWC opens, writes, closes a file Internal functions Purpose MMC_PostCommand sends a command to the file system MMC_WaitCmd waits for a job to complete Do not use the internal functions or the internal variables defined in the function modules for the user program! 91

Function Libraries<br />

Example:<br />

Set the watchdog to 2.5 s<br />

VAR<br />

Mode : WORD:=1;<br />

WDT_Time: WORD:=2500;<br />

FirstCycle: BOOL:=TRUE;<br />

END_VAR<br />

IF FirstCycle THEN<br />

SET_WATCHDOG ( Mode, WDT_Time );<br />

FirstCycle:=FALSE;<br />

END_IF<br />

;<br />

90 E 700 GB

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

Saved successfully!

Ooh no, something went wrong!