CPU ADAM 821x
Chapter 7 Integrated OBs, SFBs and SFCs
ADAM 8000 Manual CPU 821x – Rev 1.1
7-9
Calling this SFC, you specify the name and the size of the file that has to
be created res. to open.
When calling this SFC 220, you have to transfer the following parameters:
Type the file name used to store the data on the MMC. The file name may
not exceed a maximum length of 8+3 signs (FAT).
The file size defines the size of the user data in Byte.
Note!
When accessing an already existing file, it is mandatory to give not only the
file name but also the file size. The entry of a "Joker" length is not
supported at this time.
Return Value
Word that returns a diagnostic/error message. 0 means OK.
See the table below for the concerning messages:
Value Description
Diagnostic messages
0000h no
errors
0001h File already exists, is not fragmentated and the length value is
identical or higher. This message is always sent when opening an
existing file.
8001h No or wrong MMC is plugged-in.
Error messages
8002h No FAT on MMC found.
A001h File name missing.
A002h File name wrong.
A003h File exists but file size too low.
A004h File exists but is fragmentated and cannot be opened.
A005h Not enough space on MMC.
A006h No free entry in root directory. Depending on the used MMC
there may be min. 16 up to max. 512 entries in the root directory.
B000h An internal error occurred.
Parameters
File name
File size
RET_VAL