Chapter 7 Integrated OBs, SFBs and SFCs
CPU ADAM 821x
7-10
ADAM 8000 Manual CPU 821x – Rev 1.1
SFC 221 MMC_RD_F
Via the SFC 221 you may read data from a MMC. For read and write
accesses to the MMC, you firstly have to open the file with SFC 220 and it
has to be unfragmentated.
For more detailed information to this and to the restrictions see the
description of the SFC 220.
This variable of the type pointer points to a data area in the CPU where the
content of the MMC has to be written to.
Here you define the start address inside the file on the MMC from where on
the data has to be transferred to the CPU.
During data transfer this Bit remains set. The Bit is reset as soon as the
data transfer is complete.
Return Value
Word, where a diagnostic/error message is returned to. 0 means OK. The
following messages may be set:
Value Description
0000h no
errors
8001h No or wrong MMC
8002h No FAT found on MMC
9001h Pointer value is wrong
9002h Bit reading has been tried (variable of Boolean type). Bit reading
is not possible.
9003h File length exceeded
9004h Sector limit of 512 has been tried to overrun. Sector overrun
reading is not possible.
B000h An internal error occurred.
Description
Parameters
PTR
OFFSET
BUSY
RET_VAL
11
x
21
x
51
x