
Asynchronous access to the file
system
In the case of asynchronous access to the file system, cyclically-oriented
function blocks are used. As is the case with the motion function blocks, the
tasks are activated with an edge at the input. The status of the task is provi‐
ded in further calls. The function blocks must be cyclically called until they
signal "bDone". Depending on the function, the return information is con‐
tained in a further output.
The runtimes of the function blocks are relatively short so that they can be
used in a cyclic task.
The actual task is processed in a separate, low-priority system task. This task
is not constricted, even if the capacity of the PLC is fully used. Its velocity,
however, depends on the load of the drive.
The library with function blocks for asynchronous access to the file system is
suited for use in a typical cyclic PLC task with watchdog.
Libraries for accessing the file sys‐
tem
The system libraries "SysFile", "SysFileAsync" and "SysDir" are available to
access the file system.
Folder structure for accessing the
file system
The files are stored in a specific "User" directory on the memory card. All
function blocks and functions are called with the file name and optionally a
preceding subdirectory (user sub-folder).
The PLC only allows access to the "User" folder; for reasons of safety, it is
impossible to access all other folders and files with the PLC.
When the directories are listed in the Windows Explorer, only the content of
the "User" folder and any sub-folders it contains are displayed. The "User"
directory itself is not displayed, as if "User" were a separate partition. From
the user's point of view, the root branch can be accessed without indicating
the directory with a single "\" and with a double "\\" (Windows-compatible).
File access
The "Open" functions do not open the files exclusively so that other access to
the same file is possible.
As long as the PLC program is running, the files can be kept open. However,
they are forced to close when the PLC program is reset with "Reset" or the
memory card is removed. In the latter case, the error F2006 is generated.
A maximum of 8 files can be opened at the same time. If more files are
opened, an error is generated.
"SysDirOpen" may be started a maximum of 4 times without reading all en‐
tries with "SysDirRead". If it is called more often, an error is generated.
When the PLC is reset, open files and directory search handles are closed
and all resources are released.
In the case of a voltage failure while data are
written to the memory card, data might be
lost. In the worst case, the memory card can‐
not be read any more thereafter.
DANGER
To prevent data loss, a backup of the complete memory card should be made
at regular intervals.
When a memory card cannot be read any more in the drive, it might be possi‐
ble to repair it with a PC and a card reader using the Windows "Error-
checking" function. In case of an error, "Lost Clusters" are combined into
files.
Bosch Rexroth AG
DOK-INDRV*-MLD3-**VRS*-AP02-EN-P
218/267
Rexroth IndraDrive Rexroth IndraMotion MLD (2G) as of MPx-18
Programming information
LSA Control S.L. www.lsa-control.com [email protected] (+34) 960 62 43 01