Since calling the SFC from the OB 1 can result in a cycle time-out,
instead of this you should call the SFC from the OB 100.
Parameters
Name Declaration Type Description
FILENAME IN STRING[254] Name of file
FILESIZE IN DWORD Size of file
RET_VAL OUT WORD Return value (0 = OK)
Type in the file name used to store the data on the MMC. The name inclusive end ID may
not exceed a maximum length of 13 characters:
n 8 characters for name
n 1 character for "."
n 3 characters for file extension
n 1 character 00h as end ID
For software technical reasons you have to enter 00h into the byte next to
the file name (end ID of the file name).
The FILESIZE defines the size of the user data in byte. When accessing an already
existing file, it is mandatory to give not only the FILENAME but also the FILESIZE. The
entry of a "Joker" length is not supported at this time.
Structure
Byte 0 Byte 1 Byte 2 Byte 3 ... Byte 255
Max. length occupied
length
ASCII value
1
ASCII value
2
... ASCII value
254
Word that returns a diagnostic/error message. 0 means OK.
Value Description
Diagnostic messages
0000h No errors (appears if new file is generated).
0001h File already exists, is not fragmented and the length value is identical or smaller.
8001h No or unknown type of MMC is plugged-in.
Error messages
8002h No FAT on MMC found.
A001h File name missing. This message appears if file name is inside a not loaded DB.
FILENAME
FILESIZE
RET_VAL (Return Value)
VIPA SPEED7
System Blocks
MMC Functions standard CPUs > SFC 220 - MMC_CR_F - create or open MMC file
HB00 | OPL_SP7 | Operation list | en | 18-30 907