|
|
Generating user dialogs
1.13 Sidescreen application
[Page_sidescreen_proginfluence]
PROPERTY001= name:=focusable, type:=bool, value:="true"
Icon=sidescreen_proginfluence.png
Text file: sidescreen_proginfluence_deu.ts
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
199
Generating user dialogs
1.14 Display Manager application
1.14
Display Manager application
1.14.1
Easy XML in the Display Manager
The Easy XML function can be included in the Display Manager configuration based on
dialog SlSideScreenPage. Depending on the space available, this dialog can display one or
more side screen pages. Several pages are displayed next to each other in the column format.
The available space (width) is evenly divided among the individual columns. The number of
pages to be displayed and their content are configured. Each page has its own configuration
file. The names of these configuration files are specified when configuring the dialog in
the systemconfiguration.ini file, in command line parameter cmdline.
Behind the parameter identifier -sidescreen1, is the name of the configuration file for the first
column; behind the parameter identifier -sidescreen2, is the name of the configuration file for
the second column, etc.
All applications are automatically started by the Display Manager at system start and closed
again when the system is shut down. This means that script changes only become active after
the HMI has been restarted.
1.14.2
Integrating the Customer Area in the Display Manager menu
The precondition for calling the Easy XML parser in the Customer Area is that an area has been
linked with the Easy XML dialog. This is the default scenario with the area definition AREA111
in file systemconfiguration.ini.
Syntax
AREA0111= name:=CustomXML, dialog:=SlEECustomDialog,
panel:=SlHdStdHeaderPanel
This area is invisible when the system is delivered. Activation is realized using file
slamconfig.ini, in which visibility flag Visible should be set from false to true.
[CustomXML]
TextId=SL_AM_CUSTOM
SidescreenTextId=SL_SIDESCREEN_CUSTOM
TextFile=slam
TextContext=SlAmAreaMenu
SoftkeyPosition=12
Visible=false -> true
Easy XML
200
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.14 Display Manager application
Examples
The Customer Area is integrated in a menu of the Display Manager using the resolution-
dependent INI files of the Display Manager.
In the relevant file, under switch Operate buttons , a menu item should be
created that contains the reference to area CustomXML:
MENUITEM107= name:=mieasyXML, menuItemStyle:=misMenu,
onClicked:="hidePopup(); sendCmd(OPERATE, CustomXML);
showApp(defaultFrame, OPERATE)", image:=<bild.png>,
textID:= <textid>
In turn, this menu element is assigned to menu in the Display Manager:
MENU020= name:=mOperate3, menuStyle:=msMenu,
defaultFrame:=fOperate3, items:="miMachine, miToolList,
miWorkOffset, miProgramEdit, miProgramManager, miDiagnosis,
mieasyXML, miStretch, miMaximizeOperate3"
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
201
Generating user dialogs
1.14 Display Manager application
1.14.3
Display Manager widget
Widgets in the Display Manager are created and managed analogously to the sidescreen
widgets. However, "Sidescreen Widgets" are described in the configuration files of the Display
Manager, e.g. in the INI files sldmwidgets*.ini. The reference to the files is established
via systemconfiguration.ini.
An example with file rparameter_widget.xml is provided in Chapter "Sidescreen widget
(Page 196)".
Example
systemconfiguration.ini
DLG109= name:=SlWidgetsApp,
implementation:=sldmsidescreenapp.SlSideScreenDialog,
process:=SlHmiHost1, preload:=false, cmdline:="-sidescreen1
sldmwidgets1.ini -sidescreen2 sldmwidgets2.ini -spacing 3"
The dialog name is assigned a frame:
Easy XML
202
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.14 Display Manager application
FRAME020= name:=fTop, x:=66, y:=66, width:=760, height:=505,
app:=SlWidgetsApp
The defined frames in a display:
DISPLAY001= name:=d3, frames:="fHeader, fOperate3, fMenuOperate3,
fTop, fMenuTop, fBottom, fMenuBottom"
sldmwidgets1.ini
The structure and the significance of the switches and elements is described in Chapter
"Sidescreen application (Page 192)".
[Sidescreen]
PAGE001= name:=WidgetsPage, implementation:=SlSideScreenPage
[Page_WidgetsPage]
ELEMENT001= name:=EE, implementation:=SlSideScreenElement
ELEMENT002= name:=AxesPosition, implementation:=SlSideScreenElement
ELEMENT003= name:=WorkOffset, implementation:=SlSideScreenElement
ELEMENT004= name:=ActTool, implementation:=SlSideScreenElement
ELEMENT005= name:=VariableView, implementation:=SlSideScreenElement
[Element_EE]
TextId=TITLE_R_PARAMETER_LIST
TextFile=rparameter_widget
TextContext=EASY_XML
WIDGET001= name:=rparameter_widget,
implementation:=slagmforms.SlEESideScreenWidget
WIDGET001 is assigned the script to be run (without file extension) and the implementation
slagmforms.SlEESideScreenPage.
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
203
Generating user dialogs
1.14 Display Manager application
1.14.4
Display Manager sidescreen page
Sidescreen pages in the Display Manager is created and managed analogously to the
sidescreen pages. However, "Sidescreen pages" is described in INI files sldmxxxpage*.ini. The
reference to these files is established via file systemconfiguration.ini.
An example with file sidescreen_proginfluence.xml is provided in Chapter "Sidescreen page
(Page 198)".
Example
sldmmcppage.ini
DLG110= name:=SlMcpApp,
implementation:=sldmsidescreenapp.SlSideScreenDialog,
process:=SlHmiHost1, preload:=false, cmdline:="-sidescreen1
sldmmcppage.ini"
The dialog name is assigned a frame:
FRAME028= name:=fBelowOperate, x:=896, y:=838, width:=1024,
height:=242, app:=SlKeyboardApp, runnableApps:="SlKeyboardApp,
SlMcpApp"
Easy XML
204
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.14 Display Manager application
The defined frames of a display:
DISPLAY002= name:=d4, frames:="fHeader, fOperate4, fMenuOperate4,
fBelowOperate, fMenuBelowOperate, fTop, fMenuTop, fBottom,
fMenuBottom"
MENUITEM124= name:=miMcp, menuItemStyle:=misMenu,
onClicked:="hidePopup(); showApp(defaultFrame, SlMcpApp)",
image:=dm_mcp.png, textID:=SL_DM_MCP
sldmmcppage.ini
[Sidescreen]
PAGE001= name:=McpPage,
implementation:=slsidescreenmcppage.SlSideScreenMcpPage
PAGE002= name:=sidescreen_proginfluence,
implementation:=slagmforms.SlEESideScreenPage
PAGE002 is assigned the script to be run (without file extension) and the implementation
slagmforms.SlEESideScreenPage.
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
205
Generating user dialogs
1.15 Dialog selection via PLC hardkeys
1.15
Dialog selection via PLC hardkeys
Field of application
The following functions can be initiated by the PLC in the operating software:
● Select an operating area
● Select certain scenarios within operating areas
● Execute functions configured at softkeys
Hardkeys
All keys - also the PLC keys - are subsequently referred to as hardkeys. A maximum of 254
hardkeys can be defined. The following allocation applies:
Key number
Application
Key 1 - key 9
Keys on the operator panel front
Key 10 - key 49
Reserved
Key 50 - key 254
PLC keys:
Key 50 - key 81
Reserved for OEMs
Key 255
Pre-assigned with control information
Hardkeys 1 - 9 are pre-assigned as follows:
Key designation
Action / effect
HK1
MACHINE
Selects "Machine" operating area, last dialog
HK2
PROGRAM
Selects "Program" operating area, last dialog or last program
HK3
OFFSET
Selects "Parameter" operating area, last dialog
HK4
PROGRAM MANAG-
Selects "Program" operating area, "Program manager" root screen
ER
No function
HK5
ALARM
Selects "Diagnostics" operating area, "Alarm list" dialog
HK6
CUSTOM
Selects "Custom" operating area
Configuration
The configuring is realized in the systemconfiguration.ini configuration file in the section
[keyconfiguration]. Each line defines what is known as a hardkey event. A hardkey event is the
n-th actuation of a specific hardkey. For example, the second and third actuation of a specific
hardkey can result in different responses.
The entries in the systemconfiguration.ini configuration file can be overwritten with user-
specific settings. The directories [System user directory]/cfg and [System oem directory]/cfg
are available for this purpose.
Easy XML
206
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.15 Dialog selection via PLC hardkeys
The lines for configuring the hardkey events have the following structure:
KEYx.n = area:=area, dialog:=dialog, screen:=screen, forms:=form,
menus:=menu, action:=menu.action, cmdline:=cmdline
KEYx.n = area:=area, dialog:=dialog, cmdline:=cmdline,
action:= action
x: Number of the hardkey, range of values: 1 - 254
n: Event number - corresponds to the nth actuation of the hardkey, range of values: 0 - 9
Requirement
The PLC user program must fulfill the following requirement:
Only one hardkey is processed. As a consequence, a new request can only be set if the
operating software has acknowledged the previous request. If the PLC user program derives
the hardkey from an MCP key, it must provide sufficient buffer storage of the key(s) to ensure
that no fast keystrokes are lost.
PLC interface
An area to select a hardkey is provided in the PLC interface. The area is in DB19.DBB10. Here,
the PLC can directly specify a key value of between 50 and 254.
Acknowledgment by the operating software takes place in two steps. This procedure is
necessary so that the operating software can correctly identify two separate events if the same
key code is entered twice consecutively. In the first step, control information 255 is written to
byte DB19.DBB10. This defined virtual key stroke enables the HMI to identify every PLC key
sequence uniquely. The control information is of no significance to the PLC user program and
must not be changed. In the second step, the actual acknowledgment takes place with respect
to the PLC by clearing DB19.DBB10. From this point in time, the PLC user program can specify
a new hardkey. In parallel, the actual hardkey request is processed in the operating software.
Example
Configuration file:
; configuration of OP hardkeys (KEY1-KEY9) and
; PLC hardkeys (KEY50-KEY254)
[keyconfiguration]
; MACHINE key (hardkey block)
KEY1.0 = area:=AreaMachine, dialog:=SlMachine
; PROGRAM key (hardkey block)
KEY2.0 = area:=AreaProgramEdit
; OFFSET key (hardkey block)
KEY3.0 = area:=AreaParameter
; PROGRAM MANAGER key (hardkey block)
KEY4.0 = area:=AreaProgramManager
; ALARM key (hardkey block)
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
207
Generating user dialogs
1.15 Dialog selection via PLC hardkeys
KEY5.0 = area:=AreaDiagnosis, dialog:=SlDgDialog,
cmdline:="-slGfwHmiScreen SlDgAeAlarmsScreen"
; CUSTOM (hardkey block)
KEY6.0 = area:=Custom
; MACHINE key (optional, Shift + F10)
KEY7.0 = area:=AreaMachine, dialog:=SlMachine,
cmdline:="-MKey"
; MENU USER (hardkey block, Ctrl + F10)
KEY10.0 = area:=MenuUser
; MENU FUNCTION (hardkey block, Ctrl + Shift + F10)
KEY11.0 = area:=MenuFunction
KEY50.0 = area:=CustomXML, dialog:=SlEECustomDialog
The area and dialog identifiers can be found in the systemconfiguration.ini from [System
Siemens directory]/cfg.
If only the SlEECustomDialog is used, the parser expects the xmldial.xml file in the application
directory as well as a menu tag with the name main. Other file names or main menu names can
be declared by adding the cmdline key. The -mainModule parameter specifies the XML
description to be loaded. The parser expects the main menu in this script. The -entry parameter
specifies the name of the main menu. If this parameter is missing, the parser uses the name
main to start the function. The -conf parameter with the value slagmdialog.hmi must always be
included.
Here is an example:
KEY50.0 = area:=CustomXML, dialog:=SlEECustomDialog,
cmdline:="-conf slagmdialog.hmi -mainModule restore.xml -entry cmc2"
KEY51.0 = area:=CustomXML, dialog:=SlEECustomDialog,
cmdline:="-conf slagmdialog.hmi -mainModule activate.xml
-entry cmc1"
User interface
The following entries in the systemconfiguration.ini file enable the use of Easy XML for the
function described above.
AREA0111= name:=CustomXML, dialog:=SlEECustomDialog,
panel:=SlHdStdHeaderPanel
DLG056= name:=SlEECustomDialog,
implementation:=slagmdialog.SlEECustomDialog, process:=SlHmiHost1,
preload:=false, terminate:=true, cmdline:="-conf slagmdialog.hmi"
Easy XML
208
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
1.16
Assigning user dialogs to reserved softkeys
A softkey is reserved in all standard operating areas for expansion of the existing functionality.
Corresponding files are stored in the following directory in the system for activation and linking
of an OEM softkey with a user project:
/siemens/sinumerik/hmi/template/cfg
These files contain operating area-specific XML descriptions which are interpreted and
integrated in the menu tree of the operating area upon start-up of the operating software.
For integration of a separate application, the file relevant for the corresponding operating area
is to be copied from the template directory into the following directory and modified:
/oem/sinumerik/hmi/template/cfg
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
209
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
1.16.1
Defining language-neutral softkey text
The TEXTFILE tag contains the file name of the text file which is to be assigned to the OEM
area. The file name is to be specified without language and file extension.
Syntax
<TEXTFILE>oemtextfile</TEXTFILE>
Example
oem_xml_screens_deu.ts
<TEXTFILE>oem_xml_screens</TEXTFILE>
The softkey text to be displayed is managed in the property tag in the softkey tag. The OEM
value is to be replaced by the desired text ID. The translationContext property references an
area in the text file to which the text is assigned. In the case of easyXML, the EASY_XML
context is to be specified.
Syntax
<PROPERTY name="textID" type="QString">OEM</PROPERTY>
<PROPERTY name="translationContext" type="QString">OEMContext</
PROPERTY>
Example
<PROPERTY name="textID" type="QString">MY_TEXT1</PROPERTY>
<PROPERTY name="translationContext" type="QString">EASY_XML</
PROPERTY>
Easy XML
210
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
1.16.2
Assigning an Easy XML area
The navigation target must also be defined in the softkey tag. Thus, the navigation
target CustomXML is to be entered in the name attribute in the area tag. The attributes dialog
and screen are to be deleted as these parameters are defined automatically.
Syntax
<NAVIGATION target="area">
<AREA name="OEMArea" dialog="OEMDialog" screen="OEMScreen"/>
</NAVIGATION>
Example
<NAVIGATION target="area">
<AREA name="CustomXML" />
</NAVIGATION>
If navigation target area is used, the parser expects the file xmldial.xml as a start module and
the main menu as an entry point for menu management. In order to be able to offer multiple
applications at the same time, the switchToDialog function is to be used. The NAVIGATION tag
must then be replaced with the FUNCTION tag in this regard. The CustomXML area, the
SlEECustomDialog dialog, and the name of the start module and of the main menu are to be
transferred to this function as call arguments.
You return to the standard user area from the easyXML area with the switchToArea tag.
Syntax
<switchToArea name="<Area>"/>
<FUNCTION args="-area CustomXML -dialog SlEECustomDialog -mainModule
<Filename> -entry <Menuname>" name="switchToDialog"/>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
211
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
Example project
sldiagnose_oem.xml
<!DOCTYPE DIALOG>
<DIALOG>
<TEXTFILE>oem_xml_screens</TEXTFILE>
<!-- =====================================================================
-->
<!-- OEM softkey number 7 on first horizontal main menu in area diagnosis --
>
<!-- =====================================================================
-->
<MENU name="DgGlobalHu">
<ETCLEVEL id="0">
<SOFTKEYGROUP name="GroupEtc">
<SOFTKEY position="7">
<PROPERTY name="textID" type="QString">DG_SK</PROPERTY>
<PROPERTY name="translationContext" type="QString">EASY_XML</PROPERTY>
<NAVIGATION target="area">
<AREA name="CustomXML" />
</NAVIGATION>
</SOFTKEY>
</SOFTKEYGROUP>
</ETCLEVEL>
</MENU>
</DIALOG>
or
<!DOCTYPE DIALOG>
<DIALOG
<!-- =====================================================================
-->
<!-- OEM softkey number 7 on first horizontal main menu in area diagnosis --
>
<!-- =====================================================================
-->
<TEXTFILE>oem_xml_screens</TEXTFILE>
<MENU name="DgGlobalHu">
<ETCLEVEL id="0">
<SOFTKEYGROUP name="GroupEtc">
<SOFTKEY position="7">
<PROPERTY name="textID" type="QString">DG_SK</PROPERTY>
<PROPERTY name="translationContext" type="QString">EASY_XML</PROPERTY>
<FUNCTION args="-area CustomXML -dialog SlEECustomDialog -mainModule
dg.xml -entry main" name="switchToDialog"/>
</SOFTKEY>
</SOFTKEYGROUP>
</ETCLEVEL>
</MENU>
</DIALOG>
Easy XML
212
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
dg.xml
<DialogGui>
<menu name = "main">
<open_form name = "R_PARAMETER_LIST" />
<softkey_back>
<switchToArea name="AreaDiagnosis" dialog="SlDgDialog"/>
</softkey_back>
</menu>
<!-- This form shows a R - parameter list -->
<form name = "R_PARAMETER_LIST">
<init>
<caption>R - Parameter list diagnosis</caption>
<data_access type="true" />
<control name = "c1" xpos = "322" ypos = "34" refvar="nck/Channel/
Parameter/R[0]" hotlink="true" />
<control name = "c2" xpos = "322" ypos = "54" refvar="nck/Channel/
Parameter/R[1]" hotlink="true" />
<control name = "c3" xpos = "322" ypos = "74" refvar="nck/Channel/
Parameter/R[2]" hotlink="true" />
<control name = "c4" xpos = "322" ypos = "94" refvar="nck/Channel/
Parameter/R[3]" hotlink="true" />
<control name = "c5" xpos = "322" ypos = "114" refvar="nck/Channel/
Parameter/R[4]" hotlink="true" />
<control name = "c6" xpos = "322" ypos = "134" refvar="nck/Channel/
Parameter/R[5]" hotlink="true" />
<control name = "c7" xpos = "322" ypos = "154" refvar="nck/Channel/
Parameter/R[6]" hotlink="true" />
<control name = "c8" xpos = "322" ypos = "174" refvar="nck/Channel/
Parameter/R[7]" hotlink="true" />
<control name = "c9" xpos = "322" ypos = "194" refvar="nck/Channel/
Parameter/R[8]" hotlink="true" />
<control name = "c10" xpos = "322" ypos = "214" refvar="nck/Channel/
Parameter/R[9]" hotlink="true" />
</init>
<paint>
<text xpos = "23" ypos = "34">R-Parameter 0</text>
<text xpos = "23" ypos = "54">R-Parameter 1</text>
<text xpos = "23" ypos = "74">R-Parameter 2</text>
<text xpos = "23" ypos = "94">R-Parameter 3</text>
<text xpos = "23" ypos = "114">R-Parameter 4</text>
<text xpos = "23" ypos = "134">R-Parameter 5</text>
<text xpos = "23" ypos = "154">R-Parameter 6</text>
<text xpos = "23" ypos = "174">R-Parameter 7</text>
<text xpos = "23" ypos = "194">R-Parameter 8</text>
<text xpos = "23" ypos = "214">R-Parameter 9</text>
</paint>
</form>
</DialogGui>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
213
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
Easy XML
214
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
1.16.3
Tag descriptions
Tag softkey
Outside of the softkey tag, the softkey state can be set with the state attribute using the
POSITION attribute. The softkey number for which the state should be set is to be specified as
the attribute value.
Example
<menu name = "menu_sktest">
<state type="$$$define_sk_type" POSITION="2"/>
<softkey POSITION="2" type="user_controlled" picture="$$$bmp_name">
<caption>Toggle%nSK</caption>
<if>
<condition>sk_type == 0 </condition>
<then>
<op> sk_type = 1 </op>
<op> define_sk_type = _T"PRESSED" </op>
<op>bmp_name = _T"f:\appl\red_led_on.bmp"</op>
<state type="$$$define_sk_type" />
</then>
<else>
<op> define_sk_type = _T"NOTPRESSED" </op>
<op>bmp_name = _T"f:\appl\red_led_off.bmp"</op>
<op> sk_type = 0 </op>
<state type="$$$define_sk_type" />
</else>
</if>
<print text="%s">sk_type_name</print>
<navigation>menu_sktest</navigation>
</softkey>
Tag typedef
Note
Pre-allocation of the elements in the examples must be removed.
Within the type definition, a variable is declared with the element tag. The attributes of the tag
correspond with the attributes of the let instruction. The elements can be preallocated when
creating the variables.
Example
RECT:
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
215
Generating user dialogs
1.16 Assigning user dialogs to reserved softkeys
<typedef name="StructRect" type="struct" >
<element name="left" type="int" />
<element name="top" type="int" />
<element name="right" type="int" />
<element name="bottom" type="int" />
</typedef>
POINT:
<typedef name="StructPoint" type="struct" >
<element name="x" type="int" />
<element name="y" type="int" />
</typedef>
SIZE:
<typedef name="StructSize" type="struct" >
<element name="width" type="int" />
<element name="height" type="int" />
</typedef>
Tag let
The number of field elements is to be specified with the dim attribute. For a two-dimensional
field, the second dimension is specified after the first dimension separated by a comma. A field
element is accessed via the field index, which is specified in square brackets after the variable
name. Dimensions of the arrays can be defined directly or via the content of a variable.
Example
<let name="d1" >3</let>
<let name="list_string" dim="3" type="string" />
or
<let name="list_string" dim="$d1" type="string" />
<op>
list_string[2] = _T"test";
</op>
or
<let name="d1" >3</let>
<let name="d2" >6</let>
<let name="list_string3" dim="3, $d2" type="string" />
<op>
list_string3[2, 5] = _T"test";
</op>
Easy XML
216
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.17 Creating language-neutral texts
1.17
Creating language-neutral texts
All texts used in the dialog forms can be managed language-neutral, where text identifiers are
used in the dialogs which are replaced with text in the currently selected language during
runtime. This text is to be saved together with the text identifier for every available language in
a text file in UTF8 format.
The file oem_xml_screens_<language code>.ts is assigned to the Easy XML function as a text
file by default. The EASY_XML identifier is to be specified as text context.
Two dollar symbols are to be prefixed to the text identifier in the script to mark a test identifier.
Structure
oem_xml_screens_deu.ts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_XML</name>
<message>
<source>MY_TEXT1</source>
<translation>text1 from textfile</translation>
</message>
<message>
<source>MY_TEXT2</source>
<translation>text2 from textfile</translation>
</message>
</context>
</TS>
Example
<text xpos ="120" ypos="158">$$MY_TEXT1</text>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
217
Generating user dialogs
1.18 Project-specific text files
1.18
Project-specific text files
1.18.1
Creating project-specific text files
For managing separate projects, separate text files can be used for a project, each form, and
each menu. The TEXTFILE attribute gives notification in the corresponding tags.
The name of the text file is to be transferred as an attribute value without language identifier and
file extension. The texts can continue to be accessed until the form or the menu is closed. If a
text file is loaded with the tag DialogGui, the content may be accessed until the project is exited.
The search for the text identifier begins in the file last loaded.
Example
main_form_screens_deu.ts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_XML</name>
<message>
<source>MAIN_FORM_TITLE</source>
<translation>user text file title</translation>
</message>
</context>
</TS>
Activation
<DialogGui textfile="main_form_screens">
</DialogGui>
or
<form name="main_form" textfile="main_form_screens">
</form>
or
<menu name="main" textfile="main_form_screens">
</menu>
Easy XML
218
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.18 Project-specific text files
Example dialog
main_form_screens_deu.ts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_XML</name>
<message>
<source>MAIN_FORM_TITLE</source>
<translation>user text file title</translation>
</message>
<message>
<source>MAIN_FORM_TEXT</source>
<translation>text from text file</translation>
</message>
</context>
</TS>
main2_sktext_screens_deu.ts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_XML</name>
<message>
<source>SK1</source>
<translation>Softkey1</translation>
</message>
</context>
</TS>
form2_screens_deu.ts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_XML</name>
<message>
<source>FORM2_TITLE</source>
<translation>Form2 Title</translation>
</message>
<message>
<source>FORM2_TEXT</source>
<translation>Form2 text from text file</translation>
</message>
</context>
</TS>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
219
Generating user dialogs
1.18 Project-specific text files
Dialog script
xmldial.xml
<DialogGui textfile="main_form_screens">
<menu name = "main">
<open_form name = "main_form" />
<softkey POSITION="1">
<caption>Menu 2</caption>
<navigation>menu_2</navigation>
</softkey>
</menu>
<menu name = "menu_2" textfile="main2_sktext_screens">
<open_form name = "form2" />
<softkey POSITION="1">
<caption>$$SK1</caption>
</softkey>
<softkey_back>
<navigation>main</navigation>
</softkey_back>
</menu>
<form name="main_form" >
<init>
<data_access type = "true" />
<caption>$$MAIN_FORM_TITLE</caption>
</init>
<paint>
<text xpos="5" ypos="30">$$MAIN_FORM_TEXT</text>
</paint>
</form>
<form name="form2" textfile="form2_screens">
<init>
<data_access type = "true" />
<caption>$$FORM2_TITLE</caption>
</init>
<paint>
<text xpos="5" ypos="30">$$FORM2_TEXT</text>
</paint>
</form>
</DialogGui>
1.18.2
Specifying text context
Grouping of the texts is possible within a text file by way of independently named area names.
The area identifier is defined within the context tag with the name tag.
Syntax
<context>
<name>name</name>
</context>
Easy XML
220
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.18 Project-specific text files
Example
<context>
<name>my context 1</name>
</context>
<context>
<name>my context 2</name>
</context>
If particular context is being used, the context name is to be specified together with the text file
name for a project, a form or a menu via the TEXTCONTEXT attribute. Access to texts stored
within the context remains possible until a new context is set. Thus, a context set for the project
is replaced by the context set for a form or a menu.
Project example
form2_screens_deu.ts
?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_XML</name>
<message>
<source>FORM2_TITLE</source>
<translation>Form2 Title</translation>
</message>
<message>
<source>FORM2_TEXT</source>
<translation>Form2 text from text file</translation>
</message>
</context>
<context>
<name>MY_FORM_CONTEXT</name>
<message>
<source>FORM3_TITLE</source>
<translation>Title from the text context MY_FORM_CONTEXT</translation>
</message>
<message>
<source>FORM3_TEXT</source>
<translation>Form3 text from text file</translation>
</message>
</context>
<context>
<name>MY_SOFTKEY_CONTEXT</name>
<message>
<source>MENU3_SK1</source>
<translation>SK%n1</translation>
</message>
</context>
</TS>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
221
Generating user dialogs
1.18 Project-specific text files
using_textcontext.xml
<menu name = "menu3" textfile="form2_screens"
textcontext="MY_SOFTKEY_CONTEXT">
<open_form name = "menu3_form" />
<softkey POSITION="1">
<caption>$$SK1</caption>
</softkey>
<softkey_back>
<navigation>main</navigation>
</softkey_back>
</menu>
<form name="menu3_form" textfile="form2_screens"
textcontext="MY_FORM_CONTEXT">
<init>
<data_access type = "true" />
<caption>$$FORM3_TITLE</caption>
</init>
<paint>
<text xpos="5" ypos="30">$$FORM3_TEXT</text>
</paint>
</form>
1.18.3
Specifying Textfilelist
The name of a file in a list of text files to be loaded can be specified with the TEXTFILELIST
attribute value.
Notation of the text file names is realized line by line and must be concluded with a line break.
The name of the file without language extension and file extension is expected as text file name
Example
The file form2_screens_deu.ts is to appear in the list as form2_screens.
textfilelist.ini
form2_screens
Activation
<DialogGui textfilelist="txtfilelist.ini">
</DialogGui>
Easy XML
222
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating user dialogs
1.19 Restoring the session
1.19
Restoring the session
When an Easy XML project is closed, all local variables are enabled and script instructions are
unloaded. If you want to retain data for variables after the control is switched off, these variables
are to be designated the permanent attribute. Data which is to be retained until the control is
switched off must be designated the poweroff attribute.
If the Easy XML application is selected again, it is possible in the main menu to control the menu
or the form which is to be activated following renewed selection of the application. It is the
responsibility of the programmer to ensure that all data required in this regard is made available.
If the restoresession attribute is set in the DialogGUI tag, the parser organizes reselection of the
menu last opened and the last opened form. The programmer is responsible for providing the
necessary data.
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
223
Generating user dialogs
1.19 Restoring the session
Easy XML
224
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2
2.1
Overview of functions
Purpose
The "Easy Extend" function provides a simple way of commissioning, activating, deactivating,
or testing optional equipment. The available equipment and device states are displayed in a list
by the control system. The system can manage a maximum of 64 devices.
Softkeys are used to activate or deactivate a device.
The "Easy Extend" function is available in the "Parameters" operating area.
Figure 2-1
Main screen "Parameters"
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
225
Generating commissioning dialogs
2.1 Overview of functions
Configuration
;0/ VFULSW
+0,
+0,
1&. LQWHUIDFH
+0,
3/& LQWHUIDFH
1&. 3/& '5,9(
Figure 2-2
How "Easy Extend" works
To use the "Easy Extend" function, the following functions must be configured by the machine
manufacturer:
● PLC ↔ HMI interface
The optional devices are managed via the interface between the user interface and the PLC.
● Script processing
The machine manufacturer saves the sequences to be executed for commissioning,
activating, deactivating or testing a device, in a statement script.
● Parameter dialog (optional)
The parameter dialog shows device information that is saved in the script file.
Storage of the files
The files belonging to "Easy Extend" are stored on the system CompactFlash card in directory
"dvm" (machine manufacturer).
File
Name
Target directory
Text file
oem_aggregate_xxx.ts
\oem\sinumerik\hmi\lng
Script file
agm.xml
\oem\sinumerik\hmi\dvm
Archive file
Any
\oem\sinumerik\hmi\dvm\archives
PLC user program
Any
PLC
Easy XML
226
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.2 Configuration in the PLC user program
2.2
Configuration in the PLC user program
Loading configurations
The configurations created are transferred to the manufacturer directory of the control, with the
script and text file. Additionally, the corresponding PLC user program should be loaded.
Programming the equipment
Communication between the operator component and the PLC takes place in the PLC user
program via a data block defined by the programmer, in which 128 words are reserved for the
management of the devices. The description for the data block identifier is provided in Chapter
"PLC_INTERFACE (Page 239)."
The data block must be generated and loaded as a user block. The relevant block must be
declared to the EasyExtend function using the plc_interface tag in the "agm.xml" script.
Note
Compatibility
We recommend defining data block DB9905 as the PLC interface so that the scripts are also
compatible with SINUMERIK 828D.
Example:
<plc_interface name = "plc/db1000.dbb0" />
To create the block, data formats and symbolic identifiers from the following table can be used:
Data format/symbolic identifier
Meaning
DBX0.0 Enable_1 BOOL Bit OFF OFF HMI → PLC
Device has been started up
DBX0.1 Activate_1 BOOL Bit OFF OFF HMI → PLC
Device is to be activated
DBX0.2 Deactivate_1 BOOL Bit OFF OFF HMI → PLC
Device is to be deactivated
DBB1 Res_1 BYTE Unsigned 0 0
Reserved for future use
DBX2.0 IsActive_1 BOOL Bit OFF OFF PLC → HMI
Device is active
DBX2.1 Error_1 BOOL Bit OFF OFF PLC → HMI
Device has an error
DBB3 DeviceId_1 BYTE Unsigned 0 0
Unique device number
PLC words are assigned beginning with Device 1:
Data block
Device designation
DB9905.DBB0
Device 1
DB9905.DBB4
Device 2
DB9905.DBB192
Device 49
DB9905.DBB196
Device 50
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
227
Generating commissioning dialogs
2.2 Configuration in the PLC user program
Four bytes with the following meanings are used for each device:
Byte
Bit
Description
0
0
== 1
Device has been started up (HMI acknowledgment)
1
== 1
Device is to be activated (HMI request)
2
== 1
Device is to be deactivated (HMI request)
3-7
Reserved
1
0-7
Reserved
2
0
== 1
Device is active (PLC acknowledgment)
1
== 1
Device has an error
2-7
Reserved
3
0-7
Unique identifier for the device
Storage of the files
The Easy Extend files are stored on the system CompactFlash card in the "oem"
(MANUFACTURER) and "oem_i" (INDIVIDUAL) directory.
Note
The file name may only contain lower case letters.
File
Name
Target directory
Text file
oem_aggregate_xxx.ts
/oem/sinumerik/hmi/lng/
/oem_i/sinumerik/hmi/lng/
Script file
agm.xml
/oem/sinumerik/hmi/dvm
/oem_i/sinumerik/hmi/dvm
Archive file
Any
/oem/sinumerik/hmi/dvm/archives
/oem_i/sinumerik/hmi/dvm/archives
PLC user program
Any
PLC
Easy XML
228
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.2 Configuration in the PLC user program
General sequence
The machine manufacturer must execute the following steps to make the required data
available:
1. Creating a PLC user program which activates the device during activation on the PLC.
2. Commissioning of the "standard machine" followed by backup of the data in a series startup
archive.
3. Installation of the devices, commissioning, followed by read-out of the data as a differential
series startup archive.
Note
Changing the machine configuration
Should there be any need to edit the drive machine data, this should be adapted in the
control first. This procedure should be repeated for all devices and constellations.
Adding axes
If the machine is extended with machine axes, it is important to install the drive objects (DO) in
a fixed sequence because the series startup archive contains the constellation of the machine
manufacturer's reference machine and cannot be applied if the sequence is changed.
It is recommended that the following settings be selected for the "control components":
● NC data
● PLC data
● Drive data
- ACX format (binary)
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
229
Generating commissioning dialogs
2.3 Display on the user interface
2.3
Display on the user interface
Dialogs on the user interface
The following dialogs are available for the "Easy Extend" function:
● The control offers a configurable dialog, in which the available devices are shown.
● If first commissioning has not taken place yet, the control opens the commissioning dialog.
If a commissioning procedure (XML instruction: "START_UP") has been programmed, and the
device has still not been commissioned, then the control starts the commissioning procedure.
This involves a complete data backup before the series startup archives saved in the script file
are read in.
In the event of an error, the commissioning engineer can decide whether to roll back the
commissioning procedure or to rectify possible errors in machine configurations manually.
● Commissioning can be aborted early with the "Cancel" function. The control then copies the
previously saved commissioning files back.
If the machine has to be switched off after successful completion of the commissioning, the
XML statement "POWER_OFF" can be used to program that a corresponding message is
output on the control.
Easy XML
230
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.4 Creating language-dependent texts
2.4
Creating language-dependent texts
Structure of text file
The XML files with the language-dependent texts must be created in UTF8 format:
Examples
oem_aggregate_eng.ts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_EXTEND</name>
<message>
<source>DEVICE_ONE</source>
<translation>Device one</translation>
</message>
<message>
<source>DEVICE_TWO</source>
<translation>Device two</translation>
</message>
</context>
</TS>
oem_aggregate_deu.ts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TS>
<TS>
<context>
<name>EASY_EXTEND</name>
<message>
<source>DEVICE_ONE</source>
<translation>First device</translation>
</message>
<source>DEVICE_TWO</source>
<translation>Second device</translation>
</message>
</context>
</TS>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
231
Generating commissioning dialogs
2.5 User example for a power unit
2.5
User example for a power unit
Activating the drive object
The drive object to be activated has already been commissioned and deactivated again by the
machine manufacturer, to market the axis (axes) as an option.
To activate the axis carry out the following steps:
● Activate the drive object via p0105.
● Enable 2nd axis in the channel machine data.
● Back up the drive machine data via p0971.
● Wait until the data has been written.
● Restart the NCK and the drives.
Programming:
<DEVICE>
<list_id>1</list_id>
<name> "Activate the drive" </name>
<SET_ACTIVE>
<data name = "drive/dc/p105[DO5]">1</data>
<data name = "$MC_AXCONF_MACHAX_USED[4]">5</data>
<data name = "drive/dc/p971[DO5]">1</data>
<while>
<condition> "drive/dc/p971[DO5]" !=0 </condition>
</while>
<control_reset resetnc ="true" resetdrive = "true"/>
</SET_ACTIVE>
<SET_INACTIVE>
<data name = "drive/dc/p105[DO5]">0</data>
<data name = "$MC_AXCONF_MACHAX_USED[4]">0</data>
<data name = "drive/dc/p971[DO5]">1</data>
<while>
<condition> "drive/dc/p971[DO5]" !=0 </condition>
</while>
<control_reset resetnc ="true" resetdrive = "true"/>
</SET_INACTIVE>
</DEVICE>
Activating the PLC-controlled device
The device is addressed via output byte 10 and signals data set ready to the PLC via input byte
9.
The output byte is set to the specified coding for activation. The While loop then waits for the
data set ready of the device.
Easy XML
232
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.5 User example for a power unit
Programming:
<SET_ACTIVE>
<DATA name = "plc/qb10"> 8 </DATA>
<while>
<condition> "plc/ib9" !=1 </condition>
</while>
</SET_ACTIVE>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
233
Generating commissioning dialogs
2.6 Script language
2.6
Script language
Note
All script elements described in the Generating user dialogs (Page 7) function form the basis for
the "Easy Extend" function. Additional script elements are defined to manage additional
devices.
Program parts of the script
The script is divided into the following areas:
● "Easy Extend" identifier
● Frame to define the actions that can be executed for a device
● Identifier for the device
● Identifier for commissioning the device
● Identifier for activating the device
● Identifier for deactivating the device
● Identifier for testing the device
● Identifier for the parameter dialog
The individual tags are described in the following chapters.
Description
Identifier <tag>
Meaning
AGM
Identifier for the "Startup Wizard"
DEVICE
Identifier for the description of the device.
Attributes:
● option_bit
The device is assigned a fixed bit number for the option
management.
NAME
The identifier specifies the name of the device to be displayed in the
dialog.
If a text reference is used, the dialog displays the text which is saved
for the identifier.
START_UP
The identifier contains a description of the sequences required for
commissioning the device.
Easy XML
234
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.6 Script language
Identifier <tag>
Meaning
SET_ACTIVE
The identifier contains a description of the sequences required to
activate the device.
Attributes:
● timeout
The attribute permits a timeout to be specified in seconds. The
system interrupts processing if the script has still not been
completed after this time.
SET_INACTIVE
The identifier contains a description of the sequences required to shut
down the device.
Attributes:
● timeout
The attribute permits a timeout to be specified in seconds. The system
interrupts processing if the script has still not been completed after
this time.
TEST
The identifier contains the statements for testing the operating capa-
bility of a device.
Attributes:
● timeout
The attribute permits a timeout to be specified in seconds. The system
interrupts processing if the script has still not been completed after
this time.
UID
Unique numerical identifier to identify the device in the PLC ↔ HMI
interface.
VERSION
Identifier for a version
Negative acknowledgment of the function execution
With the automatically provided variable "$actionresult", the system can inform the XML parser
of a negative execution result. If the value is set to zero, the parser aborts the function
processing.
Example
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE AGM>
<AGM>
Identifier for the "Startup Wizard"
<DEVICE>
<NAME> Device 1 </NAME>
Identifier for the device
<START_UP>
Identifier for commissioning the device
…
</START_UP>
<SET_ACTIVE>
Identifier for activating the device
…
</SET_ACTIVE>
<SET_INACTIVE>
Identifier for deactivating the device
…
</SET_INACTIVE>
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
235
Generating commissioning dialogs
2.6 Script language
<TEST>
Identifier for testing the device
…
</TEST>
</DEVICE>
…
</AGM>
Easy XML
236
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.6 Script language
2.6.1
CONTROL_RESET
Description
This identifier allows one or more control components to be restarted. Execution of the script is
only continued when the control has resumed cyclic operation.
Programming
Identifier:
CONTROL_RESET
Syntax:
<CONTROL_RESET resetnc="TRUE" />
Attributes:
resetnc="true"
The NC component is restarted.
resetdrive="true"
The drive components are restarted.
2.6.2
FILE
Description
The identifier enables standard archives to be read in or created.
● Reading in an archive:
The file name of the archive must be specified for reading in an archive.
● Creating an archive:
If the attribute create= "true" is specified, the function creates a standard archive (*.arc)
under the specified name and stores the file in the …/dvm/archives directory.
Programming
Identifier:
FILE
Syntax:
<file name ="<archive name>" />
<file name ="<archive name>" create="true" class="<data classes>"
group="<area>" />
Attributes:
name
Identifier for the file name
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
237
Generating commissioning dialogs
2.6 Script language
create
A commissioning archive is created under the specified
name in the …/dvm/archives/ directory.
group
Specifies the data groups that are to be contained in the
archive. If several data groups are to be saved, the
groups should be separated by a blank.
The following data groups can be contained in the ar-
chive:
● NC
● PLC
● HMI
● DRIVES
Example
<!-- Create data class archive -->
<file name="user.arc" create="true"
group="nc plc hmi" />
<!-Read archive into the control->
<file name="user.arc" />
2.6.3
OPTION_MD
Description
The identifier allows option machine data to be redefined. As delivered, the system uses
MD14510 $MN_USER_DATA_INT[0] to $MN_USER_DATA_INT[3].
If the PLC user program manages the options, the appropriate data words must be provided in
a data block or GUD.
The data is structured in bits. Starting with bit 0, there is a fixed assignment of the bits to the
listed devices, i.e. bit 0 is assigned to device 1, bit 1 to device 2, etc. If more than 16 devices
are managed, the address identifiers of the device groups 1-3 are assigned via the area index.
Note
Converting the value range
The value range of MD14510 $MN_USER_DATA_INT[i] is from -32768 to +32767. To activate
the devices bit-by-bit via the machine data dialog, the bit combination must be converted to
decimal representation.
Easy XML
238
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.6 Script language
Programming
Identifier:
OPTION_MD
Syntax:
Area 0:
<option_md name = "Address identifier of the data" />
OR:
<option_md name = "Address identifier of the data" index= "0"/>
Area 1 to 3:
<option_md name = "Address identifier of the data" index= "Area index"/>
Attributes:
name
Identifier for the address, e.g. $MN_USER_DA-
TA_INT[0]
index
Identifier for the area index:
0 (default setting): Device 1 to 16
1: Device 17 to 32
2: Device 33 to 48
3: Device 49 to 64
2.6.4
PLC_INTERFACE
Description
This identifier permits the PLC ↔ HMI interface to be redefined. The system expects 128
addressable words.
Note
The identifier is not preset and must be defined by the programmer.
Programming
Identifier:
PLC_INTERFACE
Syntax:
<plc_interface name = "Address identifier of the data" />
Attributes:
name
Identifier for the address, e.g. "plc/mb170"
Example: plc/mb170
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
239
Generating commissioning dialogs
2.6 Script language
2.6.5
POWER_OFF
Description
Identifier for a message prompting the operator to switch the machine off. The message text is
permanently saved in the system.
Programming
Identifier:
POWER_OFF
Syntax:
<power_off />
Attributes:
--
2.6.6
WAITING
Description
After a reset of the NC or the drive, there is a wait for the restart of the respective component.
Programming
Identifier:
WAITING
Syntax:
<WAITING WAITINGFORNC ="TRUE" />
Attributes:
waitingfornc="true"
There is a wait for the restart of the NC.
waitingfordrive="true"
There is a wait for the restart of the drive.
2.6.7
XML identifiers for the dialog
Dialog for the parameterization
A dialog can be configured for each device so that additional parameters can be set or output
during runtime. This is displayed by pressing the "Additional parameters" softkey.
All of the script elements described in Chapter Generating user dialogs (Page 7) can be used
to generate the dialog.
Easy XML
240
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Generating commissioning dialogs
2.6 Script language
Example
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE AGM>
<AGM>
<DEVICE>
<NAME> Device 1 </NAME>
<START_UP>
…
</START_UP>
<SET_ACTIVE>
…
</SET_ACTIVE>
…
<FORM name="<dialog name>">
Identifier for a user dialog
<INIT>
<CONTROL name = "edit1" .../>
Identifier for an input field
</INIT>
<PAINT>
Identifier for text or image display
<TEXT>hello world !</TEXT>
</PAINT>
</FORM>
</DEVICE>
…
</AGM>
2.6.8
SOFTKEY_OK, SOFTKEY_CANCEL
Description
The identifier SOFTKEY_OK overwrites the standard behavior when closing a dialog by means
of the "OK" softkey. The identifier SOFTKEY_CANCEL overwrites the standard behavior when
closing a dialog by means of the "CANCEL" softkey.
The following functions can be performed within this identifier:
● Data manipulation
● Conditional processing
● Loop processing
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
241
Generating commissioning dialogs
2.6 Script language
Programming
Identifier:
SOFTKEY_OK
Syntax:
<SOFTKEY_OK>
…
</SOFTKEY_OK>
Identifier:
SOFTKEY_CANCEL
Syntax:
<SOFTKEY_CANCEL>
…
</SOFTKEY_CANCEL>
Easy XML
242
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Index
Delete control, 148
Delete number of characters of a string, 136
C
DeleteItem, 150
Deleting a file, 145
Configuration file, 9
display resolution, 122
Empty, 152
Exist, 147
E
Extracting script parts, 146
Easy Extend, 225
FLOOR, 158
Easy XML diagnostics, 24
Get cursor selection, 153
getfocus, 153
GetItem, 154
F
GetItemData, 154
imagebox, 168
Finger gestures, 165
ImageBoxGet, 156
ImageBoxSet, 76, 155, 156, 169
InsertItem, 150
G
ISNUMERIC, 164
Generating commissioning dialogs, 225
LoadItem, 151, 152
LOG, 158
LOG10, 158
M
MAX, 159
MIN, 159
Menu tree, 9
MMC, 160
NC program selection, 147
Ncfunc bico to int, 127
S
Ncfunc Get drive by axis index, 124
Start softkey, 9
Ncfunc Get drive by axis name, 123
Ncfunc Get drive by bud address, 126
Ncfunc Get drive by drive name, 125
X
Ncfunc get MD limits, 127
Ncfunc int to bico, 128
XML
Ncfunc is bico str valid, 128
Operators, 53
Ncfunc password, 129
Syntax, 52
PI service, 120, 121
System variables, 54
PI service, channel-related, 122
XML diagnostics, 24
POW, 159
XML functions
RANDOM, 159
Abs, 157
Reading a file, 143
AddItem, 149
ROOT, 164
ARCOS, 142
ROUND, 158
ARCSIN, 141
Screen resolution, 157
ARCTAN, 142
Screen resolution HMI, 157
Bitmap dimensions, 157
SDEG, 158
CEIL, 158
Set cursor selection, 154
Control form color, 129
setfocus, 153
Control local time, 130
Setting an individual bit, 148
Copy value and read, 118
Sine, 140
Copying and writing a value, 119
SQRT, 158
Cosine, 141
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
243
Index
SRAD, 158
IMG, 94, 95, 96
String comparison, 131, 132
INCLUDE, 34
String find, 137
INDEX_CHANGED, 81
String GetAt, 138
INIT, 59
String reverse find, 138
KEY_EVENT, 60
String SetAt, 139
LANGUAGE_CHANGED, 66
String Split, 139
LAYOUT, 57
string.icmp, 132
LET, 35, 216
string.insert, 135
LOCK_OPERATING_AREA, 38
string.left, 132
MENU, 81
string.length, 134
MESSAGE, 62, 171
string.middle, 133
MOUSE_EVENT, 61
string.remove, 135
MSG, 38
string.replace, 134
MSGBOX, 38
string.right, 133
NAME, 234
Tangent, 141
NAVIGATION, 82
Title bar height, 157
NC_INSTRUCTION, 102
Writing to a file, 144
OP, 39
XML identifier
OPEN_FORM, 83
AGM, 234
OPERATION, 40
AUTOSCALE_CONTENT, 56
OPTION_MD, 239
BOX, 97
PAINT, 67
BREAK, 27
PASSWORD, 40
CAPTION, 67, 175, 188
PLC_INTERFACE, 239
CHANNEL_CHANGED, 66
POWER_OFF, 40, 240
CLOSE, 67
PRINT, 41
CLOSE_FORM, 68
PROGRESS_BAR, 42
CONTROL, 27, 69, 179, 185
PROPERTY, 84, 85, 86, 87, 88, 173, 177, 184
CONTROL_RESET, 27, 237
RECALL, 100
CREATE_CYCLE, 103
REQUEST, 99
CREATE_CYCLE_EVENT, 28
RESIZE, 64
DATA, 29
SEND_MESSAGE, 43, 63
DATA_ACCESS, 79
SET_ACTIVE, 235
DATA_LIST, 30
SET_INACTIVE, 235
DEBUG, 80
SHOW_CONTROL, 43
DEBUG_MSG, 30
SLEEP, 44
DEVICE, 234
SOFTKEY, 89, 215
DIALOGGUI, 30
SOFTKEY_ACCEPT, 93
DO_WHILE, 31
SOFTKEY_BACK, 93
DYNAMIC_INCLUDE, 31
SOFTKEY_CANCEL, 92, 242
EDIT_CHANGED, 81
SOFTKEY_OK, 92, 242
ELSE, 31
START_UP, 234
FILE, 237
STOP, 44
FOCUS_IN, 66
SWITCH, 44
FOR, 32
SWITCHTOAREA, 45
FORM, 32, 56
SWITCHTODYNAMICTARGET, 45
FUNCTION, 97, 183
TEST, 235
FUNCTION_BODY, 98
TEXT, 93
GESTURE_EVENT, 81, 167
TEXTCONTEXT, 57
HELP_CONTEXT, 78
TEXTFILE, 57
HMI_RESET, 32
THEN, 45
IF, 33
TIMER, 67
Easy XML
244
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
Index
TYPE_CAST, 45
TYPEDEF, 46, 215
UID, 235
UNLOCK_OPERATING_AREA, 47
UPDATE_CONTROLS, 100
VERSION, 235
WAITING, 47, 240
WHILE, 48
XML_PARSER, 48
Easy XML
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
245
Index
Easy XML
246
Programming Manual, 12/2019, 6FC5397-1DP40-6BA3
1
Introduction
Getting Started
2
3
Fundamentals
SINUMERIK
Dialogs
4
SINUMERIK 840D sl
SINUMERIK Integrate Run
5
Variables
MyScreens
Programming commands
6
Programming Manual
7
Graphic and logic elements
8
"Custom" operating area
9
Dialog selection
10
Examples for cycle masks
Configuration in the side
11
screen
Configuration in the Display
12
Manager
A
Reference lists
Tips and tricks
B
Valid for
C
Animated elements
CNC software version 4.92
06/2019
A5E40869575B AC
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will be
used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property
damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions. Qualified
personnel are those who, based on their training and experience, are capable of identifying risks and avoiding
potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended or
approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described.
Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this
publication is reviewed regularly and any necessary corrections are included in subsequent editions.
Siemens AG
A5E40869575B AC
Digital Industries
Ⓟ 12/2019 Subject to change
All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Table of contents
1
Introduction
9
2
Getting Started
13
2.1
Introduction
13
2.2
Project example
14
2.2.1
Task description
14
2.2.2
Creating the configuration file (example)
18
2.2.3
Saving the configuration file in the OEM directory (example)
21
2.2.4
Creating the online help (example)
22
2.2.5
Integrating the online help and saving the files to the OEM directory (example)
25
2.2.6
Copying "easyscreen.ini" into the OEM directory (example)
26
2.2.7
Registering the COM file in "easyscreen.ini" (example)
26
2.2.8
Testing the project (example)
26
3
Fundamentals
29
3.1
Structure of configuration file
29
3.2
Structure of the menu tree
31
3.3
Definition and functions for start softkeys
33
3.3.1
Defining the start softkey
33
3.3.2
Functions for start softkeys
34
3.4
Troubleshooting (log book)
36
3.5
Notes on "easyscreen.ini"
38
3.6
Notes for personnel changing over to "Run MyScreens"
41
3.7
Extended configuration syntax
43
3.8
SmartOperation and MultiTouch operation
45
4
Dialogs
47
4.1
Structure and elements of a dialog
47
4.1.1
Defining a dialog
47
4.1.2
Defining dialog properties
49
4.1.3
Defining dialog elements
56
4.1.4
Defining dialogs with multiple columns
58
4.1.5
Password dialogs
59
4.1.6
Using display images/graphics
61
4.2
Defining softkey menus
62
4.2.1
Changing softkey properties during runtime
64
4.2.2
Language-dependent text
67
4.3
Configuring the online help
71
4.3.1
Overview
71
4.3.2
Generating HTML files
72
4.3.3
Generating the help book
75
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
3
Table of contents
4.3.4
Integrating the online help in SINUMERIK Operate
77
4.3.5
Saving help files
79
4.3.6
Help files in PDF format
79
5
Variables
81
5.1
Defining variables
81
5.2
Application examples
82
5.3
Example 1: Assigning the variable type, texts, help display, colors, tooltips
84
5.4
Example 2: Assigning the Variable Type, Limits, Attributes, Short Text Position
properties
85
5.5
Example 3: Assigning the Variable Type, Default, System or User Variable, Input/Output
Field Position properties
86
5.6
Example 4: Toggle field and list field
87
5.7
Example 5: Image display
88
5.8
Example 6: Progress bar
89
5.9
Example 7: Password input mode (asterisk)
91
5.10
Variable parameters
92
5.11
Details on the variable type
98
5.12
Details on the toggle field
101
5.13
Details on the default setting
103
5.14
Details on the position of the short text, position of the input/output field
104
5.15
Use of strings
106
5.16
CURPOS variable
108
5.17
CURVER variable
109
5.18
ENTRY variable
110
5.19
ERR variable
111
5.20
FILE_ERR variable
112
5.21
FOC variable
114
5.22
Variable S_ALEVEL
115
5.23
S_CHAN variable
116
5.24
Variable S_CONTROL
117
5.25
Variable S_LANG
118
5.26
Variable S_NCCODEREADONLY
119
5.27
Variables S_RESX and S_RESY
120
6
Programming commands
121
6.1
Operators
121
6.1.1
Mathematical operators
121
6.1.2
Bit operators
124
SINUMERIK Integrate Run MyScreens
4
Programming Manual, 06/2019, A5E40869575B AC
Table of contents
6.2
Methods
126
6.2.1
ACCESSLEVEL
126
6.2.2
CHANGE
127
6.2.3
CHANNEL
128
6.2.4
CONTROL
129
6.2.5
FOCUS
129
6.2.6
LANGUAGE
130
6.2.7
LOAD
130
6.2.8
UNLOAD
131
6.2.9
OUTPUT
132
6.2.10
PRESS
133
6.2.11
PRESS(ENTER)
134
6.2.12
PRESS(TOGGLE)
134
6.2.13
RESOLUTION
135
6.2.14
RESUME
135
6.2.15
SUSPEND
136
6.2.16
Example: Version management with OUTPUT methods
136
6.3
Functions
138
6.3.1
Reading and writing drive parameters: RDOP, WDOP, MRDOP
138
6.3.2
Subprogram call (CALL)
140
6.3.3
Define block (//B)
141
6.3.4
Check Variable (CVAR)
142
6.3.5
CLEAR_BACKGROUND
143
6.3.6
Copy Program file function (CP)
144
6.3.7
Delete Program file function (DP)
144
6.3.8
Exist Program file function (EP)
145
6.3.9
Move Program file function (MP)
146
6.3.10
Select Program file function (SP)
147
6.3.11
File accesses: RDFILE, WRFILE, RDLINEFILE, WRLINEFILE
148
6.3.12
Dialog line (DLGL)
150
6.3.13
DEBUG
151
6.3.14
Exit dialog (EXIT)
152
6.3.15
Dynamic manipulation of the lists of toggle fields or list box fields
153
6.3.16
Evaluate (EVAL)
156
6.3.17
Exit Loading Softkey (EXITLS)
157
6.3.18
Function (FCT)
157
6.3.19
Generate code (GC)
159
6.3.20
Password functions
162
6.3.21
Load Array (LA)
163
6.3.22
Load Block (LB)
164
6.3.23
Load Mask (LM)
165
6.3.24
Load Softkey (LS)
166
6.3.25
Load Grid (LG)
167
6.3.26
Multiple selection SWITCH
168
6.3.27
Multiple Read NC PLC (MRNP)
169
6.3.28
PI services
171
6.3.29
Reading (RNP) and writing (WNP) system or user variables
172
6.3.30
RESIZE_VAR_IO and RESIZE_VAR_TXT
173
6.3.31
Register (REG)
174
6.3.32
RETURN
175
6.3.33
Recompile
176
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
5
Table of contents
6.3.34
Recompile without user comment
177
6.3.35
Search Forward, Search Backward (SF, SB)
181
6.3.36
STRING functions
182
6.3.37
WHILE/UNTIL loops
188
6.3.38
Cyclic execution of scripts: START_TIMER, STOP_TIMER
190
7
Graphic and logic elements
193
7.1
Line, dividing line, rectangle, circle and ellipse
193
7.2
Defining an array
196
7.2.1
Accessing the value of an array element
197
7.2.2
Example Access to an array element
198
7.2.3
Scanning the status of an array element
200
7.3
Table description (grid)
202
7.3.1
Defining a table (grid)
203
7.3.2
Defining columns
204
7.3.3
Focus control in the table (cell)
205
7.4
Custom widgets
206
7.4.1
Defining custom widgets
206
7.4.2
Structure of the custom widget library
206
7.4.3
Structure of the custom widget interface
207
7.4.4
Interaction between custom widget and dialog box - Automatic data exchange
209
7.4.5
Interaction between custom widget and dialog box - Manual data exchange
210
7.4.5.1
Reading and writing properties
210
7.4.5.2
Executing a method of the custom widget
212
7.4.5.3
Response to a custom widget signal
214
7.5
SIEsGraphCustomWidget
217
7.5.1
SIEsGraphCustomWidget
217
7.5.2
Notes regarding performance
219
7.5.3
Reading and writing properties
219
7.5.4
Properties
220
7.5.5
Functions
230
7.5.6
Signals
245
7.6
SlEsTouchButton
247
7.6.1
SlEsTouchButton
247
7.6.2
Reading and writing properties
248
7.6.3
Properties
249
7.6.4
Functions
265
7.6.5
Signals
266
7.6.6
Positioning and aligning picture and text
269
7.6.7
Language-dependent texts
271
8
"Custom" operating area
273
8.1
How to activate the "Custom" operating area
273
8.2
How to configure the "Custom" softkey
274
8.3
How to configure the "Custom" operating area
275
8.4
Programming example for the "Custom" area
276
SINUMERIK Integrate Run MyScreens
6
Programming Manual, 06/2019, A5E40869575B AC
Table of contents
9
Dialog selection
281
9.1
Dialog selection using PLC softkeys
281
9.1.1
Calling cycle screens from the program editor
282
9.2
Dialog selection using PLC hard keys
284
9.3
Dialog selection via NC
287
10
Examples for cycle masks
289
10.1
Examples for cycle masks
289
11
Configuration in the side screen
291
11.1
Display of a Run MyScreens configuration in a side screen page
292
11.2
Display of several Run MyScreens configurations in a side screen page
294
11.3
Adding Run MyScreens configurations to a side screen page
296
11.4
Adding Run MyScreens configurations to a side screen element
298
11.5
Notes on carrying out Run MyScreens configurations in the side screen
300
12
Configuration in the Display Manager
301
12.1
Displaying Run MyScreens configurations in the Display Manager
301
12.2
Integration in SISideScreenDialog
302
12.3
Integration into SIWidgetsApp
303
12.4
Notes on carrying out Run MyScreens configurations in the Display Manager
304
A
Reference lists
305
A.1
Lists of start softkeys
305
A.1.1
List of start softkeys for turning
305
A.1.2
List of start softkeys for milling
306
A.2
List of predefined softkeys
309
A.3
List of access levels
310
A.4
List of colors
311
A.5
List of language codes used in file names
312
A.6
List of accessible system variables
313
A.7
Behavior when opening the dialog (attribute CB)
314
B
Tips and tricks
315
B.1
General tips
315
B.2
Tips for debugging
317
B.3
Tips for the CHANGE method
318
B.4
Tips for DO LOOP loops
320
C
Animated elements
321
C.1
Introduction
321
C.2
Modeling
323
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
7
Table of contents
C.2.1
Requirements
323
C.2.2
Rules for modeling
323
C.2.3
Importing graphics (models)
325
C.2.4
Modeling templates
327
C.3
XML commands
329
C.3.1
Overview
329
C.3.2
Structure of the scene description file
329
C.3.3
Mirroring and rotations
332
C.3.4
View type
333
C.4
Conversion to hmi file
334
C.5
Display in Create MyHMI /3GL
335
C.5.1
X3D Viewer
335
C.5.2
Class SlX3dViewerWidget
335
C.5.3
Public methods
335
C.5.4
Public slots
336
C.5.5
Libraries
337
C.5.6
Implementation example
337
C.5.7
Machine data
337
C.5.8
Notes about use
337
C.6
Display in Run MyScreens
338
Glossary
339
Index
343
SINUMERIK Integrate Run MyScreens
8
Programming Manual, 06/2019, A5E40869575B AC
Introduction
1
Overview
"Run MyScreens" can be used to create user interfaces that display functional expansions
designed by the machine manufacturer or user, or to implement your own layout.
Cycle calls can also be generated with user interfaces that you have created. Dialogs can be
created directly on the control system.
"Run MyScreens" is implemented with an Interpreter and configuration files that describe the
user interfaces.
"Run MyScreens" is configured using ASCII files: These configuration files contain the
description of the user interface. The syntax that must be applied in creating these files is
described in the following chapters.
Basic configuration
The "Run MyScreens" function enables machine manufacturers to configure their own dialogs.
Even with the basic configuration, it is possible to configure five dialogs in the operator menu
tree or for customer-specific cycle dialogs.
Software option
To expand the number of dialogs, you require one of the following software options:
● SINUMERIK 828D/840D sl, SINUMERIK Integrate Run MyScreens
(6FC5800-0AP64-0YB0)
● SINUMERIK 840D sl, SINUMERIK Integrate Run MyScreens + Run MyHMI
(6FC5800-0AP65-0YB0)
● SINUMERIK 840D sl, SINUMERIK Integrate Run MyHMI / 3GL
(6FC5800-0AP60-0YB0)
● SINUMERIK 840D sl, SINUMERIK Integrate Run MyHMI / WinCC
(6FC5800-0AP61-0YB0)
Supplementary conditions
The following conditions must be met:
● It is only possible to switch between dialogs within a single operating area.
● User variables may not have the same names as system or PLC variables (also see List
Manual System Variables /PGAsl/).
● The dialogs activated by the PLC form a separate operating area (similar to measuring cycle
screens).
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
9
Introduction
Tools
● UTF8-capable editor (e.g. the integrated editor of the user interface or Notepad)
● A graphics program is needed to create graphics/display images.
File names and coding
Note
When using HMI Operate in the NCU, note that all file names are written in lower case letters
(com, png, txt) on the CF card. This is required because of Linux.
File names are not case-sensitive on the PCU. However, it is recommended that you also use
lower case letters here, in case of a possible subsequent transfer to Linux.
Note
When saving configuration and language files, ensure that the coding is set to UTF-8 for the
editor you are using.
Storage paths
Note the following convention when storing the configuration files, language files, etc.
[System Siemens directory]
Linux:
/card/siemens/sinumerik/hmi
Windows 7:
C:\ProgramData\Siemens\MotionControl\siemens
[System oem directory]
Linux:
/card/oem/sinumerik/hmi
Windows 7:
C:\ProgramData\Siemens\MotionControl\oem
[System user directory]
Linux:
/card/user/sinumerik/hmi
Windows 7:
C:\ProgramData\Siemens\MotionControl\user
[System add_on directory]
Linux:
/card/addon/sinumerik/hmi
Windows 7:
C:\ProgramData\Siemens\MotionControl\addon
Storage locations
"Run MyScreens" configuration:
[System oem directory]/proj
Configuration file:
[System oem directory]/cfg
Language files:
[System oem directory]/lng
SINUMERIK Integrate Run MyScreens
10
Programming Manual, 06/2019, A5E40869575B AC
Introduction
Image files:
[System oem directory]/Ico/ico[Resolution]
Example:
[System oem directory]/Ico/ico640
Online Help:
[System oem directory]/hlp/[Language]
Example:
[System oem directory]/hlp/eng
Application
You can implement the following functions:
●
Display dialogs containing the following elements:
- Softkeys
- Variables
- Texts and Help texts
- Graphics and Help displays
●
Open dialogs by:
- Pressing the (start) softkeys
- Selection from the PLC/NC
●
Restructure dialogs dynamically:
- Edit and delete softkeys
- Define and design variable fields
- Insert, exchange and delete display texts (language-dependent or independent)
- Insert, exchange and delete graphics
●
Initiate operations in response to the following actions:
- Displaying dialogs
- Input values (variables)
- Select a softkey
- Exiting dialogs
- Value change of a system or user variable
●
Data exchange between dialogs:
●
Variables:
- Read (NC, PLC and user variables)
- Write (NC, PLC and user variables)
- Combine with mathematical, comparison or logic operators
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
11
Introduction
● Execute functions:
- Subprograms
- File functions
- PI services
● Apply protection levels according to user classes
SINUMERIK Integrate Run MyScreens
12
Programming Manual, 06/2019, A5E40869575B AC
Getting Started
2
2.1
Introduction
Using the following example, you get to know the steps necessary to insert your own dialogs
into the SINUMERIK Operate user interface using Run MySreens. You also learn how to create
your own dialogs, insert context-sensitive help screens and help calls, define softkeys and how
you can navigate between the dialogs.
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
13
Getting Started
2.2 Project example
2.2
Project example
2.2.1
Task description
In the project example you create the dialogs described in the following, including a context-
sensitive help.
Dialog 1
R parameters that can be written to (0 and 1) and geometry axis names are displayed in the first
dialog (input fields). The corresponding help screens are linked in for the two R parameters. A
context-sensitive help is linked in for the geometry axes. Further, the dialog includes examples
for separating lines (horizontal and vertical), toggle fields, input/output fields with integrated unit
selection and progress bars (with and without color change).
Figure 2-1
R parameters with help displays
SINUMERIK Integrate Run MyScreens
14
Programming Manual, 06/2019, A5E40869575B AC
Getting Started
2.2 Project example
Figure 2-2
Geometry axes with context sensitive help
Figure 2-3
Toggle fields: List and box
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
15
Getting Started
2.2 Project example
Figure 2-4
I/O field with integrated unit selection
Dialog 2
MCS and WCS values are displayed in the second dialog. The dialog also contains examples
of progress bars with and without color change.
Figure 2-5
Progress bars with (right) and without (left) color change
SINUMERIK Integrate Run MyScreens
16
Programming Manual, 06/2019, A5E40869575B AC
Getting Started
2.2 Project example
Navigation
The first dialog is called using the "START" softkey in the diagnostics operating area. The
horizontal SK7 softkey is used.
Figure 2-6
Start softkey „START“ in the machine operating area, AUTO mode
You can call the second dialog from the first dialog with the "Next Mask" softkey. You can return
to the root screen of the operating area by pressing the "EXIT" softkey (see the screen above).
Using the "EXIT" softkey, you can also return to the root screen of the operating area from the
second dialog (see the screen above). You can return to the first dialog via the "Back to Mask"
softkey.
Procedure
The necessary steps are described in the following chapters:
1. Creating the configuration file (COM file) (Page 18)
2. Saving the configuration file in the OEM directory (Page 21)
3. Creating the online help (Page 22)
4. Integrating the online help and saving the files to the OEM directory (Page 25)
5. Copying "easyscreen.ini" into the OEM directory (Page 26)
6. Registering the COM file in "easyscreen.ini" (Page 26)
7. Testing the project (Page 26)
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
17
Getting Started
2.2 Project example
2.2.2
Creating the configuration file (example)
Content of the configuration file
Using a UTF8-capable editor, create the configuration file "diag.com" for the two dialogs.
; Start identifier of start softkey
//S(START)
; Start softkey only text
HS7=("START")
; Start softkey with language-dependent text and png
;HS7=([$80792,"\\sk_ok.png"])
; Press method
PRESS(HS7)
; LM or LS function
LM("MASK1")
; LM, specifying a com file
LM("MASK1","TEST.COM")
END_PRESS
; End identifier of start softkey
//END
; Definition of dialog 1 with header and screen
//M(MASK1/"Display R parameter and Channel MD"/"mz961_01.png")
; Definition of the variables
DEF VAR1 = (R2///,"R parameter 0"///"$R[0]"/200,50,150/400,50,100,)
; With help screen
DEF VAR2 = (R2///,"R parameter 1"//"mz961_02.png"/"$R[1]"/200,70,150/400,70,100)
; With online help
DEF ACHS_NAM1 = (S///"Press i for Help","Geometry axis[0]"////200,100,150/400,100,100//"sinumer-
ik_md_1.html","20060[0]")
; With online help
DEF ACHS_NAM2 = (S///"Press i for Help","Geometry axis[1]"////200,120,150/400,120,100//"sinumer-
ik_md_1.html","20060[1]")
DEF ACHS_NAM3 = (S///,"Geometry axis[2]"////200,140,150/400,140,100)
; Definition of toggle fields and unit toggle
DEF VAR_TGL = (S/* "Hello", "Run", "MyScreens"/"Run"/,"Toggle box"////10,230,100/120,230,100/,,6)
DEF VAR_TGB = (S/* "Hello", "Run", "MyScreens"/"Run"/,"List box"/
dt4///250,230,100/370,230,100,60/,,"#0602ee")
; BC, FC, BC_ST, FC_ST, BC_GT, FC_GT, BC_UT, FC_UT, SC1, SC2
DEF VarEdit = (R///,"Unit Toggle",,,"Feedrate"///"$R[11]"/5,300,100/120,300,100///"VarTgl"),
VarTgl = (S/*0="mm",1="inch"/0//WR2////220,300,40)
SINUMERIK Integrate Run MyScreens
18
Programming Manual, 06/2019, A5E40869575B AC
Getting Started
2.2 Project example
; Softkey definition in the dialog
HS1=("")
HS2=("")
HS3=("")
HS4=("")
HS5=("")
HS6=("")
HS7=("")
HS8=("")
VS1=("")
VS2=("")
VS3=("")
VS4=("")
VS5=("")
VS6=("")
VS7=("Next Mask")
VS8=("EXIT")
; Definition LOAD block
LOAD
; Read value with RNP
ACHS_NAM1 = RNP("$MC_AXCONF_GEOAX_NAME_TAB[0]")
ACHS_NAM2 = RNP("$MC_AXCONF_GEOAX_NAME_TAB[1]")
ACHS_NAM3 = RNP("$MC_AXCONF_GEOAX_NAME_TAB[2]")
; Output of a dialog line
DLGL("Value R2: = " << RNP("$R[2]"))
; Write WNP to a value
WNP("$R[3]",VAR0)
; Vertical dividing line
V_SEPARATOR(360,1,6,1)
; Horizontal dividing line
H_SEPARATOR(220,1,7,1)
END_LOAD
; Press method
PRESS(VS7)
; Load an additional dialog
LM("MASK2")
; End identifier press method
END_PRESS
; Press method
PRESS(VS8)
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
19
Getting Started
2.2 Project example
; Exit the dialog
EXIT
; End identifier press method
END_PRESS
; End identifier dialog 1
//END
; Definition of dialog 2 with header and screen
//M(MASK2/"Position WCS MCS"/"mz961_01.png")
; Definition of the variables
DEF TEXT1 = (I///,"WCS"/WR0,fs2///230,30,120/,,1)
DEF VAR1 = (R3///,"1. Axis $AA_IW[AX1]"/WR1//"$AA_IW[AX1]"/230,70,150/400,70,100)
DEF VAR2 = (R3///,"2. Axis $AA_IW[AX2]"/WR1//"$AA_IW[AX2]"/230,90,150/400,90,100)
DEF TEXT2 = (I///,"MCS"/WR0,fs2///230,120,120/,,1)
DEF VAR3 = (R2///,"1. Axis $AA_IM[AX1]"/WR1//"$AA_IM[AX1]"/230,160,150/400,160,100)
DEF VAR4 = (R2///,"2. Axis $AA_IM[AX2]"/WR1//"$AA_IM[AX2]"/230,180,150/400,180,100)
DEF VAR5 = (R3///,"$P_UIFR G54 AX1"///"$P_UIFR[1,AX1,TR]"/230,200,150/400,200,100)
; Definition of the progress bar
DEF PROGGY0 = (R/0,150//,"Progress bar Operate style"/DT2,DO0//"$R[10]"/5,240,190/5,260,150/6,10)
DEF PROGGY4 = (R/0,150,50,100/120/,"Progress bar with color change"/DT1,DO0//"$R[10]"/
260,240,190/260,260,150/3,4,,,9,7)
; Definition of the variables
DEF PROGVAL = (R/0,150//,"Value to change Progress bar 0 - 150"///"$R[10]"/5,300,230/260,300,100)
; Softkey definition in the dialog
HS1=("")
HS2=("")
HS3=("")
HS4=("")
HS5=("")
HS6=("")
HS7=("")
HS8=("")
VS1=("")
VS2=("")
VS3=("")
VS4=("")
VS5=("")
VS6=("")
VS7=("Back to Mask")
VS8=("EXIT")
SINUMERIK Integrate Run MyScreens
20
Programming Manual, 06/2019, A5E40869575B AC
Getting Started
2.2 Project example
; Load method
LOAD
H_SEPARATOR(230,1,7,1)
END_LOAD
; Change method
CHANGE(VAR5)
; Function PI_START
PI_START("/NC,201,_N_SETUFR")
; End identifier change method
END_CHANGE
; Press method
PRESS(RECALL)
; Return to the calling mask
LM("MASK1")
; End identifier press method
END_PRESS
; Press method
PRESS(VS7)
; Return to the calling mask
LM("MASK1")
; End identifier press method
END_PRESS
; Press method
PRESS(VS8)
; Exit the dialog to the standard application
EXIT
; End identifier press method
END_PRESS
; Dialog end identifier
//END
2.2.3
Saving the configuration file in the OEM directory (example)
Storage path
Save the configuration file "diag.com" under the following path:
[System oem directory]/proj
SINUMERIK Integrate Run MyScreens
Programming Manual, 06/2019, A5E40869575B AC
21
|