Filewrite - Siemens SINUMERIK 840D sl Operating Manual

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

Advertisement

Note
Determination of the end of line / line break
With the StringPos() function, you can determine which end of line / line break characters
were used in the file.
\r → Carriage return (CR or 0x0D)
\n → Line feed (LF or 0x0A)
Example
Up.File = FileRead(RTS,"MyText.txt")
If StringPos(Up.File, "\r\n", 0) != -1
MSG("It is a DOS/Windows file.")
ElsIf StringPos(Up.File, "\n", 0) != -1
MSG("It is a Linux (UNIX) file.")
ElsIf StringPos(Up.File, "\r", 0) != -1
MSG("It is a Mac file.")
Else
MSG("The content of the file comprises only one.") line
EndIf
Note
Observe case sensitivity
Observe case sensitivity in the path on the NCU/PPU under Linux.
Note that only areas can be addressed that have also been activated in the project folder when
configuring the package.
4.6.9.6

FileWrite

FileWrite(<area>, "<path>","<string>")
The FileWrite() procedure writes the character string <string> to a text file <path> in
the <area> area.
The <path> argument specifies the file with path and name in which the character string is to
be written. The procedure always creates a new file.
The <path> path specification can be relative to the package or absolute.
The use of environment variables is possible. Observe the case sensitivity under Linux.
SINUMERIK Integrate Create MyConfig - Diff, Expert, Topo
Operating Manual, 12/2017, A5E36537479B-AE
Create MyConfig - Expert
4.6 Script language
299

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents