Siemens SINUMERIK 840D sl Operating Manual page 306

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
Content of the script:
;Initialization of the output file (text)
Up.pathToOutput = "Example2\Output.txt"
;If the output file exists on the RTS, it will be deleted
if FileExist(RTS,Up.pathToOutput)
FileDelete(RTS,Up.pathToOutput)
endif
;Initialization of the input file (XML)
Up.pathToInput = "/card/user/sinumerik/hmi/lng/
alarmtxt_nculin_deu.ts"
;If the input file does not exist on the NCU,
;"Input file not found!" is output
if !FileExist(NCU,Up.pathToInput)
TraceToFile(Up.pathToOutput,"Input file not found!")
endif
;Initialization of the Alarmtext ID
Up.alarmTextId = "510104/PLC/PMC"
;Initialization of the XPath expression with integration of the
Alarmtext ID as string
Up.xpathAlarmtext = "/TS/message[source/text()='$(Up.alarmTextId)']/
translation/text()"
;Use of the XPath expression on the input file with QueryXml
Up.valAlarmtext = QueryXml( Up.pathToInput, Up.xpathAlarmtext)
;If the alarm text was found, it will be output
if Up.valAlarmtext != null
TraceToFile(Up.pathToOutput,"Alarm text found: $(up.valAlarmtext)")
endif
Content of the output file "Example2\Output.txt":
Alarm text found: Axes not referenced, tool changer locked
Example 3
All existing alarm texts should be found in the input file "Example3\Input.xml" and its
translation output as a file.
306
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