Files that are created by the system, a program or by user activities are saved to a default folder designated depending on the file extension. If you prefer, you can specify a path for files you want to create as illustrated in the following examples for a *.csv file that is to be created on an M262 Logic or Motion Controller.
Input path information in the function block |
Example |
Location in the file system of the controller |
Comment |
---|---|---|---|
File name without path information |
'MyFile.csv' |
Protected system folder, not visible |
Avoid saving the file without path information because this leads to evaluation of the file extension and redirection of the file when a system rule is defined. |
File name with relative path |
'usr/MyFile.csv' |
/usr/usr/MyFile.csv |
The file is created according to the path information but relative to the default root directory(1). In this example, the default root directory is /usr/. |
File name with absolute path |
'./MyFile.csv' |
/usr/MyFile.csv |
The file is created in the default root directory(1). In this example, the default root directory is /usr/. |
File name with absolute path to a specific root directory |
'/sd0/MyFile.csv' |
/sd0/MyFile.csv |
Use this option for an external memory(2). |
|
Access restrictions apply to certain folders created and used by the system. If a file operation is not permitted, the function block outputs an error message.