IHsl BE2 0911 en
IHsl BE2 0911 en
IHsl BE2 0911 en
___________________
How do I create a
___________________
configuration? 2
___________________
Variables 3
SINUMERIK
___________________
Programming commands 4
SINUMERIK 840D sl
Easy Screen (BE2) ___________________
Graphic and logic elements 5
___________________
"Custom" operating area 6
Programming Manual
___________________
PLC softkeys 7
___________________
Reference lists A
Valid for
Control:
SINUMERIK 840D sl/840DE sl
Software:
CNC software V4.4
SINUMERIK Operate V4.4
09/2011
6FC5397-1DP40-2BA0
Legal information
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
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.
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 for the specific task, 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 adhered to. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of the 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.
1 Introduction................................................................................................................................................ 7
1.1 "Easy Screen" range of functions ..................................................................................................7
1.2 Fundamentals of Configuration......................................................................................................9
1.3 Structure of configuration file .......................................................................................................11
1.4 Troubleshooting (log book) ..........................................................................................................13
2 How do I create a configuration? ............................................................................................................. 15
2.1 Defining start softkeys..................................................................................................................15
2.1.1 Functions for start softkeys ..........................................................................................................17
2.2 Structure and elements of a dialog ..............................................................................................21
2.2.1 Defining a dialog ..........................................................................................................................21
2.2.2 Defining dialog properties ............................................................................................................23
2.2.3 Defining dialog elements..............................................................................................................27
2.2.4 Example Opening the Dialog .......................................................................................................29
2.2.5 Defining dialogs with multiple columns ........................................................................................30
2.2.6 Using display images/graphics ....................................................................................................31
2.3 Defining softkey menus................................................................................................................33
2.3.1 Changing softkey properties during runtime ................................................................................36
2.3.2 Language-dependent text ............................................................................................................38
2.4 Configuring the online help ..........................................................................................................41
3 Variables.................................................................................................................................................. 43
3.1 Defining variables ........................................................................................................................43
3.2 Application examples ...................................................................................................................45
3.3 Example 1: Assigning the variable type, texts, help display, colors, tooltips...............................47
3.4 Example 2: Assigning the Variable Type, Limits, Attributes, Short Text Position properties ......49
3.5 Example 3: Assigning the Variable Type, Default, System or User Variable, Input/Output
Field Position properties ..............................................................................................................50
3.6 Examples relating to toggle field and image display....................................................................51
3.7 Variable parameters.....................................................................................................................52
3.8 Details on the variable type..........................................................................................................55
3.9 Details on the toggle field.............................................................................................................59
3.10 Details on the default setting........................................................................................................61
3.11 Details on the position of the short text, position of the input/output field ...................................62
3.12 Use of strings ...............................................................................................................................63
3.13 CURPOS variable ........................................................................................................................65
Overview
"Easy Screen" is implemented with an interpreter and configuration files containing
descriptions of the user interfaces.
"Easy Screen" 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.
The "Easy Screen" interpreter can be used to create user interfaces that display functional
expansions designed by the machine manufacturer or user, or simply to implement your own
layout on the HMI. Preconfigured user interfaces supplied by Siemens or the machine
manufacturer can be modified or replaced.
Part programs, for example, can be edited on user interfaces created by users. Dialogs can
be created directly on the control system.
Basic configuration
The "Easy Screen" function enables machine manufacturers to configure their own dialogs.
Even with the basic configuration, it is possible to configure 5 screens in the operator menu
tree or for customer-specific cycle dialogs.
Software option
To expand the number of dialogs, you require the following Software option:
"SINUMERIK Operate Runtime license OA Easy Screen"
Supplementary Conditions
The following conditions must be met:
● It is only possible to switch between dialogs within a single operating area.
● User, setting, and machine data are initialized on request.
● User variables may not have the same names as system or PLC variables.
● The dialogs activated by the PLC form a separate operating area (similar to measuring
cycle screens).
● The cycle support (//C ... ) is no longer supported by the software.
Tools
An additional graphics program is needed to produce graphics/display images.
Use
You can implement the following functions:
1. Display dialogs containing the following elements:
– Softkeys
– Variables
– Texts and Help texts
– Graphics and Help displays
2. Open dialogs by:
– Pressing the (start) softkeys
– Selection from the PLC
3. 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
4. Initiate operations in response to the following actions:
– Displaying dialogs
– Input values (variables)
– Select a softkey
– Exiting dialogs
5. Data exchange between dialogs
6. Variables
– Read (NC, PLC and user variables)
– Write (NC, PLC and user variables)
– Combine with mathematical, comparison or logic operators
7. Execute functions:
– Subroutines
– File functions
– PI services
8. Apply protection levels according to user classes
Configuration files
The defining data for new user interfaces are stored in configuration files. These files are
automatically interpreted and the result displayed on the screen. Configuration files are not
stored in the software supplied and must be set up by the user.
Note
The description can also be explained using comments. A ";" is inserted as comment
character before every explanation.
An ASCII editor (e.g. Notepad or the HMI editor) is used to create configuration files.
Note
If you create or edit the files, use an editor that supports UTF-8 coding.
6WDUWVRIWNH\
Start softkeys
One or more softkeys (start softkeys), which are used to initiate your own operating
sequences, are defined in one of the specified configuration files.
The loading of a dedicated dialog is associated with a softkey definition or another softkey
menu. These are then used to perform the subsequent actions.
Pressing the start softkey loads the assigned dialog. This will also activate the softkeys
associated with the dialog. Variables will be output to the standard positions unless specific
positions have been configured.
Note
Calling dialogs in the PLC user program
Dialogs can be selected from the PLC as well as via softkeys: An interface signal is available
in DB19.DBB10 for signal exchange between the PLC → HMI.
Overview
Each HMI application has permanent start softkeys, which can be used to access newly
generated dialogs.
Other files:
In the event of "Load a screen form" (LM) or a "Load softkey menu" (LS) call in a
configuration file, a new file name containing the object called can be specified. This makes
it possible to structure the configuration, e.g., all functions in one operating level in a
separate configuration file.
[Compatibility]
UseTextCodecs = true
Note
Constraint
In the supplied version of easyscreen.ini, this entry is not available, therefore, text files with
UTF-8 coding are expected.
If the entry is supplemented, the old mechanism becomes effective again with the following
restriction: It does not function correctly for Asian languages.
Note
Sequence
The specified sequence in the configuration file must be maintained.
Example:
Overview
The log book is the easyscreen_log.txt file to which error messages generated by syntax
interpretation are written.
The file easyscreen_log.txt is supplied in the following directory:
/user/sinumerik/hmi/log/
Example:
Syntax
The system does not start to interpret syntax until the start softkey has been defined and a
dialog with start and end identifiers as well as a definition line has been configured.
//S(Start)
HS6=("1st screen")
PRESS(HS6)
LM("Maske1")
END_PRESS
//END
//M(Maske1)
DEF Var1=(R)
//END
Contents of easyscreen_log.txt
If "Easy Screen" detects errors when interpreting the configuration files, these errors will be
written to the easyscreen_log.txt ASCII file. The file will be deleted each time the HMI is
restarted.
The file indicates:
● The action during which an error occurred
● The line and column number of the first faulty character
● The entire faulty line of the configuration file
Dialog-independent softkey
Start softkeys are dialog-independent softkeys which are not called from a dialog, but which
have been configured before the first new dialog. In order to access the start dialog or a start
softkey menu, the start softkey must be defined.
Programming
The definition block for a start softkey is structured as follows:
Start softkeys are configured in special files. The names of these files are stated in the
easyscreen.ini file. They usually have a name which is specific to an operating area (e.g.
startup.com for the Startup area). This does not apply to the machine operating area, where
there are a number of files specific to operating modes (ma_jog.com, ma_auto.com).
The softkey menu with the start softkeys is called "Start". Existing configurations for start
softkeys can still be used. The function whereby start softkeys are merged with the softkeys
for the respective HMI application (operating area) in the start softkey menu is not supported.
This means that until the first dialog call is made - in other words, the time at which full
functionality becomes available (e.g. execution of PRESS blocks) - menus or softkey menus
can only be replaced by others in their entirety.
Menus for standard applications are given the "easyscreenmode" menu property as part of
their XML configuration. This indicates whether the menu involved permits the use of
Easy Screen start softkeys (= easyscreen) or not (= off):
<SCREEN name="SlEasyScreenTest">
<FORM ... >
<PROPERTY ... > ... </PROPERTY>
</FORM>
<MENU name="menu_horiz" softkeybar="hu" easyscreenmode="easyscreen" />
<MENU name="menu_vert" softkeybar="vr" easyscreenmode="off" />
</SCREEN>
Example
Separate start softkey menus can be defined for horizontal and vertical menus. The "MENU"
attribute is used for this purpose.
If a new menu is displayed in an HMI application and this menu permits the use of start
softkeys in accordance with the configuration (easyscreenmode = "easyscreen"), a search
will first be performed for the "MENU" attribute in the configuration of the start softkey menu:
● If a configuration for a start softkey menu with the "MENU" attribute is found and if the
"MENU" attribute contains the name of the menu that is currently being displayed (in the
example: "menu_horiz"), then this start softkey menu is displayed.
Only the horizontal softkeys are taken into account here, as the "menu_horiz" menu
involves a horizontal menu bar.
● Where there is no menu-specific softkey menu for a particular menu (i.e. the "MENU"
attribute is not available), the default start softkey menu will be loaded.
//S(Start)
MENU="menu_horiz"
HS2=("Contour",ac6,se3)
PRESS(HS2)
LS("Contour")
END_PRESS
...
//END
See also
Lists of start softkeys (Page 167)
PRESS method
The softkey is defined within the definition block and the "LM" or "LS" function is assigned in
the PRESS method.
If the start softkey definition is designated as a comment (semicolon (;) at beginning of line)
or the configuration file removed, the start softkey will not function.
Example
Configuration
The names of the files containing the configuration for the start softkey menus are given in
the easyscreen.ini file. The entry can be specific to the operating area, the dialog, or the
screen. For example:
The names given in the systemconfiguration.ini file should be used for "area" and "dialog".
The screen identifiers in the dialog configuration should be used for "screen"; "startfile" refers
to the file in which the start softkey menu (default or menu-specific) is configured.
If a menu-specific start softkey menu is required, an additional name is provided by the
attribute "menu", e.g.:
Definition
A dialog is part of a user interface consisting of a display line, dialog elements and/or
graphics, an output line for messages and 8 horizontal and 8 vertical softkeys.
Dialog elements are:
● Variables
– Limits/toggle field
– Default setting of variables
● Help display
● Texts
● Attributes
● System or user variable
● Position of short text
● Position of input/output field
● Colors
Dialog properties:
● Header
● Graphic
● Dimension
● System or user variable
● Graphic position
● Attributes
Overview
The definition of a dialog (definition block) is basically structured as follows:
Within the dialog definition block, various variables that appear as dialog elements in the
dialog, as well as horizontal and vertical softkeys, are defined first. Different types of actions
are then configured in methods.
Description
The properties of the dialog are defined in the start identifier line of the dialog.
Programming
Example
//S(Start)
HS7=("Example", se1, ac7)
PRESS(HS7)
LM("Mask2")
END_PRESS
//END
//M(Mask2/"Example 2 : showing graphic"/"example.png")
HS1=("new%nHeader")
HS2=("")
HS3=("")
HS4=("")
HS5=("")
HS6=("")
HS7=("")
HS8=("")
VS1=("")
VS2=("")
VS3=("")
VS4=("")
VS5=("")
VS6=("")
VS7=("")
VS8=("")
PRESS(HS1)
Hd= "new Header"
END_PRESS
...
//END
See also
Programming example for the "Custom" area (Page 161)
Dialog element
The term "dialog element" refers to the visible part of a variable, i.e., short text, graphics text,
input/output field and unit text. Dialog elements fill lines in the main body of the dialog. One
or more dialog elements can be defined for each line.
Variable properties
All variables are valid in the active dialog only. Properties are assigned to a variable when it
is defined. The values of dialog properties can be accessed within methods (e.g. a PRESS
block).
Programming - Overview
The single parameters to be separated by commas are enclosed in round parentheses:
See also
Variable parameters (Page 52)
Programming
The new "Example" dialog is called via the "Example" start softkey from the "Startup"
operating area:
8VHU
6RIWNH\
//S(Start)
HS7=("Example", ac7, se1)
PRESS(HS7)
LM("Maske1")
END_PRESS
//END
//M(Maske1/"Example")
HS1=("")
HS2=("")
HS3=("")
HS4=("")
HS5=("")
HS6=("")
HS7=("")
HS8=("")
VS1=("")
VS2=("")
VS3=("")
VS4=("")
VS5=("")
VS6=("")
VS7=("")
VS8=("")
... ; Methods
//END
Overview
Multiple variables can also be represented in a dialog on one line. In this case, the variables
are all defined in the configuration file on a single definition line.
DEF VAR11 = (S///"Var11"), VAR12 = (I///"Var12")
To make individual variables in the configuration file more legible, the definition lines can be
wrapped after every variables definition and following comma.
The key word "DEF" always indicates the beginning of a new line:
DEF Tnr1=(I//1/"","T ",""/wr1///,,10/20,,50),
TOP1=(I///,"Type="/WR2//"$TC_DP1[1,1]"/80,,30/120,,50),
TOP2=(R3///,"L1="/WR2//"$TC_DP3[1,1]"/170,,30/210,,70),
TOP3=(R3///,"L2="/WR2//"$TC_DP4[1,1]"/280,,30/320,,70),
TOP4=(R3///,"L3="/WR2//"$TC_DP5[1,1]"/390,,30/420,,70)
TOP21=(I///,"Typ="/WR2//"$TC_DP1[2,1]"/80,,30/120,,50),
TOP22=(R3///,"L1="/WR2//"$TC_DP3[2,1]"/170,,30/210,,70),
TOP23=(R3///,"L2="/WR2//"$TC_DP4[2,1]"/280,,30/320,,70),
TOP24=(R3///,"L3="/WR2//"$TC_DP5[2,1]"/390,,30/420,,70)
...
NOTICE
When creating dialogs with multiple columns, the options and limits of the hardware being
used should be taken into consideration in terms of the number of columns and DEF
instructions. A lot of columns can slow down the system.
Use of graphics
There are two display categories:
● Display images/graphics in the graphic area
● Help displays illustrating, for example, individual variables, which are superimposed in the
graphic area.
● More Help displays can be configured instead of short text or an input/output field, which
you position where you like.
Storage locations
First, the relevant resolution directory is searched for the display image corresponding to the
resolution of the connected monitor. If it is not found there, a search is performed for the
display image in the next smaller resolution directory until – if the display image is not found
earlier – directory ico640 is reached:
Search sequence:
/user/sinumerik/hmi/ico/ico<Resolution>
/oem/sinumerik/hmi/ico/ico<Resolution>
/addon/sinumerik/hmi/ico/ico<Resolution>
Note
Graphics are proportionally positioned for resolutions 640 x 480, 800 x 600 and 1024 x 768
pixels.
Definition
The term softkey menu is used to refer to all the horizontal and vertical softkeys displayed on
a screen form. In addition to the existing softkey menus, it is possible to define other menus,
which partially or completely overwrite the existing menus.
The names of the softkeys are predefined. Not all softkeys need to be assigned.
HSx x 1 - 8, Horizontal softkeys 1 to 8
VSy y 1 - 8, Vertical softkeys 1 to 8
The definition of a softkey menu (softkey menu definition block) is basically structured as
follows:
Description
Properties are assigned to softkeys during definition of the softkey menu.
Programming
Note
Enter %n in the softkey text to create a line break.
A maximum of 2 lines with 9 characters each are available.
Example
Description
The softkey properties Text, Access Level and Status can be changed in the methods during
runtime.
Programming
Example
//S(Start)
HS7=("Example", ac7, se1)
PRESS(HS7)
LM("Maske3")
END_PRESS
//END
VS1=("")
VS2=("")
VS3=("")
VS4=("\\sp_ok.png",,SE1)
VS5=(["\\sp_ok_small.png","OEM Text"],,SE1)
VS6=("")
VS7=(SOFTKEY_OK,,SE1)
VS8=(SOFTKEY_CANCEL,,SE1)
PRESS(VS4)
EXIT
END_PRESS
PRESS(VS5)
EXIT
END_PRESS
PRESS(VS7)
EXIT
END_PRESS
PRESS(VS8)
EXIT
END_PRESS
//END
Overview
Language-dependent texts are used for:
● Softkey labels
● Headings
● Help texts
● Any other texts
The language-dependent texts for dialogs are stored in text files.
The text files are stored in the following directories:
● /user/sinumerik/hmi/lng/
● /oem/sinumerik/hmi/lng/
● /addon/sinumerik/hmi/lng/
alsc.txt Contains the language-dependent texts for the Siemens standard cycles
almc.txt Contains the language-dependent texts for the manufacturer cycles
aluc.txt Language-dependent user texts
The text files used during program runtime are specified in the easyscreen.ini file:
[LANGUAGEFILES]
LngFile02 = user.txt
In this instance, the user.txt file has been chosen as an example of a text file. Any name can
be selected, in principle. Depending on the language of the texts within the file, the relevant
language code must be added using the following syntax:
user.txt → user_xxx.txt (e.g. user_eng.txt)
An underscore followed by the relevant language identifier are added after the name.
See also
List of language codes used in file names (Page 172)
Parameters 2 and 3 are separated by blanks and act as control characters for alarm text
output. To ensure that the text format is identical to that of the alarm texts, these two
parameters must always be set to zero.
Examples of alarms:
85000 0 0 "Retraction plane"
85002 0 0 "Pitch"
Online help
An online help for the configured dialogs and elements can be created in the HTML format.
The syntax and procedure for the online help is essentially the same as for SINUMERIK
Operate, e.g.:
DEF VAR14 = (I///,"\\ein.png"/al1,cb1,wr2//"DB1.DBB0"////"sinumerik_md_1.html",
"9100")
References
Commissioning Manual "Base software and operating software" (IM9), Chapter "OEM-
specific online help"
See also
Defining dialog elements (Page 27)
Variable value
The most basic property of a variable is its value.
The value of variables can be assigned by means of:
● Default settings when defining variables
● Assignment to a system or user variable
● A method
Programming
Variable status
The "Variable status" property can be used to scan a variable for valid content during
runtime. This property can be read and written with the value FALSE = 0.
Programming
Syntax: Identifier.vld
Description: Variable status vld (validation)
Parameters: Identifier: Name of variable
The result of the scan can be:
FALSE =invalid value
TRUE =valid value
IF VAR1.VLD == FALSE
Example:
VAR1 = 84
ENDIF
Help variables
Help variables are internal arithmetic variables. Arithmetic variables are defined like other
variables, but have no other properties apart from variable value and status, i.e. Help
variables are not visible in the dialog. Help variables are of the VARIANT type.
Programming
LOAD
OTTO = "Test" ; Assign the value "Test" to the Otto Help
END_LOAD variable.
LOAD
OTTO = REG[9].VAL ; Assign the value of the register to the Otto Help
END_LOAD variable.
Otto = PI * Var4
AXIS=AXIS+1
END_PRESS
3.3 Example 1: Assigning the variable type, texts, help display, colors,
tooltips
Example 1a
Assigning the Variable type, Texts, Help display, and Colors properties
Example 1b
Assigning tooltips
See also
Variable parameters (Page 52)
Example 2
Assigning the Variable Type, Limits, Attributes, Short Text Position properties
See also
Variable parameters (Page 52)
Example 3
Assigning the Variable Type, Default, System or User Variable, Input/Output Field Position
properties
See also
Variable parameters (Page 52)
Example 4
Various entries in the toggle field:
Example 5
Displaying an image instead of a short text: The size and position of the image is defined
under "Position of IO field (left, top, width, height)".
Parameter overview
The following overview provides a brief explanation of the variable parameters. Subsequent
chapters contain a more detailed description.
Parameter Description
Variable type (Page 55) The variable type must be specified.
R[x]: REAL (+ digit for the decimal place)
I: INTEGER
S[x]: STRING (+ digit for string length)
C: CHARACTER (individual character)
B: BOOL
V: VARIANT
Limits (Page 49) Limit value MIN, limit value MAX
Default setting: Empty
The limit values are separated by a comma. Limits can be specified for types I, C and R
in decimal formats or as characters in the form "A", "F".
Default setting (Page 61) If no default setting has been configured and no system or user variable has been
assigned to the variable, the first element of the toggle field is assigned. If no toggle field
has been defined, there is no default setting, which means the status of the variable is
"not calculated".
Default setting: No default
Toggle field (Page 59) List with predetermined entries in the IO field: The list is initiated by a *; the entries are
separated by a comma. The entries can be assigned a value.
For the toggle field, the entry for the limit is interpreted as a list. If only one * is entered,
a variable toggle field is created.
Default setting: None
Texts (Page 47) The sequence is specified. Instead of a short text, an image can also be displayed.
Default setting: Empty
Long text: Text in the display line
Short text: Name of the dialog element
Graphic text: Text refers to the terms in the graphics
Unit text: Unit of the dialog element
Tooltips (Page 47) Serve as brief information in a screen form configuration for
the display and toggle fields. The information is configured via
plain text and language text ID.
Parameter Description
Attributes (Page 49) The attributes influence the following properties:
Input mode
Access level
Alignment of short text
Font size
Limits
Response when dialog is opened in terms of CHANGE block
The attributes are separated by commas and appear in any order. The attributes are not
valid for toggle fields. A definition can be made for each component.
Input mode wr0: IO field invisible, short text visible
wr1: Read (no focus possible for input)
wr2: Read and write (line appears in white)
wr3: wr1 with focus
wr4: All variable elements invisible, no focus possible
wr5: The value entered is saved immediately on every keystroke (in
contrast to wr2, where it is only saved when the field is exited or
RETURN is pressed).
Default setting: wr2
Access level Empty: Can always be written
ac0...ac7: Protection levels
If the access level is not adequate, then the first line is displayed in
gray, default setting: ac7
Alignment of al0: Left-justified
short text al1: Right-justified
al2: centered
Default setting: al0
Font size fs1: Default font size (8 pt.)
fs2: Double font size
Default setting: fs1
The clearances between the lines is defined. With the default font
size, 16 lines will fit into the dialog. Graphics and unit text can only be
configured in the default font size.
Limits Consequently, it is possible to check whether the values of the
variable are within the MIN and MAX limits specified.
Default setting: Determined by specified limits
li0: No check
li1: Check with respect to min.
li2: Check with respect to max.
li3: Check with respect to min. and max.
Behavior when cb attributes specified for a variable in a variables definition take
opening priority over the cb default setting in the dialog definition. Multiple
attributes are separated by commas.
Parameter Description
cb0: The CHANGE block defined for this variable is edited when the
dialog is opened (default setting). Multiple attributes are separated by
commas.
cb1: The CHANGE block defined for this variable is then only processed if
the value of the variable changes.
Help display (Page 47) Help display file: Name of the png file
Default setting: Empty
The name of the Help display file appears in double quotation marks. The display
appears automatically (instead of the previous graphic) if the cursor is positioned on this
variable.
System or user variable System or user data from the NC/PLC can be assigned to the variable. The system or
(Page 50) user variable appears in double quotation marks.
Reference: List Manual System Variables, /PGAsl/
Position of short text (Page 62) Position of short text (distance from left, distance from top, width)
The positions are entered in pixels and relate to the upper left-hand corner of the main
body of the dialog. The entries are separated by commas.
Position of input/output field Position of input/output field (distance from left, distance from top, width, height)
(Page 62) The positions are entered in pixels and relate to the upper left-hand corner of the main
body of the dialog. The entries are separated by commas. If this position changes, the
positions of the short text, graphic text and unit text also change.
Colors (Page 47) Foreground color, background color: The colors are separated by a comma. Color
settings are only relevant to the input/output field; colors cannot be specified for the
other texts.
Range of values: 1...10
Default setting: Foreground color: Black, background color: white
The default colors of the input/output field are determined by the Write mode:
"wr" indicates write mode.
Display format
B Binary
D Decimal signed
H hexadecimal
No data Decimal signed
Memory utilization
B Byte
W Word
D Double Word
BU Byte, Unsigned
WU Word, Unsigned
DU Double word, Unsigned
Programming
The data type of variables can be checked:
B Binary
D Decimal signed
H hexadecimal
unsigned
With the addition of U for Unsigned
● For REAL data types, only the number of places after the decimal point can be changed.
Changing the type is illegal and generates an error message in the easyscreen_log.txt.
file.
Example:
Var1.typ = "IBW"
Var2.typ = "R3"
Numerical formats
Numbers can be represented in either binary, decimal, hexadecimal or exponential notation:
Binary B01110110
decimal 123.45
hexadecimal HF1A9
exponential -1.23EX-3
Examples:
VAR1 = HF1A9
REG[0]= B01110110
DEF VAR7 = (R//-1.23EX-3)
Note
When codes are generated with the "GC" function, only numerical values in decimal or
exponential notation are evaluated, but not those in binary or hexadecimal notation.
See also
Variable parameters (Page 52)
Description
The toggle field extension function can be used to display texts (entries in toggle field) as a
function of NC/PLC variables. A variable, which makes use of a toggle field extension, is
read-only.
Programming
Toggle-field-dependent displays
The toggle field is overlaid with graphics, which change depending on the value of the
memory byte. If the value of the memory byte is 1, "image1.png" will appear. If it is 2,
"image2.png" will appear.
DEF VAR1=(IDB/*1="\\image1.png",
2="\\image2.png"//,$85000/wr1//"MB[0]"//160,40,50,50)
The size and position of the image is defined under "Position of IO field (left, top, width,
height)".
See also
Variable parameters (Page 52)
Overview
A variable can assume various states depending on whether a default value, or a system or
user variable, or both, has been assigned to the variable field (I/O field or toggle field). (Not
calculated: Toggling is not possible until a valid value is assigned to the variable).
If... Then...
Field type Default setting System or user variable Reaction of field type
I/O field yes yes Write default value to system or user variable
No yes Use system or user variable as default value
Error yes Not calculated, system or user variable is not written
into/used.
yes No Default setting
No No Not calculated
Error No Not calculated
yes Error Not calculated
No Error Not calculated
Error Error Not calculated
Toggle yes yes Write default value to system or user variable
No yes Use system or user variable as default value
Error yes Not calculated,
system or user variable not written/used
yes No Default setting
No No Default = first toggle field element
Error No Not calculated
yes Error Not calculated
No Error Not calculated
Error Error Not calculated
See also
Variable parameters (Page 52)
3.11 Details on the position of the short text, position of the input/output
field
Overview
The short text and graphic text, as well as the input/output field and unit text, are each
treated like a unit, i.e., position settings for short text apply to the graphic text and settings for
the input/output field and to unit text.
Programming
The configured position entry overwrites the default value, i.e., only one value can be
changed. If no position settings have been configured for subsequent screen form elements,
then the position settings for the preceding screen form element are applied.
If no positions have been specified for any dialog elements, the default setting is applied. By
default, the column width for the short text and input/output field is calculated for each line
based on the number of columns and maximum line width, i.e.,column width = maximum line
width/number of columns.
The width of the graphics and unit text is predefined and optimized to suit the requirements
of programming support. If graphics or unit text has been configured, the width of the short
text or I/O field is reduced accordingly.
The order of short text and I/O field can be reversed by position settings.
See also
Variable parameters (Page 52)
Strings
Strings can be used as part of the configuration. These allow text to be displayed
dynamically or different texts to be chained for the purpose of code generation.
Rules
The following rules must be observed with regard to string variables:
● Logic operations are processed from left to right.
● Nested expressions are solved from the inside outwards.
● No distinction is made between uppercase and lowercase type.
● String variables are generally displayed left justified.
Strings can be deleted simply by assigning a blank string.
Strings can be appended after the equality sign using the operator "<<". Quotation marks (")
in the string are represented by two successive quotation mark symbols. Strings can be
checked for equality in IF instructions.
Example
Default settings for the following examples:
VAR1.VAL = "This is an"
VAR8.VAL = 4
VAR14.VAL = 15
VAR2.VAL = "Error"
Editing strings:
● Chaining of strings:
VAR12.VAL = VAR1 << " Error." ;Result: "This is an error"
● Deleting a variable:
VAR10.VAL = "" ;Result: Blank string
VAR16 = 18.1234
ENDIF
See also
STRING functions (Page 130)
Description
Using the CURPOS variable, it is possible to display or manipulate the position of the cursor
in the active input field of the current dialog. The variable indicates how many characters are
located in front of the cursor. If the cursor is located at the start of the input field, then
CURPOS assumes the value of 0. If the value of CURPOS is changed, then the cursor is
positioned at the appropriate location in the input field.
In order to be able to respond to changes in the variable value, it is possible to monitor for
changes using a CHANGE block. If the value of CURPOS changes, then a jump is made to
the CHANGE block and the instructions contained there are executed.
Description
The CURVER (CURrent VERsion) property allows the programming to be adapted in order
to handle different versions. The CURVER variable is read-only.
Note
Even if previously recompiled with an older version, the code is automatically generated with
the most recent version. The "GC" command always generates the most recent version. An
additional identifier indicating the generated version is inserted in the user comment of the
generated code in versions > 0.
Rules
The most recent dialog with all its variables is always displayed.
● Variables used previously may not be changed.
● New variables are inserted in the existing (cycle) programming in arbitrary order.
● It is not permissible to delete variables from a dialog from one version to the next.
● The dialog must contain all variables of all versions.
Example
Description
The ENTRY variable can be used to check by what method a dialog has been called.
Programming
Syntax: ENTRY
Description: The ENTRY variable is a read only variable.
Return Value: The result of the scan can be:
0 =No programming support
1 =Programming support (the dialog was called by programming
support)
2 =Programming support + default setting from the previous dialog
(sub-dialog)
3 =Programming support + recompilation
4 =Programming support + recompilation with generated
comments, with # sign
5 =Programming support + recompilation with generated
comments, without # sign
Example
IF ENTRY == 0
DLGL("The dialog was not called during programming")
ELSE
DLGL("The dialog was called during programming")
ENDIF
Description
Variable ERR can be used to check whether the preceding lines have been executed
correctly.
Programming
Syntax: ERR
Description: The ERR variable is read-only.
Return Value: The result of the scan can be:
FALSE =previous line was executed error-free
TRUE =previous line was not executed error-free
Example
Description
Variable FILE_ERR can be used to check whether the preceding GC or CP command has
been executed correctly.
Programming
Syntax: FILE_ERR
Description: The FILE_ERR variable is read-only.
Return Value: Possible results are:
0 =Operation okay
1 =Drive/path not available
2 =Path/file access error
3 =Drive not ready
4 =Incorrect file name
5 =File is already open
6 =Access denied
7 =Target path not available or not permitted
8 =Copy source same as target
10 =Internal error: FILE_ERR = 10 means that the error cannot be
classified in the other categories.
Example
CP("D:\source.mpf","E:\target.mpf")
; Copy from source.mpf to E:\target.mpf
IF FILE_ERR > 0 ; Scan to ascertain whether error has occurred
IF FILE_ERR == 1 ; Scan specific error numbers and output
associated error text
VAR5 = "Drive/path not available"
ELSE
IF FILE_ERR == 2
VAR5 = "Path/file access error"
ELSE
IF FILE_ERR == 3
VAR5 = "Wrong file name"
ENDIF
ENDIF
ENDIF
ELSE
VAR5 = "All OK" ; If no errors have occurred in CP (or GC),
"All OK" is output
ENDIF
Description
The FOC variable can be used to control the input focus (the current active input/output field)
in a dialog. Responses to cursor left, right, up and down movements, as well as PGUP,
PGDN, are predefined and cannot be modified.
Note
The FOC function may not be initiated as a result of a navigation event. The cursor position
may only be changed in softkey PRESS blocks, CHANGE blocks, etc.
The FOC function cannot be applied to variables with input mode wr = 0 and wr = 4 or to
Help variables.
Programming
Syntax: FOC
Description: The variable can be read and written.
Return Value: Read The result is the name of the variable to which the FOC
function has been applied.
Write It is possible to assign either a string or a numerical
value.A string is interpreted as a variable name and a
numerical value as a variable index.
Example
Description
The S_CHAN variable can be used to determine the number of the current channel for
display or evaluation purposes.
Overview
The following operators can be used when programming:
● Mathematical operators
● Relational operators
● Logic (Boolean) operators
● Bit operators
● Trigonometric functions
Overview
Example: VAR1.VAL = 45 * (4 + 3)
ROUND
The ROUND operator is used to round off numbers with up to 12 decimal places during
execution of a dialog configuration. The variable fields cannot accept the decimal places in
the display.
Use
ROUND is controlled by the user with two parameters:
VAR1 = 5,2328543
VAR1 contains the number to be rounded. The parameter “4” indicates the number of
decimal places in the result, which is placed in VAR2.
Trigonometric functions
Note
The functions operate with radian measure. The functions SDEG() and SRAD() can be used
for conversion.
Constants
Constants
PI 3.14159265358979323846
FALSE 0
TRUE 1
Example: VAR1.VAL = PI
Relational operators
Relational operators
== Equal to
<> Not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
Example
IF VAR1.VAL == 1
VAR2.VAL = TRUE
ENDIF
Conditions
The nesting depth is unlimited.
IF
Condition with a command:
...
ENDIF
IF
Condition with two commands:
...
ELSE
...
ENDIF
Overview
SHL operator
Bits are shifted to the left using the SHL (SHIFT LEFT) operator. You can specify both the
value to be shifted and the number of shift increments directly or via a variable. If the limit of
the data format is reached, the bits are shifted beyond the limit without displaying an error
message.
Use
Example
PRESS(VS1)
VAR01 = 16 SHL 2 ; Result = 64
VAR02 = VAR02 SHL VAR04 ; Convert content of VAR02 to 32-bit unsigned , and
shift content to left by number of bits specified
in VAR04. Then convert 32-bit value back to
format of variable VAR02.
END_PRESS
SHR operator
Bits are shifted to the RIGHT using the SHR (SHIFT RIGHT) function. You can specify both
the value to be shifted and the number of shift increments directly or via a variable. If the limit
of the data format is reached, the bits are shifted beyond the limit without displaying an error
message.
Use
Example
PRESS(VS1)
VAR01 = 16 SHR 2 ; Result = 4
VAR02 = VAR02 SHR VAR04 ; Convert content of VAR02 to 32-bit unsigned ,
and shift content to left by number of bits
specified in VAR04. Then convert 32-bit value
back to format of variable VAR02.
END_PRESS
4.2 Methods
Overview
Various types of event (exit input field, actuate softkey) can initiate specific actions in dialogs
and dialog-dependent softkey menus (softkey menus that are called from a newly configured
dialog). These actions are configured in methods.
The following table shows the basic principle used to program a method:
4.2.1 CHANGE
Description
CHANGE methods are executed if a variable value changes, i.e., variable calculations that
are performed as soon as a variable value changes are configured within a CHANGE
method.
There are two types of CHANGE method, i.e., element-specific and global:
● The element-specific CHANGE method is executed if the value of a specified variable
changes. If a system or user variable is assigned to a variable, cyclic updating of the
variable value can be configured in a CHANGE method.
● The global CHANGE method is executed if the value of any variable changes and no
element-specific CHANGE method has been configured.
"Element-specific" programming
Syntax: CHANGE(Identifier)
...
END_CHANGE
Description: Changes the value of a specific variable
Parameters: Identifier Name of the variable
Example
"Global" programming
Syntax: CHANGE()
...
END_CHANGE
Description: Changes any variable value
Parameters: - None -
Example
CHANGE()
EXIT ; If any of the variable values change, the dialog will
be terminated.
END_CHANGE
4.2.2 FOCUS
Description
The FOCUS method is executed if the focus (cursor) is positioned on another field in the
dialog.
The FOCUS method must not be initiated as a result of a navigation event. The cursor may
only be moved in softkey PRESS blocks, CHANGE blocks, etc. Responses to cursor
movements are are predefined and cannot be modified.
Note
Within the FOCUS block, it is not possible to select a different variable, nor can a new dialog
be loaded.
Programming
Syntax: FOCUS
...
END_FOCUS
Description: Positions the cursor
Parameters: - None -
Example
FOCUS
DLGL("The focus has been placed on variable" << FOC << ".) º º
END_FOCUS
4.2.3 LOAD
Description
The LOAD method is executed after the variable and softkey definitions (DEF Var1= ...,
HS1= ...) have been interpreted. At this time, the dialog is not yet displayed.
Programming
Syntax: LOAD
...
END_LOAD
Description: Download
Parameters: - None -
Example
See also
Line and rectangle (Page 137)
Description
The table description can be made available dynamically within the LOAD block using the
LG method.
In order to assign a table using the LG method, the variable must have already been defined
as a grid variable and cross-referenced to an existing, valid table.
Programming
4.2.5 UNLOAD
Description
The UNLOAD method is executed before a dialog is unloaded.
Programming
Syntax: UNLOAD
...
END_UNLOAD
Description: Unload
Parameters: - None -
Example
UNLOAD
REG[1] = VAR1 ; Save variable in register
END_UNLOAD
4.2.6 OUTPUT
Description
The OUTPUT method is executed if the "GC" function is called.Variables and Help variables
are configured as an NC code in an OUTPUT method. The individual elements in a code line
are linked by means of blanks.
Note
The NC code can be generated in an extra file by means of file functions and transferred to
the NC.
Programming
Condition Response
Number of blocks remains unchanged. Block numbers are retained.
Number of blocks is reduced. The highest block numbers are canceled.
Number of blocks is increased. New blocks are not numbered.
Example
OUTPUT(CODE1)
"CYCLE82(" Var1.val "," Var2.val "," Var3.val ","Var4.val "," Var5.val
"," Var6.val ")"
END_OUTPUT
4.2.7 PRESS
Description
The PRESS method is executed when the corresponding softkey is pressed.
Programming
Syntax: PRESS(softkey)
...
END_PRESS
Identifiers: Pressing a softkey
Parameters: Softkey Name of softkey: HS1 - HS8 and VS1 - VS8
RECALL <RECALL> key
PU Page Up Screen up
PD Page Down Screen down
SL Scroll left Cursor left
SR Scroll right Cursor right
SU Scroll up Cursor up
SD Scroll down Cursor down
Example
Overview
Additional variables can be added to existing dialogs when expanding the user interface. A
version identifier in parentheses is appended to the additional variables in the definition
following the variable name: (0 = Original, is not written), 1 = Version 1, 2 = Version 2, etc.
Example
When writing the OUTPUT block, you can specify which variables are written, with reference
to a particular version identifier.
Example
The OUTPUT block for the original version does not need a version identifier, however you
can specify it with 0. OUTPUT(NC1) is equivalent to OUTPUT(NC1,0). Version identifier n in
the OUTPUT block includes all variables of the originals 0, 1, 2, ... up to and including n.
OUTPUT(NC1)
var100",,"var101
END_OUTPUT
OUTPUT(NC1,1) ; Version 1
var100","var101"," var102
END_OUTPUT
4.3 Functions
Overview
A variety of functions are available in dialogs and dialog-dependent softkey menus. These
can be activated by specific events (exit input field, actuate softkey) and configured in
methods.
Subroutines
Repeatedly used configuring instructions or others, which define the process for a particular
operation can be configured in subprograms. Subprograms can be loaded into the main
program or other subprograms at any time and executed as often as necessary, i.e., the
instructions they contain do not need to be configured repeatedly. The definition blocks of
the dialogs/softkey menu constitute a main program.
External functions
Additional, user-specific functions can be integrated by means of external functions. The
external functions are stored in a DLL file and identified by an entry in the definition lines of
the configuration file.
PI services
The PI_SERVICE function can be used to start PI Services (Program Invocation Services)
from the PLC in the NC area.
See also
Function (FCT) (Page 104)
PI services (Page 134)
Description
In the program file, subprograms are identified by the block identifier //B and terminated with
//END. Several subprograms can be defined under each block identifier.
Note
The variables used in the subprogram must be defined in the dialog in which the subprogram
is called.
Programming
A block is structured in the following way:
Example
Description
The CALL function can be used to call a loaded subprogram from any point in a method.
Subprogram nesting is supported, i.e., you can call a subprogram from another subprogram.
Programming
Syntax: CALL("Identifier")
Description: Subroutine call
Parameters: Identifier Name of subprogram
Example
//M(SCREEN FORM1)
VAR1 = ...
VAR2 = ...
LOAD
...
LB("PROG1") ; Load block
...
END_LOAD
CHANGE()
...
CALL("UP1") ; Call subroutine and execute
...
END_CHANGE
...
//END
Description
You can use the CVAR (CheckVariable) function to run a scan to ascertain whether all or
only certain variables or Help variables in a screen form are error-free.
It may be useful to check if variables contain a valid value before an NC code with the GC
function.
A variable is error-free if the state of the variable Identifier.vld = 1.
Programming
Syntax: CVAR(VarN)
Description: Checks variables for valid content
Parameters: VarN List of variables to be checked.
Up to 29 variables, each separated by a comma, can
be checked. A character length of 500 must not be
exceeded.
The result of the scan can be:
1 =TRUE (all variables have valid content)
0 =FALSE (at least one variable has invalid content)
Example
IF CVAR(”VAR1”, ”VAR2”) ==
TRUE
; Check variables VAR1 and VAR2
DLGL ("VAR1 and VAR2 are
OK")
; If the values of VAR1 and VAR2 are error-free,
"VAR1 and VAR2 are OK" appears in the dialog line
ELSE
DLGL ("VAR1 and VAR2 are not OK")
; If the values of VAR1 and VAR2 are invalid, "VAR1
and VAR2 are not OK" appears in the dialog line
ENDIF
Description
The CP (Copy Program) function copies files within the HMI file system or within the NC file
system.
Programming
Example
Application with return value:
CP("//NC/MPF.DIR/HOHO.MPF","//NC/MPF.DIR/ASLAN.MPF",VAR3)
CP("//NC/MPF.DIR/hoho.MPF",VAR0,VAR3)
CP(VAR4,VAR0,VAR3)
CP("CF_CARD:/mpf.dir/myprog.mdf","//NC/MPF.DIR/HOHO.MPF",VAR3)
CP("//NC/MPF.DIR/HOHO.MPF", ; xyz must exist
"CF_CARD:/xyz/123.pmf",VAR3)
CP("//NC/MPF.DIR/HOHO.MPF","//NC/MPF.DIR/ASLAN.MPF")
CP("//NC/MPF.DIR/hoho.MPF",VAR0)
CP(VAR4,VAR0)
CP("CF_CARD:/mpf.dir/myprog.mdf","//NC/MPF.DIR/HOHO.MPF")
CP("//NC/MPF.DIR/HOHO.MPF", ; xyz must exist
"CF_CARD:/xyz/123.mpf")
See also
Support of FILE_ERR: FILE_ERR variable (Page 69)
Description
The DP (Delete Program) function deletes a file from the passive HMI or active NC file
system.
Programming
Syntax: DP("File")
Description: Delete file
Parameters: File Complete path name of file to be deleted
Example
The following data management syntax is used for this function:
DP("\MPF.DIR\CFI.MPF")
Description
The EP (Exist Program) function checks whether a particular NC program is stored on the
specified path in the NC or HMI file system.
Programming
Syntax: EP("File")
Description: Checks the existence of the NC program
Parameters: File Complete path to the file in the NC or HMI file system
Return Value: Name of a variable to which the result of the scan should be assigned.
The result of the scan can be:
M = File is stored on HMI
N = file is stored on NC
Blank string = The file neither exists on the HMI nor on
the NC
The EP function can handle the new syntax and the old logic (with adapted Syntax).
The file is directly addressed using a qualifying name:
//NC/MPF.DIR/XYZ.DIR
or
CF_CARD: /MPF.DIR/XYZ.DIR
or
LOC: /MPF.DIR/XYZ.DIR
New syntax:
Old syntax:
EP("/MPF.DIR/CFI.MPF", VAR1)
;with return value:
; VAR1 = M File is located in the HMI file system.
; VAR1 = N File is located in the NC file system.
; VAR1 = B File is located in the HMI and NC file system.
Example
Description
The MP (Move Program) function copies files within the HMI file system or within the NC file
system.
Programming
Examples
Description
The SP (Select Program) function selects a file in the active NC file system for execution,
i.e., the file must be loaded into the NC beforehand.
Programming
Syntax: SP("File")
Identifiers: Selecting a program
Parameters: "File" Complete path name of NC file
Example
The following data management syntax is used for this function:
//M(TestGC/"Code generation:")
DEF VAR1 = (R//1)
DEF VAR2 = (R//2)
DEF D_NAME
LOAD
VAR1 = 123
VAR2 = -6
END_LOAD
OUTPUT(CODE1)
"Cycle123(" VAR1 "," VAR2 ")"
"M30"
END_OUTPUT
PRESS(VS1)
D_NAME = "CF_CARD:/MPF.DIR/MESSEN.MPF"
GC("CODE1",D_NAME) ;Write code from the OUTPUT method to file
CF_CARD:/MPF.DIR/MESSEN.MPF
END_PRESS
PRESS(HS8)
MP("CF_CARD:/MPF.DIR/MESSEN.MPF","//NC/MPF.DIR") ;Load file into NC
SP("\MPF.DIR\MESSEN.MPF") ;Select file
END_PRESS
Description
It is possible to configure short texts (messages or input tips) for output in the dialog line of
the dialog in response to certain situations.
Possible number of characters in the default font size: approx. 50
Programming
Syntax: DLGL("String")
Description: Outputs text in the dialog line
Parameters: String Text, which is displayed in the dialog line
Example
Description
The EVAL function evaluates a transferred expression and then executes it. With this
function, expressions can be programmed during runtime. This can be useful, for example,
for indexed access operations to variables.
Programming
Syntax: EVAL(exp)
Description: Evaluates an expression
Parameters: exp Logic expression
Example
VAR1=(S)
VAR2=(S)
VAR3=(S)
VAR4=(S)
CHANGE()
REG[7] = EVAL("VAR"<<REG[5]) ; The expression in parentheses produces
VAR3 if the value of REG[5] is equal to 3.
The value of VAR3 is, therefore, assigned
to REG[7].
IF REG[5] == 1
REG[7] = VAR1
ELSE
IF REG[5] == 2
REG[7] = VAR2
ELSE
IF REG[5] == 3
REG[7] = VAR3
ELSE
IF REG[5] == 4
REG[7] = VAR4
ENDIF
ENDIF
ENDIF
ENDIF
END_CHANGE
Description
The EXIT function is used to exit a dialog and return to the master dialog. If no master dialog
is found, you will exit the newly configured user interfaces and return to the standard
application.
Syntax: EXIT
Description: Exits a dialog
Parameters: - None -
Example
PRESS(HS1)
EXIT
END_PRESS
Description
If the current dialog has been called with a transfer variable, the value of the variables can
be changed and transferred to the output dialog.
The variable values are each assigned to the variables transferred from the output dialog to
the subsequent dialog using the "LM" function. Up to 20 variable values, each separated by
a comma, can be transferred.
Note
The sequence of variables or variable values must be the same as the sequence of transfer
values programmed for the LM function to preclude assignment errors. Any unspecified
variable values will not be changed when the transfer is made. The modified transfer
variables are immediately valid in the output dialog on execution of the LM function.
Syntax: EXIT[(VARx)]
Description: Exits dialog and transfers one or more variables
Parameters: VARx Label variables
Example
//M(Screen form1)
...
PRESS(HS1)
LM("SCREEN FORM2","CFI.COM",1, POSX, POSY, DIAMETER)
; Interrupt screen form1 and open screen form2.
Transfer variables POSX, POSY and DIAMETER in
doing this.
DLGL("Screen form2 ended") ; On returning from screen form2, the following
text appears in the dialog line of screen form
1: Screen form2 ended.
END_PRESS
...
//END
//M(Screen form2)
...
PRESS(HS1)
EXIT(5, , CALCULATED_DIAMETER)
; Exit screen form2 and return to screen form1 in
the line after LM. In doing this, assign the
value 5 to the variable POSX and the value of
the CALCULATED_DIAMETER variable to the DIAMETER
variable. The variable POSY retains its current
value.
END_PRESS
...
//END
Description
You can use the EXITLS function to exit the current user interface and load a defined softkey
menu.
Programming
Example
PRESS(HS1)
EXITLS( "Menu1", "AEDITOR.COM" )
END_PRESS
Description
The external functions are stored in a DLL file and identified by an entry in the definition lines
of the configuration file.
Note
The external function must have at least one return parameter.
Programming
The external function can e.g. be called in the LOAD block or in the PRESS block.
Example:
press(vs4)
RET = InitConnection(VAR1,13,"Servus",VAR2,VAR17)
end_press
union CFI_VARIANT
(
char b;
short int i;
double r;
char* s;
)
typedef struct ExtFctStructTag
(
char cTyp;
union CFI_VARIANT value;
)ExtFctStruct;
typedef struct ExtFct* ExtFctStructPtr;
#ifdef Q_WS_WIN
#define MY_EXPORT __declspec(dllexport)
#else
#define MY_EXPORT
#endif
If the screens, configured with Easy Screen, are used on the NCU and PCU/PC, then the
extension of the binary file must be omitted:
FCT InitConnection = ("xyz"/I/R,I,S/I,S)
When the absolute path information is omitted, Easy Screen first searches for the binary file
in the proj directory.
Description
The GC (Generate Code) function generates NC code from the OUTPUT method.
Programming
Example
//M(TestGC/"Code generation:")
DEF VAR1 = (R//1)
DEF VAR2 = (R//2)
DEF D_NAME
LOAD
VAR1 = 123
VAR2 = -6
END_LOAD
OUTPUT(CODE1)
"Cycle123(" VAR1 "," VAR2 ")"
"M30"
END_OUTPUT
PRESS(VS1)
D_NAME = "\MPF.DIR\MESSEN.MPF"
GC("CODE1",D_NAME) ;Write code from OUTPUT method to file
\MPF.DIR\MESSEN.MPF:
Cycle123(123, -6)
M30
END_PRESS
Recompile
● No entry for target file:
The GC function can only be used in the Programming Support system and writes the NC
code to the file currently open in the Editor. Recompilation of the NC code is possible. If
the GC function is configured without a target file being specified under "Easy Screen", an
error message is output when it is executed.
● Entry for target file:
The code generated from the OUTPUT block is transferred to the target file. If the target
file does not already exist, it is set up in the NC file system. If the target file is stored in
the HMI file system, it is stored on the hard disk. User comment lines (information
required to recompile code) are not set up, i.e. the code cannot be recompiled.
Note
Invalid variables generate a blank string in generated NC code and an error message in
the log book when they are read.
See also
Recompile (Page 124)
Description
The LA (Load Array) function can be used to load an array from another file.
Programming
Note
If an array in the current configuration file must be replaced by an array from another
configuration file, then both arrays must have the same name.
Example
Note
Please note that a valid value must be assigned to a variable after the LA function has been
used to assign another array to the toggle field of the variable.
Description
The LB (Load Block) function can be used to load blocks containing subprograms during
runtime. LB should be configured in a LOAD method so that the loaded subprograms can be
called at any time.
Note
Subprograms can also be defined directly in a dialog so that they do not have to be loaded.
Programming
Example
LOAD
LB("PROG1") ; Block "PROG1" is searched for in the current
configuration file and then loaded.
LB("PROG2","XY.COM") ; Block "PROG2" is searched for in the
configuration file XY.COM and then loaded.
END_LOAD
Description
The LM function can be used to load a new dialog.
Master dialog/Sub-dialog
A dialog, which calls another dialog, but is not ended itself, is referred to as a master dialog.
A dialog that is called by a master dialog is referred to as a sub-dialog.
Programming
Note
Parameter VARx transfers only the value of the variable in each case, i.e., variables can be
read and written in the sub-dialog, but are not visible in it. Variables can be returned from the
sub-dialog to the master dialog by means of the EXIT function.
Example
PRESS(HS1)
LM("SCREEN FORM2","CFI.COM",1, POSX, POSY, DIAMETER)
; Interrupt screen form1 and open screen form2:
Variables POSX, POSY and DIAMETER are transferred
in doing this.
DLGL("Screen form2 ended") ; On returning from screen form2, the following text
appears in the dialog line of screen form 1:
Screen form2 ended.
END_PRESS
Description
The LS function can be used to display another softkey menu.
Programming
Example
PRESS(HS4)
LS("Menu2",,0) ; Menu2 overwrites the existing softkey menu, the
softkeys that are displayed are deleted.
END_PRESS
NOTICE
As long as the interpreter has not displayed a dialog, i.e., no LM function has yet been
processed, only one LS or one LM command, but no other action, can be configured in the
PRESS method of the definition block for the start softkey and the softkey menu.
The LS and LM functions may only be called within a softkey PRESS block and will not
react if navigation keys are pressed (PU, PD, SL, SR, SU, SD).
Description
The RNP (Read NC PLC) command can be used to read NC or PLC variables or machine
data.
Programming
Example
Description
The WNP (Write NC PLC) command can be used to write NC or PLC variables or machine
data.
NC/PLC variables are accessed anew every time the WNP function is executed, i.e.,
NC/PLC access is always executed in a CHANGE method. It is advisable to use this option
in cases where a system or user variable changes value frequently. If an NC/PLC variable is
to be accessed only once, then it must be configured in a LOAD or UNLOAD method.
Programming
Example
Description
This MRNP command can be used to transfer several system or OPI variables in a single
register access. This access method is significantly faster than reading via individual access
attempts. The system or OPI variables must be included within an MRNP command of the
same area.
The areas of the system or OPI variables are organized as follows:
● General NC data ($MN..., $SN.., /nck/...)
● Channel-specific NC data ($MC..., $SC.., /channel/...)
● PLC data (DB..., MB.., /plc/...)
● Axis-specific NC data on the same axis ($MA..., $SA..)
Programming
NOTICE
It should be noted that the number of registers is restricted and the list of variables cannot
exceed 500 characters.
Example
Note
User variables may not have the same names as system or PLC variables.
NC variable
All machine data, setting data and R parameters are available, but only certain system
variables (see also: List of accessible system variables (Page 173)).
All global and channel-specific user variables (GUDs) can be accessed. However, local and
program-global user variables cannot be processed.
Machine data
Global machine data $MN_...
Axis-specific machine data $MA_...
Channel-specific machine data $MC_...
Setting data
Global setting data $SN_...
Axis-specific setting data $SA_...
Channel-specific setting data $SC_...
System variables
R parameter 1 $R[1]
PLC variable
All PLC data are available.
PLC data
Byte y bit z of data block x DBx.DBXy.z
Byte y of data block x DBx.DBBy
Word y of data block x DBx.DBWy
Double word y v. of data block x DBx.DBDy
Real y of data block x DBx.DBRy
Flag byte x bit y Mx.y
Flag byte x MBx
Flag word x MWx
Flag double word x MDx
Input byte x bit y Ix.y or Ex.y
Input byte x IBx or EBx
Input word x IWx or EWx
Input double word x IDx or EDx
Output byte x bit y Qx.y or Ax.y
Output byte x QBx or ABx
Output word x QWx or AWx
Output double word x QDx or ADx
String y with length z from data block x DBx.DBSy.z
Register description
Registers are needed in order to exchange data between different dialogs. Registers are
assigned to each dialog. These are created when the first dialog is loaded and assigned the
value 0 or a blank string.
Note
Registers may not be used directly in OUTPUT blocks for generating NC code.
Programming
Syntax: REG[x]
Description: Defines register
Parameters: x Register index with x = 0...19;
Type: REAL or STRING = VARIANT
Registers with x ≥ 20 have already been assigned by Siemens.
Note
If a new dialog is generated from an existing dialog by means of the LM function, register
content is automatically transferred to the new dialog at the same time and is available for
further calculations in the second dialog.
Programming
Example
UNLOAD
REG[0] = VAR1 ; Assign value of variable 1 to register 0
END_UNLOAD
UNLOAD
REG[9].VAL = 84 ; Assign value 84 to register 9
END_UNLOAD
; These registers can then be assigned to local
variables again in a method in the next
dialog.
LOAD
VAR2 = REG[0]
END_LOAD
Programming
Syntax: Identifier.vld
Description: Status is a read-only property.
Parameters: Identifier Name of register
Return Value: The result of the scan can be:
FALSE =invalid value
TRUE =valid value
Example
4.3.22 RETURN
Description
The RETURN function can be used to prematurely terminate execution of the current
subprogram and to return to the branch point of the last CALL command.
If no RETURN command is configured in the subprogram, the subprogram will run to the end
before returning to the branch point.
Programming
Syntax: RETURN
Description: Returns to the branch point
Parameters: - None -
Example
4.3.23 Recompile
Description
In the programming support system, it is possible to recompile NC code that has been
generated with the GC function and to display the variable values in the input/output field of
the associated entry dialog again.
Programming
Variables from the NC code are transferred to the dialog. At the same time, the variable
values from the NC code are compared with the calculated variable values from the
configuration file. If the values do not coincide, an error message is written to the log book
because values have been changed during NC code generation.
If the NC code contains the same variable several times, it is evaluated at the point where it
last occurs during recompilation. A warning is also written to the log book.
Variables not utilized in NC code during code generation are stored as user comment. The
term "user comment" refers to all information required to recompile codes. User comment
must not be altered.
Note
The block consisting of NC code and user comment can be recompiled only if it starts at the
beginning of a line.
Examples:
The programm contains the following NC code:
DEF VAR1=(I//101)
OUTPUT(CODE1)
"X" VAR1 " Y200"
"X" VAR1 " Y0"
END_OUTPUT
;NCG#TestGC#\cus.dir\aeditor.com#CODE1#1#3#
X101 Y200
X101 Y0
;#END#
X101 Y200
X222 Y0 ; The value for X has been changed in the parts program
(X101 → X222)
The following value is displayed for VAR1 in the input dialog: VAR1 = 222
See also
Generate code (GC) (Page 107)
Description
In the programming support system, it is possible to recompile without comments the NC
code that has been generated with the GC function and to display the variable values in the
input/output field of the associated entry dialog again.
Programming
The GC command can be executed in the following way in order to suppress comment lines
that are generated for standard code generation:
GC("CODE1",D_NAME,1)
Normally, the resulting code cannot be recompiled. The following steps are required in order
to be able to recompile the cycle calls generated in this way:
● Expanding the easyscreen.ini
Section [RECOMPILE_INFO_FILES] will be introduced into the easyscreen.ini file. In this
section, all ini files are listed that contain descriptions for cycles recompiled without
comment:
[RECOMPILE_INFO_FILES]
IniFile01 = cycles1.ini
IniFile02 = cycles2.ini
Several ini files can be specified, whose names can be freely selected.
● Creating an ini file for a cycle description
The ini file with the cycle descriptions is stored under /user or /oem in the directory
/sinumerik/hmi/cfg. A separate section is required for each cycle. The section name
corresponds to the name of the cycle:
[Cycle123]
Mname = TestGC
Dname = testgc.com
OUTPUT = Code1
Anzp = 3
Version = 0
Code_type = 1
Icon = cycle123.png
Example
//M(TestGC/"Code generation:")
DEF VAR1 = (R//1)
DEF VAR2 = (R//2)
DEF D_NAME
LOAD
VAR1 = 123
VAR2 = -6
END_LOAD
OUTPUT(CODE1)
"Cycle123(" VAR1 "," VAR2 ")"
"M30"
END_OUTPUT
PRESS(VS1)
D_NAME = "\MPF.DIR\MESSEN.MPF"
GC("CODE1",D_NAME) ;Write code from OUTPUT method to file
\MPF.DIR\MESSEN.MPF:
Cycle123(123, -6)
M30
END_PRESS
See also
Generate code (GC) (Page 107)
Description
The SF, SB (Search Forward, Search Backward) function is used to search for a string from
the current cursor position in the NC program currently selected in the Editor and to output
its value.
Programming
Syntax: SF("String")
Identifiers: Search Forward: Search forward from the current cursor position
Syntax: SB("String")
Identifiers: Search Backward: Search backward from the current cursor position
Parameters: String Text to be found
Example
The following notations are possible:
Overview
The following functions enable strings to be processed:
● Determine length of string
● Find a character in a string
● Extract substring from left
● Extract substring from right
● Extract substring from mid-string
● Replace substring
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HALLO"
VAR02=LEN(VAR01) ; Result = 5
END_LOAD
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=INST(1,"/",VAR01) ; Result = 6
END_LOAD
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=LEFT(VAR01,5) ; Result = "HELLO"
END_LOAD
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=LEFT(VAR01,4) ; Result = "WORLD"
END_LOAD
Example
DEF VAR01
DEF VAR02
LOAD
VAR01="HELLO/WORLD"
VAR02=LEFT(VAR01,4,4) ; Result = "LO/W"
END_LOAD
See also
Use of strings (Page 63)
4.3.27 PI services
Description
The PI_SERVICE function can be used to start PI Services (Program Invocation Services)
from the PLC in the NC area.
General programming
Example
PRESS (HS2)
PI_SERVICE("_N_CREATO",55)
END_PRESS
PRESS(VS4)
PI_SERVICE("_N_CRCEDN",17,3)
END_PRESS
Programming
Example
PI_START("/NC,001,_N_LOGOUT")
Note
Channel-dependent PI Services always refer to the current channel.
PI services of the tool functions (TO area) always refer to the TO area that is assigned to the
current channel.
Description
Lines and rectangles are configured in the LOAD block:
● Lines are first drawn, then the rectangles and finally the configured control fields or
graphics.
● Transparent rectangles are created by setting the fill color to the system background
color.
LINE element
Programming:
RECT element
Programming:
See also
LOAD (Page 81)
Definition
An array can be used to organize data of the same data type stored in the memory in such a
way that it is possible to access the data via an index.
Description
Arrays can be one- or two-dimensional. A one-dimensional array is treated like a two-
dimensional array with just one line or column.
Arrays have start identifier //A and end identifier //END. The number of lines and columns is
optional. An array is structured in the following way:
Programming
Syntax: //A(Identifier)
(a/b...)
(c/d...)
...
//END
Description: Defines array
Parameters: Identifier Name of array
a, b, c, d Values of array
Values of the STRING type must be enclosed in double
quotation marks.
Example
Description
The value of an array access operation can be transferred with property Value (identifier.val).
The line index (line number of the array) and the column index (column number of the array)
each begin at 0. If a line index or column index is outside the array, the value 0 or a blank
string is output and the ERR variable is set to TRUE. The ERR variable is also set to TRUE if
a search concept cannot be found.
Programming
Access mode
● "Direct" access mode
With "Direct" access mode (M = 0), the array is accessed with the line index in Z and the
column index in S. Compare mode C is not evaluated.
● "Search" access mode
In the case of access mode M = 1, 2 or 3, the search always commences in line 0 or
column 0.
Compare mode
When compare mode C = 0 is used, the content of the search line or search column must be
sorted in ascending order. If the search concept is smaller than the first element or larger
than the last, the value 0 or a blank string is output and the error variable ERR is set to
TRUE.
When compare mode C = 1 is used, the search concept must be found in the search line or
search column. If the search concept cannot be found, the value 0 or an empty string is
output and the error variable ERR is set to TRUE.
Prerequisite
Two arrays are defined below. These are the basis for the following examples:
//A(Thread)
(0.3 / 0.075 / 0.202)
(0.4 / 0.1 / 0.270)
(0.5 / 0.125 / 0.338)
(0.6 / 0.15 / 0.406)
(0.8 / 0.2 / 0.540)
(1.0 / 0.25 / 0.676)
(1.2 / 0.25 / 0.676)
(1.4 / 0.3 / 1.010)
(1.7 / 0.35 / 1.246)
//END
//A(Array2)
("DES" / "PTCH" / "CDM" )
(0.3 / 0.075 / 0.202 )
(0.4 / 0.1 / 0.270 )
(0.5 / 0.125 / 0.338 )
(0.6 / 0.15 / 0.406 )
(0.8 / 0.2 / 0.540 )
(1.0 / 0.25 / 0.676 )
(1.2 / 0.25 / 0.676 )
(1.4 / 0.3 / 1.010 )
(1.7 / 0.35 / 1.246 )
//END
Examples
● Access mode example 1:
The search concept is in Z. This key is always sought in column 0. The value from
column S is output with the line index of the concept found.
VAR1 = Thread[0.5,1,1] ;VAR1 has the value 0.125
Explanation:
Search for value 0.5 in column 0 of "Thread" array and output the value found in column 1
of the same line.
● Access mode example 2:
The search concept is in S. This concept is always searched for in line 0. The value from
line Z is output with the column index of the concept found:
VAR1 = ARRAY2[3,"PTCH",2] ;VAR1 has the value 0.125
Explanation:
Search for column containing "PTCH" in line 0 of array "Array2". Output the value from
the column found and the line with index 3.
● Access mode example 3:
A search concept is in each of Z and S. The line index is searched for in column 0 with
the concept in Z and the column index in line 0 with the concept in S. The value from the
array is output with the line index and column index found:
VAR1 = ARRAY2[0.6,"PTCH",3] ;VAR1 has the value 0.15
Explanation:
Search for the line with the content 0.6 in column 0 of array "Array2", search for the
column with the content "STG" in line 0 of Array2. Transfer the value from the line and
column found to VAR1.
● Access mode example 4:
The search concept is in Z. S contains the column index of the column in which concept
is being searched for. The line index of the concept found is output:
VAR1 = Thread[0.125,1,4] ;VAR1 has the value 2
Explanation:
Search for value 0.125 in column 1 of array "Thread" and transfer the line index of the
value found to VAR1.
● Access mode example 5:
Z contains the line index of line in which concept is being searched for. The search
concept is in S. The column index of the concept found is output:
VAR1 = Thread[4,0.2,5,1] ;VAR1 has the value 1
Explanation:
Search in line 4 of the "Thread" array for the value 0.2 and transfer the column index of
the value found to VAR1. Comparison mode 1 was selected because the values of line 4
are not sorted in ascending order.
Description
The Status property can be used to run a scan to find out whether an array access operation
is supplying a valid value.
Programming
Example
Definition
In contrast to the array, the values of a table grid (grid) are continually updated. This involves
a tabular representation of the values of system variables that can be addressed using one
block in one channel.
Assignment
A variables definition is assigned to the table-elements definition via a table identifier:
● The variables definition determines the values to be displayed and the definition of table
elements determines the appearance and arrangement on the screen window. The table
grid takes the properties of the IO fields from the variables definition line.
● The visible area of the grid is determined by the width and height of the I/O field. Any
lines or columns than cannot be seen can be displayed by scrolling horizontally and
vertically.
Table identifiers
Identifiers of a table containing NCK/PLC values of the same type, which can be addressed
via a channel block. The table identifier is differentiated from limits or toggle fields by the
addition of a % sign in front of it. The file containing the table description can be specified by
adding a comma after the identifier and then inserting the name of the file.
Description
The variables definition will contain a reference to a table description:
See also
Variable parameters (Page 52)
Description
The table block comprises:
● Header
● 1 to n column descriptions
Programming
Description
For table grids, it is advisable to use variables with an index. For PLC or NC variables, the
index number with one or more indices is of significance.
The values displayed in a grid can be modified directly by the end user within the restrictions
of the rights granted by the attributes and within any defined limits.
Programming
The column definition for the CHAN variable, therefore, starts, e.g. (S16/... ).
Description
The Row and Col properties can be used to set and calculate the focus within a table:
● Identifier.Row
● Identifier.Col
Programming
Each cell in a table has the Val and Vld properties.
In order to read and write cell properties, a line and column index must be specified in
addition to the variable identifiers from the definition list.
Example
Var1[2,3].val=1.203
If the line and column indices are not specified, the indices of the focused cell apply. This
corresponds to:
Var1.Row =2
Var1.Col=3
Var1.val=1.203
Description
User-specific display elements are configured in the dialog using a custom widget.
Software option
In order to use custom widgets in dialog boxes, you require the following software
options:
"SINUMERIK HMI sl Runtime OA programming"
"SINUMERIK HMI sl Runtime OA Easy Screen"
Programming
Definition: DEF(name)
Syntax: (W///"","(library name).(class name)"/////a,b,c,d);
Description: W Defining custom widgets
Parameters: Name Custom widget name, freely selectable
Library name Can be freely selected, name of the dll (Windows)
or (Linux) library file
Class name Freely selectable, name of the class function from
the previously named library
a, b, c, d Position and size of the configuration
Example
A custom widget is defined in the dialog configuration in the following way:
DEF Cus = (W///"","slestestcustomwidget.SlEsTestCustomWidget"/////20,20,250,100);
Description
Essentially, the custom widget library contains a defined class. The name of this class must
be specified in the dialog configuration in addition to the library names. Starting from library
names, Easy Screen accesses a dll file file with the same name, e.g. :
slestestcustomwidget.dll
Programming
The class definition of the dll file should look like this:
Description
The library is supplemented by an interface in order to display the custom widget in the
dialog. This contains macro definitions with which Easy Screen initiates the custom widget.
The interface is available in the form of a cpp file. The file name can be freely selected, e.g.:
sleswidgetfactory.cpp
Programming
The interface is defined as follows:
Example
Content of the file sleswidgetfactory.cpp for a custom widget with the class name
SlEsTestCustomWidget":
#include <Qt/qglobal.h>
#include "slestestcustomwidget.h"
///////////////////////////////////////////////////////////////////////////
// MAKROS FOR PLUGIN DLL-EXPORT - DO NOT CHANGE
///////////////////////////////////////////////////////////////////////////
#ifndef Q_EXTERN_C
#ifdef __cplusplus
#define Q_EXTERN_C extern "C"
#else
#define Q_EXTERN_C extern
#endif
#endif
#ifdef Q_WS_WIN
# ifdef Q_CC_BOR
# define EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(PLUGIN,PARAM) \
Q_EXTERN_C __declspec(dllexport) void* \
__stdcall SL_ES_FCT_NAME(PLUGIN) (QWidget* pParent) \
SL_ES_CUSTOM_WIDGET_PLUGIN_INSTANTIATE( PLUGIN,PARAM )
# else
# define EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(PLUGIN,PARAM) \
Q_EXTERN_C __declspec(dllexport) void* SL_ES_FCT_NAME(PLUGIN) \
(QWidget* pParent) \
SL_ES_CUSTOM_WIDGET_PLUGIN_INSTANTIATE( PLUGIN,PARAM )
# endif
#else
# define EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(PLUGIN,PARAM) \
Q_EXTERN_C void* SL_ES_FCT_NAME(PLUGIN) (QWidget* pParent) \
SL_ES_CUSTOM_WIDGET_PLUGIN_INSTANTIATE( PLUGIN,PARAM )
#endif
#define WIDGET_CLASS_EXPORT(CLASSNAME) \
EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(CLASSNAME,CLASSNAME(pParent))
///////////////////////////////////////////////////////////////////////////
// FOR OEM USER - please declare here your widget classes for export
///////////////////////////////////////////////////////////////////////////
WIDGET_CLASS_EXPORT(SlEsTestCustomWidget)
Description
Custom widgets interact with dialog boxes and can display values or manipulate them. Data
is therefore exchanged for the following conditions:
Condition Direction
When starting or recompiling a dialog Dialog → custom widget
When executing the GC command for generating cycle calls Custom widget → Dialog
Programming
The following definitions are necessary for the interaction:
Expansion of the dialog configuration
Example
DEF CUSVAR1 = (R//5/"","CUSVAR1",""/wr2/)
Example
The class definition of the dll file should look like this:
[Custom]
Visible=True
Result
After activation is complete, the softkey for the "Custom" operating area can be found in the
main menu (F10) on the menu continuation bar on the HSK4 (= default).
The "Custom" operating area displays an empty window covering the entire operating area,
with a configurable header. All horizontal and vertical softkeys can be configured.
TextId=MY_TEXT_ID
TextFile=mytextfile
TextContext=mycontext
In this example, the softkey shows the language-dependent text which was saved with
the text ID "MY_TEXT_ID" in text file mytextfile_xxx.qm under "MyContext" (xxx stands for
language code).
2. To replace a softkey label with a language-neutral text, the following must be entered in
the [Custom] section:
TextId=HELLO
TextFile=<empty>
TextContext=<empty>
In this example, the softkey for the "Custom" operating area displays the text "HELLO" for
every language.
Picture=mypicture.png
The softkey then displays the icon from the file mypicture.png. Graphics and bitmaps are
stored at the following path: /oem/sinumerik/hmi/ico/ico<Resolution>. The directory that
corresponds to the display resolution must be used.
4. The position of the softkey can also be set. The following entry in the [Custom] section
can be used to make this setting:
SoftkeyPosition=12
The default is position 12. This corresponds to the HSK4 on the menu continuation bar of
the operating area's menu. Positions 1 - 8 correspond to HSK1 to HSK8 on the menu bar,
positions 9 - 16 to HSK1 to HSK8 on the menu continuation bar.
The ";" at the start of the line represents the comment character. This means the line is
commented out and, as such, not active. To change this, the ";" must be deleted.
The "startfile" attribute in this line is used to define that the entry will refer to the
custom.com project file when the "Custom" operating area is selected.
3. You create the custom.com project file in the /oem/sinumerik/hmi/proj directory. This
contains the relevant configuration, which is created in the same way as the aeditor.com
file of the "Program" operating area. The configured start softkeys are then displayed in
the "Custom" operating area.
4. You configure the language-neutral text for the title bar of the dialog in the custom.ini file.
The following entry is available in the template for this purpose:
[Header]Text=Custom
[Picture]Picture=logo.png
Logo.png is the name of the start screen which appears on the "Custom" operating area's
start dialog. Here you can display a company logo, for example, or another image. The
file should be saved in the directory for the corresponding resolution under:
/oem/sinumerik/hmi/ico/ …
File overview
The following files are required:
● custom.ini
● easyscreen.ini
Programming
Content of the custom.com file:
//S(Start)
HS7=("Start example", se1, ac7)
PRESS(HS7)
LM("Maske4")
END_PRESS
//END
//M(Maske4/"Example: MCP"/"mcp.png")
DEF byte=(I/0/0/"Input byte=0 (default)","Byte
number:",""/wr1,li1///380,40,100/480,40,50)
DEF Feed=(IBB//0/"","Feed override",""/wr1//"EB3"/20,180,100/130,180,100),
Axistop=(B//0/"","Feed stop",""/wr1//"E2.2"/280,180,100/380,180,50/100)
DEF Spin=(IBB//0/"","Spindle override",""/wr1//"EB0"/20,210,100/130,210,100),
spinstop=(B//0/"","Spindle stop",""/wr1//"E2.4"/280,210,100/380,210,50/100)
DEF custom1=(IBB//0/""," User keys 1",""/wr1//"EB7.7"/20,240,100/130,240,100)
DEF custom2=(IBB//0/"","User keys 2",""/wr1//"EB7.5"/20,270,100/130,270,100)
DEF By1
DEF By2
DEF By3
DEF By6
DEF By7
VS3=("")
VS4=("")
VS5=("")
VS6=("")
VS7=("Cancel", SE1, AC7)
VS8=("OK", SE1, AC7)
PRESS(VS7)
EXIT
END_PRESS
PRESS(VS8)
EXIT
END_PRESS
LOAD
By1=1
By2=2
By3=3
By6=6
By7=7
END_LOAD
PRESS(HS1)
Byte.wr=2
END_PRESS
CHANGE(Byte)
By1=byte+1
By2=byte+2
By3=byte+3
By6=byte+6
By7=byte+7
Feed.VAR="EB"<<By3
Spin.VAR="EB"<<Byte
Custom1.VAR="EB"<<By6
Custom2.VAR="EB"<<By7
Axisstop.VAR="E"<<By2<<".2"
Spinstop.VAR="E"<<By2<<".4"
Byte.wr=1
END_CHANGE
CHANGE(Axis stop)
IF Axistop==0
Axistop.BC=9
ELSE
Axistop.BC=11
ENDIF
END_CHANGE
CHANGE(Spin stop)
IF Spinstop==0
Spinstop.BC=9
ELSE
Spinstop.BC=11
ENDIF
END_CHANGE
//END
Result
Configuration
Description of the procedure:
● The systemconfiguration.ini contains a section [keyconfiguration]. The entry specifies an
action for a special PLC softkey.
● A number is given as an action. An Easy Screen call is involved if the number is greater
than or equal to 100.
● A section for defining the action to be performed must be created in the easyscreen.ini
file. The name of the section is based on the name of the operating area and the dialog
name (see entry under [keyconfiguration] → Area:=..., Dialog:=...) → [<Area>_<Dialog>]
→ e.g. [AreaParameter_SlPaDialog].
● The action numbers (which were given in the systemconfiguration.ini → see Action:=...)
are defined in this section. There are two commands involved:
1. LS("Softkey menu1","param.com") ... Loading a softkey menu
2. LM("Screen form1","param.com") ... Loading a screen form
[keyconfiguration]
Cmdline:=cmdline
The LM and LS commands to be executed upon activation of the relevant PLC softkeys are
configured in the easyscreen.ini file. The names of the sections that are used for the purpose
of configuration are structured as follows:
[areaname_dialogname] The first part of the name "areaname" refers to the operating
area and the second part "dialogname" designates the dialog
to which the commands configured in this section apply.
The names given in the systemconfiguration.ini file for the
operating area and dialog should be used. The dialog does not
have to be specified.
This is particularly true for operating areas which are only
[AreaParameter_SlPaDialog] implemented by means of a single dialog. Please refer to the
100.screen1 = LS("Softkey1","param.com") example on the left.
101.screen3 = LM("Screen If "screen1" is displayed in the AreaParameter operating area
form1","param.com") implemented by the SlPaDialog dialog, the
"LS("Softkey1","param.com")" command will be executed
when the "action" with the value 100 occurs.
action.screen=Command Both the "action" and "screen" attributes clearly indicate when
the specified command will be executed.
The "screen" information is optional.
The following commands are permissible:
LM (LoadMask)
LS (LoadSoftkeys)
Turning
The following tables list the possible start softkeys for turning technology. Assignments of
individual start softkeys can differ depending on the particular system. The specified OEM
softkeys are permitted for Easy Screen.
G code start softkeys:
See also
Defining start softkeys (Page 15)
Milling
The following tables list the possible start softkeys for milling technology. Assignments of
individual start softkeys can differ depending on the particular system. The specified OEM
softkeys are permitted for Easy Screen.
G code start softkeys:
System colors
A uniform color table is available for configuring dialogs (subset of the respective standard
colors). The color of an element (text, input field, background, etc.) can be selected from the
following options (between 0 and 128).
2 orange
3 Dark green
4 Light gray
5 Dark gray
6 Blue
7 Red
8 brown
9 yellow
10 White
Supported languages
Standard languages:
Other languages:
References
List Manual System Variables/PGAsl/
See also
Multiple Read NC PLC (MRNP) (Page 118)
Access level
Graduated system of authorization, which makes the accessibility and utilization of functions
on the operator interface dependent on the authorization rights of the user.
Array
An array can be used to organize data of a standard data type stored in the memory in such
a way that it is possible to access the data via an index.
Attribute
Characteristic that assigns specific → Properties to an object (→ Dialog or → Variable).
Column index
Column number of an array
Configuration file
File, which contains definitions and instructions that determine the appearance of → Dialogs
and their → Functions.
Definition lines
Program section in which → Variables and softkeys are defined
Dialog
Display of the → User interface
● Dialog-dependent softkey menu
Softkey menu, which is called from a newly configured dialog.
● Dialog-independent softkeys
Softkeys, which are not called from a dialog, i.e., start softkey and softkey menus, which
the user configures before the first, new dialog.
Editor
ASCII Editor with which characters can be entered in a file and edited.
Event
Any action, which initiates execution of a → Method: Input of characters, actuation of
softkeys, etc.
Group
Reload unit for → Configuration file
Help variable
Internal arithmetic variable to which no → Properties can be assigned and is not, therefore,
visible in the → Dialog.
Hotkeys
6 keys on OP 010, OP 010C and SINUMERIK keyboards with hotkey blocks. Pressing the
keys selects an operating area directly. As an option, 2 additional keys can be configured as
hotkeys.
Input/output field
Also I/O field: for inputting or outputting variable values.
Interpreter
The interpreter automatically converts the defined code from the → Configuration file into a
→ Dialog and controls its use.
Line index
Row number of an array
Menu tree
A group of interlinked → Dialogs
Method
Programmed sequence of operations executed when a corresponding → Event occurs.
Parameter
Parameters are variable elements of the programming syntax and are replaced by other
words/symbols in the → Configuration file.
PI service
Function which, on an NC, executes a clearly defined operation. PI services can be called
from the PLC and the HMI system.
Programming support
Provision of → Dialogs to assist programmers in writing → Parts programs with "higher-level"
components
Properties
Characteristics of an object (e.g of a → Variable)
Recompile
NC code sections can be generated in a → Part program from input fields in → Dialogs in the
→ Programming support system. Recompilation is the reverse operation. The input fields
used to generate a selected section of NC code are retrieved from the NC code and
displayed in the original dialog.
Selecting
A program formulated in the NC language, which specifies motion sequences for axes and
various special actions.
Simulation
Simulation of a → Parts program run without movement of the actual machine axes.
Softkey labels
Text/image on the screen, which is assigned to a softkey.
Softkey menu
All horizontal or all vertical softkeys
Start softkey
Softkey with which the first newly created → Dialog is started.
Toggle field
A list of values in the → Input/output field; check with toggle field: The value input in a field
must be the same as one of the listed values.
User variable
Variables defined by the user in the → Parts program or data block.
Variable
Designation of a memory location, which can be displayed in a → Dialog by assigning
→ Properties and in which input data and the results of arithmetic operations can be entered.
F
A File
Copy, 92
Access level, 35
Delete, 93
Alarms
Moving, 96
Language code, 172
Focus control, 149
Array
Foreground color, 54
Access mode, 140
Function
Column index, 140
CALL (Subprogram call), 90
Compare mode, 140
CP (Copy Program), 92
Definition, 139
CVAR (Check Variable), 90
Element, 140
DLGL (Dialog line), 99
Line index, 140
DP (Delete Program), 93
Status, 144
EP (Exist Program), 94
Attributes, 53
EVAL (Evaluate), 100
EXIT, 101
EXITLS (EXIT Loading Softkey), 103
B
FCT, 104
Background color, 54 GC (Generate code), 107
INSTR (String), 131
LA (Load Array), 110
C LB (Load Block), 112
LEFT (strings), 131
Colors, 54
LEN (string), 130
Conditions, 75
LM (Load Mask), 113
Configuration file, 9, 11
LS (Load Softkey), 115
Configuring PLC softkeys, 165
MIDS (strings), 132
Constants, 74
MP (Move Program), 96
Custom widget
MRNP (Multiple Read NC PLC), 118
Definition, 151
Overview, 88
Interaction, 155
PI_SERVICE, 134
Interface, 153
PI_START, 134
Library, 152
Recompile NC code, 124
Recompile without comment, 126
REPLACE (strings), 133
D
RETURN (Back), 123
Default setting, 52 RIGHT (strings), 132
Defines softkey menu, 33 RNP (Read NC PLC Variable), 116
Dialog SB (Search Backward), 129
Definition, 21 SF (Search Forward), 129
Definition block, 22 SP (Select Program), 97
Multiple columns, 30 WNP (Write NC PLC Variable), 116
Properties, 23
Dialog change mode, 113
Dialog element, 27
DLL file, 104
G P
Generate an NC code, 107 PI services, 88
Graphic text, 52 PLC variable
Grid → Table grid, 145 Read, 116
Write, 116
Position
H Input/output field, 54, 62
Short text, 54, 62
Help display, 54
Help variable, 45
R
I RECT (defining a rectangle), 138
Registers
Image as short text, 51
Exchanging data, 121
Input mode, 53
Status, 122
Value, 121
Relational operators, 75
L
Language code, 172
Limits, 52 S
LINE (define line), 137
Short text, 54, 62
Long text, 52
Softkey
Assign properties, 34
Properties, 36
M
Start softkey, 10, 15
Machining step support, 126 Strings, 63
Master dialog, 113 Sub-dialog, 113
Menu tree, 9 Subprogram, 90
Method Block identifier, 88
CHANGE, 78 Call, 90
LOAD, 81 cancel, 123
LOAD GRID, 82 Variable, 88
OUTPUT, 84 System colors, 171
Overview, 78 System variable, 46, 54
PRESS, 85
UNLOAD, 83
T
Table grid
N
Defines columns, 148
NC variable Definition, 145
Read, 116 Programming, 147
Write, 116 Text, 52
Numerical format, 58 Text for units, 52
Toggle field, 52, 59
Tooltips, 52
O Trigonometric functions, 74
Online help, 41
Operator
U
Bit, 76
Mathematical, 73 User variable, 54
V
Variable
calculating, 45
Change property, 44
Check, 90
CURPOS, 65
CURVER, 66
End, 101
ENTRY, 67
ERR, 68
FILE_ERR, 69
FOC, 71
Parameter, 52
S_CHAN, 72
Variable status, 43
Variable type, 52
INTEGER, 55
VARIANT, 56
Variable value, 43
W
Write mode, 54