Fileread - Siemens SINUMERIK 840D sl Operating Manual

Integrate create myconfig - diff, expert, topo
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Create MyConfig - Expert
4.6 Script language
Example of the output of a message
Output of a message if the "/siemens/versions.xml" file was found on the NCU/PPU.
IF FileEXIST(NCU, "/siemens/versions.xml")
Msg("The 'versions.xml' file exists on the NCU.")
ENDIF
Example of package variable UP.DH_exists
Package variable "UP.DH_exists" has the value "true" if the data management "F:\DH"
was found on the PCU.
Up.DH_exists = FileEXIST(PCU, "F:\DH")
4.6.9.5

FileRead

FileRead(<area>, "<path>")
The FileRead() function reads the contents of a text file <path> from the <area> area and
returns it as a character string.
For the <path> argument, absolute paths are permitted in the NCU/PCU/RTS areas and
relative paths in the ARC/RTS areas.
The use of environment system variables and package variables is possible and permitted.
The following values are permitted for <area>:
● NCU - for the text file on the file system of the NCU/PPU.
Example: Up.File = FileRead(NCU, "/siemens/versions.xml").
● PCU - for the text file on the hard disk of the PCU 50.
The path must start with the drive letter, e.g. ""D:\"" or ""D$\"".
Example: Up.File = FileRead(PCU, "C:\Users\File.txt")
● ARC - for the text file in the archive image.
The path must start with NC\, MMC\, PLC\, CP\ or DRV\.
Example: Up.File = FileRead(ARC, "NC\CST.DIR\Test.SPF")
● RTS - for the text file on the RunTimeSystem (NCU/PPU, PCU,PC) on which the package
is executed.
Examples:
Up.File = FileRead(RTS,"MyText.txt") ;reads the file next to the package.
Up.File = FileRead(RTS,"%UP_PACK%/MyText.txt") ;path specification with
environment system variables under Windows; reads the file next to the package.
Up.File = FileRead(RTS,"$UP_PACK/MyText.txt") ;path specification with
environment system variables under Linux; reads the file next to the package.
Up.File = FileRead(RTS,"$(Up.Pfad)/MyText.txt") ;path specification via
script variable.
Up.File = FileRead(RTS,"$(Up.$Pack.Dir)/MyText.txt") ;path specification
via system variable.
298
SINUMERIK Integrate Create MyConfig - Diff, Expert, Topo
Operating Manual, 12/2017, A5E36537479B-AE

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents