Filedate/Time/Size/Stat/Info: File Information - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

1.22

FILEDATE/TIME/SIZE/STAT/INFO: File information

1.22
Function
The FILEDATE, FILETIME, FILESIZE, FILESTAT and FILEINFO commands can be used to
read particular pieces of file information, such as date, time, current file size, file status or the
sum of this information from the user memory of the NCK (passive file system).
The currently set protection level must be equal to or greater than the show right of the
superordinate directory. If this is not the case, access is denied with an error message
(error=13).
Application:
Provision of new file information if a file has changed for the user and this is for example to
be recalculated.
Programming
FILExxxx(VAR INT error, STRING[160] file, VAR {STRING[yy]INT}result)
Parameter
FILEDATE
FILETIME
FILESIZE
FILESTAT
FILEINFO
error
file
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
1.22 FILEDATE/TIME/SIZE/STAT/INFO: File information
Returns date when file was last accessed and written
Returns time when file was last accessed and written
Returns the current file size
Returns file status, such as read, write and execute rights
Returns the sum of the information from a directory entry
Error variable for return
0: No error
1: Path not allowed
2: Path not found
3: File not found
13: Insufficient access rights
22: Array length of result variable "result" is too small
Name/path of the file to be read (call-by-value parameter of
type STRING with a max. length of 160 bytes).
The file must be stored in the user memory of the NCK (passive
file system). The file name can be preceded by the domain
identifier _N_. If the domain identifier is missing, it is
added correspondingly.
The file identifier ("_" plus 3 characters), e.g., _SPF) is
optional. If there is no identifier, the file name is
automatically added _MPF.
If there is no path specified in "file", the file is searched
for in the current directory (=directory of selected program).
If a path is specified in "file", it must start with a slash
"/" (absolute path indication).
Flexible NC programming
1-67

Advertisement

Table of Contents
loading

Table of Contents