Siemens SINUMERIK 840DE sl Commissioning Manual page 834

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Generating user dialogs
1.10 Predefined functions
Function name
Reading a file
116
Description
The function reads the contents of the specified file into a string varia‐
ble.
The number of characters to be read can optionally be specified as a
second parameter.
Attribute:
name - The file name should be written in lowercase letters.
Files in other directories are accessed via a relative path that uses the
appl or dvm directory as a starting point.
return - name of the local variable
Parameter:
progname - file name
number of characters - number of characters to be read in bytes (op‐
tional):
Syntax:
<function name="doc.readfromfile" return="<string
var>"> progname, number of characters </function>
Example:
<let name = "my_var" type="string" ></let>
NC file system
<function name="doc.readfromfile" return="my_var">
_T"n:\mpf\test.mpf" </function>
CompactFlash card
<function name="doc.readfromfile" return="my_var">
_T"f:\appl\test.mpf" </function>
or
<function name="doc.readfromfile" return="my_var">
_T".\test.mpf" </function>
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1
Easy XML

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents