Supported platforms: CODESYS 2.3, CODESYS 3.5
This library contains simple RAM file system implementation. It needs RAM image which it uses to save files. This image can be directly on the non-volatile RAM in which case, data is automatically stored over power boot ups. If this is not the case, it is the duty of the other system parts to make needed actions to move data from RAM image to non-volatile memory.
FileSys.lib is meant to be used with CANopenODSave library. Don't use it independently. |
Maximum size for the file name is 12 bytes. Always adjust block size to correspond with available RAM resources. If there is a keyword error, the file system is always formatted and all data is lost. |
All library internal functions are set INTERNAL in CODESYS 3.5. They are not shown in library manager. |
POU |
Description |
FileSysCutToCurr (FUN) |
Cuts file length to current position. |
FileSysDeleteFile (FUN) |
Deletes given file. |
FileSysInit (PRG) |
Initializes RAM file system. |
FileSysOpen (FUN) |
Opens existing file or creates new one. |
FileSysRead (FUN) |
Reads defined amount of data from file. |
FileSysSeek (FUN) |
Sets current position of file. |
FileSysWrite (FUN) |
Writes given number of given elements to file. |
POU |
Description |
FileSysCheckDir (FUN) |
Checks that directory, FAT and blocks are correct and corresponds each others. |
FileSysFindFreeBlock (FUN) |
Finds free block from file system. |
FileSysFormat(FUN) |
Formats file system. |
FileSysGetFatEntryByNum (FUN) |
Returns FAT entry of the given file number. |
FileSysGetFreeSpace (FUN) |
Returns free space for file system entry of the given file number. |
FileSysGetNbrFreeBlocks (FUN) |
Returns FAT entry of the given file number. |
FileSysMEMCPY (FUN) |
Copies data from source location to destination. |
FileSysMEMSET (FUN) |
Sets wanted number of bytes to defined value, starting from destination address.. |
None.
Source file Topic000411.htm
Last updated 19-Dec-2024