SINUMERIK 840D sl Basesoftware and operating software. Commissioning Manual (2020) - page 15

 

  Index      Manuals     SINUMERIK 840D sl Basesoftware and operating software. Commissioning Manual (2020)

 

Search            copyright infringement  

 

   

 

   

 

Content      ..     13      14      15      16     ..

 

 

 

SINUMERIK 840D sl Basesoftware and operating software. Commissioning Manual (2020) - page 15

 

 

Variables
6.10 Variable parameters
Parameter
Description
Online help file
The name of the online help file appears in double quotation marks.
I/O field with integrated unit se-
You can use the input/output fields with integrated unit selection to toggle between dif-
lection
ferent units. If the cursor is moved to the input field, the integrated unit selection is high-
lighted (focus does not have to be explicitly placed on it). A tooltip with a toggle symbol is
also displayed with the appropriate reference to this functionality.
Examples:
DEF VarEdit=(R////////200,,100///"VarTgl")
VarTgl=(S/*0="mm",1="inch"/0//WR2////302,,40)
or
DEF VarEdit_2={TYP="R", VAL=1.234, X=200, W=100,
LINK_TGL="vartgl_2"},
VARTgl_2={TYP="S", TGL="* 0=""mm"", 1=""inch""",WR=2, X=302,
W=40}
Variable: Changing properties
A new value is assigned to the variables in the notation Identifier.Property = Value when
changing. The expression to the right of the equality sign is evaluated and assigned to the
variable or variable property.
Identifier.ac = Access level
(ac: access level)
Identifier.al = Text alignment
(al: alignment)
Identifier.bc = Background color of the input/output field
(bc: back color)
Identifier.bc_gt = Background color of the graphic text
(bc: back color)
(gt: graphic text)
Identifier.bc_st = Background color of the short text
(bc: back color)
(st: short text)
Identifier.bc_ut = Background color of the unit text
(bc: back color)
(ut: unit text)
Identifier.do = Display option
(do: display option)
Identifier.dt = Display mode
(dt: display type)
Identifier.fc = Foreground color of the input/output field
(fc: front color)
Identifier.fc_gt = Foreground color of the graphic text
(fc: front color)
(gt: graphic text)
Identifier.fc_st = Foreground color of the short text
(fc: front color)
(st: short text)
Identifier.fc_ut = Foreground color of the unit text
(fc: front color)
(ut: unit text)
Identifier.fs = Font size
(fs: font size)
Identifier.gt = Graphic text
(gt: graphic text)
Identifier.hlp = Help display
(hlp: help)
Identifier.li = Limit
(li: limit)
Identifier.lt = Long text
(lt: long text)
Identifier.max = MAX limits
(max: maximum)
Identifier.min = MIN limits
(min: minimum)
SINUMERIK Integrate Run MyScreens
102
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.10 Variable parameters
Identifier.sc = Signal color
(sc: signal color)
Identifier.st = Short text
(st: short text)
Identifier.tg = Toggle symbol
(tg: toggle)
Identifier.tt = Tooltip
(tt: tooltip
Identifier.typ = Variable type
(typ: type)
Identifier.ur = Update rate
(ur: update rate)
Identifier.ut = Unit text
(ut: unit text)
Identifier.val = Variable value
(val: value)
Identifier.var = System or user variable
(var: variable)
Identifier.vld = Variable status
(vld: validation)
Identifier.wr = Input mode
(wr: write)
See also
Extended configuration syntax (Page 49)
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
103
Variables
6.11 Details on the variable type
6.11
Details on the variable type
Variable type INTEGER
The following extensions for determining the display in the input/output field and the memory
utilization are possible for the "INTEGER" type:
2nd character in the extension data type
Representation format
B
Binary
D
Decimal signed
H
Hexadecimal
Not specified
Decimal signed
3rd and/or 4th character in the extension data type
Memory utilization
B
Byte
W
Word
D
Doubleword
BU
Byte, unsigned
WU
Word, unsigned
DU
Double word, unsigned
Sequence of characters for the INTEGER data type
1. "I" Basic INTEGER designation
2. Representation format
3. Memory utilization
4. "U" Unsigned
Valid INTEGER type specifications:
IB
Integer variable 32 bits in binary notation
IBD
Integer variable 32 bits in binary notation
IBW
Integer variable 16 bits in binary notation
IBB
Integer variable 8 bits in binary notation
I
Integer variable 32 bits in decimal notation signed
IDD
Integer variable 32 bits in decimal notation signed
IDW
Integer variable 16 bits in decimal notation signed
IDB
Integer variable 8 bits in decimal notation signed
IDDU
Integer variable 32 bits in decimal notation unsigned
IDWU
Integer variable 16 bits in decimal notation unsigned
IDBU
Integer variable 8 bits in decimal notation unsigned
SINUMERIK Integrate Run MyScreens
104
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.11 Details on the variable type
Valid INTEGER type specifications:
IH
Integer variable 32 bits in hexadecimal notation
IHDU
Integer variable 32 bits in hexadecimal notation
IHWU
Integer variable 16 bits in hexadecimal notation
IHBU
Integer variable 8 bits in hexadecimal notation
Variable type VARIANT
The VARIANT variable type is determined by the data type of the last value assignment. If the
assigned or entered value starts with '-', '+', '.' or a number ('0'-'9'), then the value is interpreted
as numeric. In all other cases as a string.
It can be scanned using the ISNUM or ISSTR function. The VARIANT type is mainly suited to the
purpose of writing either variable names or numerical values to the NC code.
Programming
The data type of variables can be checked:
Syntax:
ISNUM (VAR)
Parameters:
VAR
Name of the variable whose data type is to be checked.
The result of the scan can be:
FALSE =
not a numerical variable (data type = STRING)
TRUE =
numerical variable (data type = REAL)
Syntax:
ISSTR (VAR)
Parameters:
VAR
Name of the variable whose data type is to be
checked.
The result of the scan can be:
FALSE =
numerical variable (data type = REAL)
TRUE =
not a numerical variable (data type = STRING)
Example:
IF ISNUM(VAR1) == TRUE
IF ISSTR(REG[4]+2) == TRUE
The display mode of variables can be changed:
• For INTEGER, the display type can be changed.
B
Binary
D
Decimal signed
H
Hexadecimal
unsigned
With the addition of U for Unsigned
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
105
Variables
6.11 Details on the variable type
• 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"
Number 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 98)
SINUMERIK Integrate Run MyScreens
106
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.12 Details on the toggle field
6.12
Details on the toggle field
Description
The toggle field extension function displays 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. The list of the
toggle field is opened by pressing the ENTER key.
Programming
Syntax:
DEF VAR1=(IB/+ $85000/15////"DB90.DBB5") or
DEF VAR_TGL = (S/* "Hello", "Run", "MyScreens"/"Run")
Description:
When the dialog is opened, the content of text number $85015 is displayed in the IO
field. Default value 15 is entered in system variable DB90.DBB5. If the value saved in
system variable DB90.DBB5 changes, the displayed text number $(85000 +
<DB90.DBB5>) is recalculated in response to every change.
Parameter:
Variable type
Type of variables specified in the system or user variable.
Text number
Number (basis) of the language-specific text valid as the
basis number.
System or user variable
System or user variable (offset) via which the final text
number (basis + offset) is displayed.
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[130]"//160,40,50,50)
The size and position of the image is defined under "Position of IO field (left, top, width, height)".
Virtual toggle key
There is no list for toggle fields without configured list, e.g. DEF NoTglList=(R/*). The next
element is not generated until the toggle key is actuated or the associated CHANGE() method of
the corresponding variable run through.
For this case, a small virtual keyboard (comprising only a toggle key) is displayed on the right
next to the variable toggle field for operation with a touch panel.
The display of the virtual toggle key can also be forced via the following entry in the
configuration file "slguiconfig.ini" irrespective of a touch panel.
[VirtualKeyboard]
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
107
Variables
6.12 Details on the toggle field
; Forces easyscreen virtual toggle keyboard function
ForceEasyscreenVirtualToggleKey = true
See also
Variable parameters (Page 98)
SINUMERIK Integrate Run MyScreens
108
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.13 Details on the default setting
6.13
Details on the default setting
Overview
A variable can assume various states depending on whether a default value, or a system or user
variable, or both, is assigned to the variable field (input/output field or toggle field), (not
calculated: toggling is only possible if a valid value has been assigned to the variable).
Scope of the default settings
Condition
Reaction of field type
Field type
Default setting
System or user variable
I/O field
Yes
Yes
Write default value to system or user variable
No
Yes
Use system or user variable as default value
Fault
Yes
Not calculated, system or user variable is not written/
used.
Yes
No
Default setting
No
No
Not calculated
Fault
No
Not calculated
Yes
Fault
Not calculated
No
Fault
Not calculated
Fault
Fault
Not calculated
Toggle
Yes
Yes
Write default value to system or user variable
No
Yes
Use system or user variable as default value
Fault
Yes
Not calculated,
system or user variable not written/used
Yes
No
Default setting
No
No
Default = first toggle field element
Fault
No
Not calculated
Yes
Fault
Not calculated
No
Fault
Not calculated
Fault
Fault
Not calculated
See also
Variable parameters (Page 98)
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
109
Variables
6.14 Details on the position of the short text, position of the input/output field
6.14
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 data 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.
The default setting is used if positions are not specified for any of the dialog elements. The
column width for the short text and input-output field is calculated as standard for each line from
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.
Distance between the input/output field and unit field and width of the unit field
You can configure the distance between an input/output field and a unit field as well as the width
of the unit field.
In the definition line, in the section for the input/output position, enter the distance from the
input/output field to the unit field, separated by a comma (e.g. 7 pixels) and/or the width of the
unit field (e.g. 60 pixels):
DEF VarDT=(R3//0.000/,"DT",,"s"////0,,24/39,,71,,7,60)
Or:
DEF VarDT={TYP="R3", VAL="0.000", ST="DT", UT="s", TXT_X=0,
TXT_W=24, X=39, W=71, UT_DX=7, UT_W=60}
In this case, the distance between the input/output field/unit field and/or the width of the unit
field have/has been configured and the following points should be taken into account:
• The configured width of the input/output field does not include the fixed width of the unit
field (this is fixed at 50 pixels). This means that you directly configure the width of the input/
output field.
• A 50 pixel width applies as default if a width is not configured for the unit field.
•
0 pixels applies as default if a distance is not configured between the input/output field / unit
field.
SINUMERIK Integrate Run MyScreens
110
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.14 Details on the position of the short text, position of the input/output field
Special feature regarding the associated toggle field
Requirements:
• An associated toggle field is configured for a variable,
• For the variable, a distance is configured between the input/output field and unit field and/or
a width for the unit field, and
• The variable has no unit text.
In this particular case, the associated toggle field is positioned at the configured position of the
unit field of the variable.
A position possibly configured for the input/output component of the associated toggle field is
ignored.
Example
In the following example, the associated toggle field F_Unit is automatically set with a distance
of 7 pixels to the input/output field of variable VarF , and with a width of 59 pixels .
DEF VarF=(R//0.0/,"F",,,////0,,24/39,,85,,7,59///"F_Unit"), F_Unit =
(I/*3="mm/min", 1="mm/U"/3// ////181,,155)
See also
Variable parameters (Page 98)
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
111
Variables
6.15 Use of strings
6.15
Use of strings
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"
$85001 = "This is an"
$85002 = "Alarm text"
Editing strings:
• Chaining of strings:
VAR12.VAL = VAR1 << " Error."
;Result: "This is an error"
• Deleting a variable:
VAR10.VAL = ""
;Result: Blank string
• Setting a variable with a text variable:
VAR11.VAL = VAR1.VAL
;Result: "This is an"
• Data type matching:
VAR13.VAL ="This is the " << (VAR14 - VAR8) << ". error"
;Result: "This is the 11th error"
SINUMERIK Integrate Run MyScreens
112
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.15 Use of strings
• Treatment of numerical values:
VAR13.VAL = "Error" << VAR14.VAL << ": " << $85001 << $85002
;Result: "Error 15: "This is an alarm text"
IF VAR15 == "Error"
;Strings in IF statement
VAR16 = 18.1234
;Result: VAR16 equals 18.1234,
;if VAR15 equals "Error".
ENDIF
• Quotation marks within a string:
VAR2="Hello, this is a " Test""
;Result: Hello, this is a " Test"
• System or user-variable strings dependent on variable content:
VAR2.Var = "$R[" << VAR8 << "]"
;Result: $R[4]
See also
STRING functions (Page 189)
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
113
Variables
6.16 CURPOS variable
6.16
CURPOS variable
Description
The CURPOS variable calls or manipulates the position of the cursor in the active input field of the
current dialog. The variable shows how many characters are 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 method. If the value of CURPOS changes, then a jump is made to the
CHANGE method and the instructions contained there are executed.
SINUMERIK Integrate Run MyScreens
114
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.17 CURVER variable
6.17
CURVER variable
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
(IF CURVER==1 ...)
; When the code is recompiled, CURVER is automat-
ically assigned the version of the recompiled
code.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
115
Variables
6.18 ENTRY variable
6.18
ENTRY variable
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 =
Start of a screen via softkey; no code has been generated yet (default as
configured)
2 =
Start of a screen via softkey; code has been generated
(default from the code generated last by this screen)
3 =
Recompilation with user comment (# lines)
4 =
Code_type = 0: NC code with user comment (# lines)
5 =
Code_type = 1: NC code without user comment (# lines)
Example
IF ENTRY == 0
DLGL ("The dialog was not called under programming")
ELSE
DLGL ("The dialog was called under programming")
ENDIF
SINUMERIK Integrate Run MyScreens
116
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.19 ERR variable
6.19
ERR variable
Description
Variable ERR checks whether the preceding line has 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
VAR4 = Thread[VAR1,"CDM",3]
; Output value from array
IF ERR == TRUE
; Query whether the value has been found in
the array
VAR5 = "Error accessing array"
; If the value has not been found in the ar-
ray, the value "Error accessing array" is as-
signed to the variables.
ELSE
VAR5 = "All OK"
; If the value has been found in the array,
the value "All OK" is assigned to the varia-
bles.
ENDIF
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
117
Variables
6.20 FILE_ERR variable
6.20
FILE_ERR variable
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:\tar-
get.mpf
IF FILE_ERR > 0
; Query whether error has occurred
IF FILE_ERR == 1
; Query 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 = "incorrect file name"
ENDIF
ENDIF
ENDIF
ELSE
SINUMERIK Integrate Run MyScreens
118
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.20 FILE_ERR variable
CP("D:\source.mpf","E:\target.mpf")
VAR5 = "All OK"
; If no errors have occurred in CP
(or GC), "All OK" is output
ENDIF
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
119
Variables
6.21 FOC variable
6.21
FOC variable
Description
With the variable FOC, the input focus (current active input/output field) is controlled in a dialog.
The reaction of the cursor left, right, up, down as well as PGUP, PGDN are predefined.
Note
The FOC function must not be initiated as a result of a navigation event. The cursor position may
only be changed in softkey PRESS methods, CHANGE methods, 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
IF FOC == "Var1"
; Read focus
REG[1] = Var1
ELSE
REG[1] = Var2
ENDIF
FOC = "Var1"
; The input focus is assigned to variable 1.
FOC = 3
; The input focus is assigned to the 3rd dialog ele-
ment with WR ≥ 2.
See also
FOCUS (Page 135)
SINUMERIK Integrate Run MyScreens
120
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.22 Variable S_ALEVEL
6.22
Variable S_ALEVEL
Description
The current access level can be queried in the configuration with the screen property S_ALEVEL.
Programming
Syntax:
S_ALEVEL
Description:
Query of the current access level
Return value:
0: System
1: Manufacturer
2: Service
3: User
4: Key switch 3
5: Key switch 2
6: Key switch 1
7: Key switch 0
Example
REG[0] = S_ALEVEL
See also
ACCESSLEVEL (Page 132)
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
121
Variables
6.23 S_CHAN variable
6.23
S_CHAN variable
Description
The S_CHAN variable determines the number of the current channel for display or evaluation
purposes.
Programming
Syntax:
S_CHAN
Description:
Query of the current channel number
Return value:
Channel number
Example
REG[0] = S_CHAN
See also
CHANNEL (Page 134)
SINUMERIK Integrate Run MyScreens
122
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.24 Variable S_CONTROL
6.24
Variable S_CONTROL
Description
The current control name can be queried in the configuration with the screen property
S_CONTROL.
Programming
Syntax:
S_CONTROL
Description:
Query of the current control name
Return value:
The control name is the section name in the "mmc.ini"
Example
REG[0] = S_CONTROL
See also
CONTROL (Page 134)
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
123
Variables
6.25 Variable S_LANG
6.25
Variable S_LANG
Description
The current language can be queried in the configuration with the screen property S_LANG.
Programming
Syntax:
S_LANG
Description:
Query of the current language
Return value:
Language code from resources.xml, e.g. "deu", "eng", etc.
Example
REG[0] = S_LANG
See also
LANGUAGE (Page 136)
SINUMERIK Integrate Run MyScreens
124
Programming Manual, 10/2020, A5E40869575B AD
Variables
6.26 Variable S_NCCODEREADONLY
6.26
Variable S_NCCODEREADONLY
Description
The screen property S_NCCODEREADONLY is only relevant when a cycle is recompiled in the
editor with a "Run MyScreens" dialog. S_NCCODEREADONLY determines whether a recompiled
NC code from the editor can be changed or not.
The following applies for the return value:
• TRUE: The recompiled NC code from the editor can be changed
• FALSE: The recompiled NC code from the editor cannot be changed (read-only), because, for
example, it is already in the preprocessing (= TRUE).
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
125
Variables
6.27 Variables S_RESX and S_RESY
6.27
Variables S_RESX and S_RESY
Description
The current resolution or its X and Y component can be queried in the configuration with the
screen properties S_RESX and S_RESY.
Example
REG[0] = S_RESY
See also
RESOLUTION (Page 141)
SINUMERIK Integrate Run MyScreens
126
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7
7.1
Operators
Overview
The following operators can be used when programming:
• Mathematical operators
• Relational operators
• Logic (Boolean) operators
• Bit operators
• Trigonometric functions
7.1.1
Mathematical operators
Overview
Mathematical operators
Designation
+
Addition
-
Subtraction
*
Multiplication
/
Division
MOD
Modulo operation
( )
Parentheses
AND
AND operator
OR
OR operator
NOT
NOT operator
ROUND
Round off numbers with decimal places
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.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
127
Programming commands
7.1 Operators
Use
ROUND is controlled by the user with two parameters:
VAR1 = 5.2328543
VAR2 = ROUND( VAR1, 4 )
Result:
VAR2 = 5.2339
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
Trigonometric functions
Designation
SIN(x)
Sine of x
COS(x)
Cosine of x
TAN(x)
Tangent of x
ATAN(x, y)
Arc tangent of x/y
SQRT(x)
Square root of x
ABS(x)
Absolute value of x
SDEG(x)
Conversion to degrees
SRAD(x)
Conversion to radian
CALC_ASIN(x)
Arc sine of x
CALC_ACOS(x)
Arc cosine of x
Note
The functions operate with radian measure. The functions SDEG() and SRAD() can be used for
conversion.
Example: VAR1.VAL = SQRT(2)
Mathematical functions
Mathematical functions
Designation
CALC_CEIL(x)
Determines the next highest integer of x (round up)
CALC_FLOOR(x)
Determines the next lowest integer of x (round down)
CALC_LOG(x)
Determines the (natural) logarithm for the base e of x
CALC_LOG10(x)
Determines the logarithm for the base 10 of x
CALC_POW(x, y)
Determines x to the power of y
CALC_MIN(x, y)
Determines the lower number of x and y
CALC_MAX(x, y)
Determines the higher number of x and y
SINUMERIK Integrate Run MyScreens
128
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.1 Operators
Random function: Random number
Syntax:
RANDOM (lower limit value, upper limit value)
Description:
The RANDOM function returns a pseudo random number in a specified range.
Parameters:
Lower limit value
Lower limit value >= -32767,
Lower limit value < upper limit value
Upper limit value
Upper limit value <= 32767
Example
REG[0] = RANDOM(-10,10)
; Possible result = -3
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
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
129
Programming commands
7.1 Operators
Conditions
The nesting depth is unlimited.
Condition with one command:
IF
ENDIF
Condition with two commands:
IF
ELSE
ENDIF
7.1.2
Bit operators
Overview
Bit operators
Designation
BOR
Bit-serial OR
BXOR
Bit-serial XOR
BAND
Bit-serial AND
BNOT
Bit-serial NOT
SHL
Shift bits to left
SHR
Shift bits to right
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
Syntax:
variable = value SHLincrement
Description:
Shift Left
Parameters:
value
value to be shifted
increment
number of shift increments
Example
PRESS(VS1)
VAR01 = 16 SHL 2
; Result = 64
SINUMERIK Integrate Run MyScreens
130
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.1 Operators
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
Syntax:
variable = value SHRincrement
Description:
Shift Right
Parameters:
value
value to be shifted
increment
number of shift increments
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 right by number of bits
specified in VAR04. Then convert 32-bit value back
to format of variable VAR02.
END_PRESS
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
131
Programming commands
7.2 Methods
7.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:
Definition block
Comment
Section reference
PRESS(HS1)
;Method start identifier
LM...
;Functions
See Chapter Functions (Page 145)
LS...
Var1.st = ...
;Changing properties
see Section Defining softkey menus
(Page 68)
and Section Defining dialog proper-
ties (Page 55).
Var2 = Var3 + Var4
;Calculation with variables
See Chapter Defining variables
(Page 87)
EXIT
END_PRESS
;Method end identifier
7.2.1
ACCESSLEVEL
Description
The ACCESSLEVEL method is run through when the current access level has changed for an
opened screen.
Programming
Syntax:
ACCESSLEVEL
<instructions>
END_ACCESSLEVEL
Description:
Access level
Parameters:
- None -
See also
Variable S_ALEVEL (Page 121)
SINUMERIK Integrate Run MyScreens
132
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.2 Methods
7.2.2
CHANGE
Description
CHANGE methods are executed when a variable value changes. This means that 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
DEF VAR1=(I//////"DB20.DBB1")
; A system variable is assigned to Var1
CHANGE(VAR1)
IF VAR1.Val <> 1
VAR1.st="Tool OK!"
; If the value of the system variable ≠ 1, the
short text of the variable states: Tool OK!
otto=1
ELSE
VAR1.st="Attention: Error!"
; If the value of the system variable = 1, the
short text of the variable states: Attention:
Error!
otto=2
ENDIF
VAR2.Var=2
END_CHANGE
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
133
Programming commands
7.2 Methods
"Global" programming
Syntax:
CHANGE()
END_CHANGE
Description:
Changes any variable value
Parameters:
- None -
Example
CHANGE()
EXIT
; If any of the variable values change, the di-
alog will be terminated.
END_CHANGE
7.2.3
CHANNEL
Description
The CHANNEL method is run through when the current channel has changed for an opened
screen, i.e. a channel switchover has been performed.
Programming
Syntax:
CHANNEL
<instructions>
END_CHANNEL
Description:
Channel switchover
Parameters:
- None -
See also
S_CHAN variable (Page 122)
7.2.4
CONTROL
Description
The CONTROL method is run through when the current control has changed for an opened
screen, i.e. typically at a 1:n switchover.
SINUMERIK Integrate Run MyScreens
134
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.2 Methods
Programming
Syntax:
CONTROL
<instructions>
END_CONTROL
Description:
Control switchover
Parameters:
- None -
See also
Variable S_CONTROL (Page 123)
7.2.5
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 position
may only be changed in softkey PRESS methods, CHANGE methods, etc. The response of cursor
movements is predefined.
Note
Within the FOCUS method, 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
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
135
Programming commands
7.2 Methods
See also
FOC variable (Page 120)
7.2.6
LANGUAGE
Description
The LANGUAGE method is run through when the current language has changed for an opened
screen.
Programming
Syntax:
LANGUAGE
<instructions>
END_LANGUAGE
Description:
Language
Parameters:
- None -
See also
Variable S_LANG (Page 124)
7.2.7
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
LOAD
; Start identifier
SINUMERIK Integrate Run MyScreens
136
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.2 Methods
Screen form1.Hd =
$85111
; Assign text for dialog header from language file
VAR1.Min = 0
; Assign MIN variable limit
VAR1.Max = 1000
; Assign MAX variable limit
END_LOAD
; End code
See also
Line, dividing line, rectangle, circle and ellipse (Page 201)
7.2.8
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
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
137
Programming commands
7.2 Methods
7.2.9
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
Syntax:
OUTPUT(identifier)
END_OUTPUT
Description:
Outputs variables in the NC program.
Parameters:
Identifier
Name of OUTPUT method
Block numbers and skip identifiers
The OUTPUT method must not contain line numbers or skip identifiers if you wish to keep the line
numbers and skip identifiers directly set with active program support in the parts program in
case of recompilations.
Editor changes in the parts program produce the following response:
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
SINUMERIK Integrate Run MyScreens
138
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.2 Methods
7.2.10
PRESS
Description
The PRESS method is executed when the corresponding softkey is pressed.
Programming
Syntax:
PRESS(softkey)
END_PRESS
Designation:
Pressing a softkey
Parameters:
Softkey
Name of softkey: HS1 - HS8 and VS1 - VS8
RECALL
<RECALL> key
ENTER
For the <ENTER> key, see PRESS(ENTER) (Page 140)
TOGGLE
For the <TOGGLE> key, see PRESS(TOGGLE) (Page 140)
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
HS1 = ("another softkey menu")
HS2 = ("no function")
PRESS (HS1)
LS("Menu1")
; Load another softkey menu
Var2 = Var3 + Var1
END_PRESS
PRESS (HS2)
END_PRESS
PRESS(PU)
INDEX = INDEX -7
CALL("UP1")
END_PRESS
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
139
Programming commands
7.2 Methods
7.2.11
PRESS(ENTER)
Description
The PRESS(ENTER) method is always called when the Enter key is pressed for a variable with
input/output field with input mode WR3 or WR5:
• WR3: Navigation to field and pressing of the Enter key
• WR5: In the input mode, transfer of the value with the Enter key
Programming
Syntax:
PRESS(ENTER)
<instructions>
END_PRESS
Description:
Enter key pressed
Parameters:
- None -
7.2.12
PRESS(TOGGLE)
Description
The PRESS(TOGGLE) method is always called when the toggle key is pressed irrespective of the
currently focused variable.
When required, the FOC screen property can be used to determine which variable is currently in
focus.
Programming
Syntax:
PRESS(TOGGLE)
<instructions>
END_PRESS
Description:
Toggle key pressed
Parameter:
- None -
Example
PRESS(TOGGLE)
DLGL("Toggle key pressed at variable " << FOC)
; The FOC screen property determines which
variable is currently in focus
END_PRESS
SINUMERIK Integrate Run MyScreens
140
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.2 Methods
7.2.13
RESOLUTION
Description
The RESOLUTION method is run through when the current resolution has changed for an opened
screen, i.e. typically at a TCU switchover.
Programming
Syntax:
RESOLUTION
<instructions>
END_RESOLUTION
Description:
Resolution
Parameters:
- None -
See also
Variables S_RESX and S_RESY (Page 126)
7.2.14
RESUME
Description
The RESUME method is called when the screen was interrupted, e.g. for an area change, and is
now shown again. The value changes are processed again, if required, the timers started and the
RESUME block executed.
Note
The functions LS, LM, DLGL, EXIT and EXITLS must not be configured in the methods SUSPEND
or RESUME. When using the functions in these methods, the execution of the functions is
prevented.
Programming
Syntax:
RESUME
<instruction>
END_RESUME
Description:
Screen active again
Parameters:
- None -
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
141
Programming commands
7.2 Methods
7.2.15
SUSPEND
Description
The SUSPEND method is called when the screen is interrupted and not unloaded. This is the case,
for example, when the screen is exited by a simple area change, but not explicitly unloaded. The
screen is retained in the backg15round, but no value change or timers are processed. The screen
is paused.
Note
The functions LS, LM, DLGL, EXIT and EXITLS must not be configured in the methods SUSPEND
or RESUME. When using the functions in these methods, the execution of the functions is
prevented.
Programming
Syntax:
SUSPEND
<instruction>
END_SUSPEND
Description:
Interruption of the screen
Parameters:
- None -
Example
SUSPEND
MyVar1 = MyVar1 + 1
END_SUSPEND
7.2.16
Example: Version management with OUTPUT methods
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:
DEF var100=(R//1)
; Original, corresponds to Version 0
DEF var101(1)=(S//"Hello")
; Extension as of Version 1
SINUMERIK Integrate Run MyScreens
142
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.2 Methods
When writing the OUTPUT method, you can specify which variables are written, with reference
to a particular version identifier.
Example:
OUTPUT(NC1)
; Only the variables of the original are offered in
the OUTPUT method.
OUTPUT(NC1,1)
; The variables of the original and the extensions
with version identifier 1 are offered in the OUTPUT
method.
The OUTPUT method for the original 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
method includes all variables of the originals 0, 1, 2, ... up to and including n.
Programming with version identifier
//M(XXX)
Version 0 (default)
DEF var100=(R//1)
DEF var101=(S//"Hello")
DEF TMP
VS8=("GC")
PRESS(VS8)
GC("NC1")
END_PRESS
OUTPUT(NC1)
var100",,"var101
END_OUTPUT
; ************ Version 1, extended definition ***************
//M(XXX)
DEF var100=(R//1)
DEF var101=(S//"Hello")
DEF var102(1)=(V//"HUGO")
DEF TMP
VS8=("GC")
PRESS(VS8)
GC("NC1")
END_PRESS
OUTPUT(NC1)
Original and the new version in addition
var100","var101
END_OUTPUT
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
143
Programming commands
7.2 Methods
OUTPUT(NC1,1)
Version 1
var100","var101"," var102
END_OUTPUT
SINUMERIK Integrate Run MyScreens
144
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
7.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.
Subprograms
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_START function starts PI Services (Program Invocation Services) from the PLC in the NC
area.
See also
Function (FCT) (Page 165)
PI services (Page 179)
7.3.1
Reading and writing drive parameters: RDOP, WDOP, MRDOP
Description
You can read and write drive parameters using RDOP, WDOP and MRDOP functions.
Note
Do not read drive parameters faster than in a 1 second cycle, slower is better.
Reason: The communication with the drives can otherwise be extremely disturbed or even cause
failures.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
145
Programming commands
7.3 Functions
Note
If errors occur when reading and writing drive parameters, the screen property ERR is set
appropriately.
Programming
Syntax:
RDOP("Identifier of the drive object", "Parameter number")
Description:
Reading a drive parameter (Drive Object Parameter)
Parameters:
Identifier of the drive object
The identifier of the drive object
can be found in the "DO name"
column in "Drive system diagnos-
tics" in the diagnostics operating
area ( > ETC > HSK 8: drive sys-
tem) (see diagram below).
Parameter number
Figure 7-1
Identifier of the drive object
Syntax:
MRDOP("Identifier of the drive object", "Parameter number1"*"Pa-
rameter number"[*…], Register index)
Description:
Multi-read of drive parameters.
The MRDOP command transfers several drive parameters or drive
objects in a single register access. This access method is significantly
faster than reading via individual access attempts.
SINUMERIK Integrate Run MyScreens
146
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
Parameters:
Identifier of the drive object
The identifier of the drive object
can be taken, for example, from
the root screen of the "Setup" op-
erating area.
Parameter number1 ... n
In the variable names, "*" is the
separator. The values are trans-
ferred to register REG[Register in-
dex] in the order that the variable
names appear
in the command.
Register index
The value of the first variable is
located in REG[Register index].
The value of the second variable
is located in REG[Register index +
1]
Syntax:
WDOP("Identifier of the drive object", "Parameter number", Value)
Description:
Writing a drive parameter (Drive Object Parameter)
Parameters:
Identifier of the drive object
The identifier of the drive object
can be taken, for example, from
the root screen of the "Setup" op-
erating area.
Parameter number
Parameter number
Value
Value to be written
Examples
Read motor temperature r0035 of drive object "SERVO_3.3:2":
MyVar=RDOP("SERVO_3.3:2","35")
;
Read motor temperature r0035 and actual torque value r0080 of drive object "SERVO_3.3:2" and
store the respective results as of register index 10:
MRDOP("SERVO_3.3:2","35*80",10)
7.3.2
Subprogram call (CALL)
Description
The CALL function calls a loaded subprogram from any point in a method. Subprogram nesting
is supported, i.e. you can call a subprogram from another subprogram.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
147
Programming commands
7.3 Functions
Programming
Syntax:
CALL("Identifier")
Description:
Subprogram call
Parameters:
Identifier
Name of subprogram
Example
//M(SCREEN1)
DEF VAR1 = ...
DEF VAR2 = ...
CHANGE(VAR1)
CALL("MY_UP1")
; Call subprogram and execute
END_CHANGE
CHANGE(VAR2)
CALL("MY_UP1")
; Call subprogram and execute
END_CHANGE
SUB(MY_UP1)
;Do something
END_SUB
//END
7.3.3
Define block (//B)
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.
SINUMERIK Integrate Run MyScreens
148
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
Programming
A block is structured in the following way:
Syntax:
//B(Block name)
SUB(Identifier)
END_SUB
[SUB(Identifier)]
END_SUB]
//END
Description:
Defines a subprogram
Parameters:
Block name
Name of block identifier
Identifier
Name of subprogram
Example
//B(PROG1)
; Block start
SUB(UP1)
; Start of subprogram
REG[0] = 5
; Assign value 5 to register 0
END_SUB
; End of subprogram
SUB(UP2)
; Start of subprogram
IF VAR1.val=="Otto"
VAR1.val="Hans"
RETURN
ENDIF
VAR1.val="Otto"
END_SUB
; End of subprogram
//END
; Block end
7.3.4
Check Variable (CVAR)
Description
You can use the CVAR (Check Variable) function to run a scan to ascertain whether all or only
certain variables or Help variables in a screen 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.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
149
Programming commands
7.3 Functions
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 == TRUE
; Check all variables
VS8.SE = 1
; If all variables are error-free, soft-
key VS8 is visible
ELSE
VS8.SE = 2
; If a variable has an invalid value,
softkey VS8 is disabled
ENDIF
IF CVAR("VAR1", "VAR2") == TRUE
; Check variables VAR1 and VAR2
DLGL ("VAR1 and VAR2 are OK")
; If the values of VAR1 and VAR2 are er-
ror-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 in-
valid, "VAR1 and VAR2 are not OK" appears
in the dialog line
ENDIF
7.3.5
CLEAR_BACKGROUND
Description
The CLEAR_BACKGROUND function deletes the LINE, RECT, ELLIPSE, V_SEPARATOR and
H_SEPARATOR graphic elements.
See also
Line, dividing line, rectangle, circle and ellipse (Page 201)
SINUMERIK Integrate Run MyScreens
150
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
7.3.6
Copy Program file function (CP)
Description
The CP (Copy Program) function copies files within the HMI file system or within the NC file
system.
Programming
Syntax:
CP("Source file", "Target file")
Description:
Copies a file
Parameters:
Source file
Complete path to the source file
Target file
Complete path data of the target file
The return value (VAR1 defined as help variable) queries whether the function was successful:
CP("//NC/MPF.DIR/HOHO.MPF","//NC/MPF.DIR/ASLAN.MPF",VAR1)
Example
Application with return value:
CP("//NC/MPF.DIR/HOHO.MPF","//NC/MPF.DIR/ASLAN.MPF",VAR1)
CP("CF_CARD:/wks.dir/MESS_BILD.WPD/MESS_BILD.MPF","//NC/WKS.DIR/AAA.WPD/HOHO2.MPF",VAR1)
CP("//NC/MPF.DIR/HOHO.MPF","CF_CARD:/wks.dir/WST1.WPD/MESS.MPF",VAR1)
; WPD must exist
Application without return value:
CP("//NC/MPF.DIR/HOHO.MPF","//NC/MPF.DIR/ASLAN.MPF")
CP("CF_CARD:/mpf.dir/MYPROG.MPF","//NC/MPF.DIR/HOHO.MPF")
CP("//NC/MPF.DIR/HOHO.MPF","CF_CARD:/XYZ/MYPROG.MPF")
; XYZ must exist
See also
Support of FILE_ERR: FILE_ERR variable (Page 118)
7.3.7
Delete Program file function (DP)
Description
The DP (Delete Program) function deletes a file from the passive HMI or active NC file system.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
151
Programming commands
7.3 Functions
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:
• With return value
DP("//NC/MPF.DIR/MYPROG.MPF",VAR1)
DP("//NC/WKS.DIR/TEST.WPD/MYPROG.MPF",VAR1)
DP("//NC/CMA.DIR/MYPROG.SPF",VAR1)
VAR1 = 0
File was deleted.
VAR1 = 1
File was not deleted.
• Without return value:
DP("//NC/MPF.DIR/MYPROG.MPF")
DP("//NC/WKS.DIR/TEST.WPD/MYPROG.MPF")
DP("//NC/CMA.DIR/MYPROG.SPF")
7.3.8
Exist Program file function (EP)
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 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.MPF
or
CF_CARD: /MPF.DIR/XYZ.MPF (points to /user/sinumerik/data/prog)
or
LOC: (corresponds to CF_CARD)
SINUMERIK Integrate Run MyScreens
152
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
Examples of new syntax:
EP("//NC/WKS.DIR/TEST.WPD/XYZ.MPF",VAR1)
EP("CF_CARD:/mpf.dir/XYZ.MPF",VAR1)
EP("LOC:/mpf.dir/XYZ.MPF",VAR1)
; With return value:
; VAR1 = 0 File exists.
; VAR1 = 1 File does not exist.
Example of 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 the NC file system.
Example
EP("/MPF.DIR/GROB.MPF",VAR1)
; Old - path now with / instead of \
IF VAR1 == "M"
DLGL("File is located in the HMI file system")
ELSE
IF VAR1 == "N"
DLGL("File is located in the NC file directory")
ELSE
DLGL("File is located neither in the HMI nor in the NC
file system")
ENDIF
ENDIF
7.3.9
Move Program file function (MP)
Description
The MP (Move Program) function copies files within the HMI file system or within the NC file
system.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
153
Programming commands
7.3 Functions
Programming
Syntax:
MP("Source", "Target")
MP("CF_CARD:/MPF.DIR/MYPROG.MPF","//NC/MPF.DIR")
Description:
Move file
Parameters:
Source file
Complete path data
Target file
Complete path data
Return value
Result of the query
Examples
With return value:
MP("//NC/MPF.DIR/123.MPF","//NC/MPF.DIR/ASLAN.MPF",VAR1)
;Within NC
MP("//NC/MPF.DIR/123.MPF",VAR0,VAR1)
;Target via variable
MP(VAR4,VAR0,VAR1)
;Source and target via variable
MP("CF_CARD:/mpf.dir/myprog.mpf","//NC/MPF.DIR/123.MPF",VAR1)
;From CF card to NC
MP("//NC/MPF.DIR/HOHO.MPF","CF_CARD:/XYZ/123.mpf",VAR1)
;From NC to CF card
; With return value:
; VAR1 = 0 Executed
; VAR1 = 1 Not executed
7.3.10
Select Program file function (SP)
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")
Designation:
Select program
Parameters:
"File"
Complete path name of NC file
Example
The following data management syntax is used for this function:
• With return value
SP("//NC/MPF.DIR/MYPROG.MPF", VAR1)
VAR1 = 0
File was loaded.
SINUMERIK Integrate Run MyScreens
154
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
VAR1 = 1
File was not loaded without return value.
• Without return value:
SP("//NC/MPF.DIR/MYPROG.MPF")
7.3.11
File accesses: RDFILE, WRFILE, RDLINEFILE, WRLINEFILE
Description
The RDFILE and WRFILE functions are available for read and write access to files with INI syntax.
The RDLINEFILE and WRLINEFILE functions are available for read and write access to individual
lines of a file.
Programming
Syntax:
RDFILE("File name + path", "Section", "Key")
Description:
Reading from a file
Parameters:
File name + path
Path and file name
Section
Section in the INI file
Key
Key in the INI file
Syntax:
WRFILE(Value, "File name + path", "Section", "Key")
Description:
Writing to a file
Parameters:
Value
Value to be written
File name + path
Path and file name
Section
Section in the INI file
Key
Key in the INI file
Syntax:
RDLINEFILE("File name + path", Line number)
Description:
Reading a line from a file
Parameters:
File name + path
Path and file name
Line number
Line number
Numbering begins at 0 for the
first line.
Syntax:
WRLINEFILE(Value, "File name + path")
Description:
Writing of a line at the end of a file
Parameters:
Value
Value to be written
File name + path
Path and file name
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
155
Programming commands
7.3 Functions
Note
• The files must not be in the file system of the NC (data management).
• If the file does not exist, or the end of the file is reached or other errors occur, the variables
FILE_ERR and ERR are set accordingly. You can check whether a file exists first with the Exist
Program (EP) file function.
• The processed file is generated in "UTF-8" coding (without BOM (Byte Order Mask). When
reading a file, it is expected in "UTF-8" coding.
• You can delete the file explicitly when required with the Delete Program (DP) file function.
Examples
Reading from an INI file:
Requirement/assumption:
Content of file "C:/tmp/myfile.ini":
<…>
[MyData]
MyName=Daniel
<…>
MyVar = RDFILE("C:/tmp/myfile.ini", "MyData", "MyName")
Result:
MyVar now contains the value "Daniel".
Writing to an INI file:
Requirement/assumption:
VARS=12
WRFILE(VARS, "C:/tmp/myfile.ini", "MySession", "NrOfSessions")
Result:
Content of file "C:/tmp/myfile.ini":
<…>
[MySession]
NrOfSessions=12
<…>
SINUMERIK Integrate Run MyScreens
156
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
Reading the 4th line of a file:
Requirement/assumption:
Content of c:/tmp/myfile.mpf:
R[0]=0
F3500 G1
MYLOOPIDX1: X0 y-50 Z0
X150 Y50 Z10
R[0]=R[0]+1
GOTOB MYLOOPIDX1
M30
MyVar = RDLINEFILE("C:/tmp/myfile.mpf", 4)
Result:
MyVar now contains the value " R[0]=R[0]+1"
Writing at the end of a file:
Requirement/assumption:
VARX=123
VARY=456
WRLINEFILE("F100 X" << VARX << " Y" << VARY, "C:/tmp/mypp.mpf")
Result:
Content of c:/tmp/mypp.mpf:
<…>
F100 X123 Y456
7.3.12
Dialog line (DLGL)
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.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
157
Programming commands
7.3 Functions
Possible number of characters in the default font size: approx. 50
Note
The functions LS, LM, DLGL, EXIT and EXITLS must not be configured in the methods SUSPEND
or RESUME. When using the functions in these methods, the execution of the functions is
prevented.
Programming
Syntax:
DLGL("String")
Description:
Outputs text in the dialog line
Parameters:
String
Text, which is displayed in the dialog line
Example
IF Var1 > Var2
; The text "Value too large!" appears in the dialog
line if variable1 > variable2.
DLGL("Value too large!")
ENDIF
7.3.13
DEBUG
Description
The DEBUG function provides an analysis help during the draft phase of Run MyScreen user
screens. An expression in brackets transferred with the DEBUG function is evaluated during
runtime. The result is attached to the "easyscreen_log.txt" logbook as a separate entry.
Each entry has the current time stamp in square brackets as prefix (see example below).
It is recommended that the DEBUG outputs are removed in time-critical parts when possible.
Particularly after completing the draft phase, it is recommended that you comment out the
DEBUG outputs. The write access to the constantly expanding "easyscreen_log.txt" logbook may
slow down the processing.
Programming
Syntax:
DEBUG(expression)
Description:
Makes an entry in the "easyscreen_log.txt" logbook
Parameters:
Expression to be evaluated from which an entry is generated in the logbook
SINUMERIK Integrate Run MyScreens
158
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
Example
IF Var1 > Var2
DEBUG("Value of ""Var1"": " << Var1)
; Entry in the "easyscreen_log_txt:
[10:22:40.445] DEBUG: Value of "Var1":
123.456
ENDIF
7.3.14
Exit dialog (EXIT)
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.
Note
The functions LS, LM, DLGL, EXIT and EXITLS must not be configured in the methods SUSPEND
or RESUME. When using the functions in these methods, the execution of the functions is
prevented.
Programming (without parameters)
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.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
159
Programming commands
7.3 Functions
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.
Programming with a transfer variable
Syntax:
EXIT[(VARx)]
Description:
Exits the dialog and transfers one or more variables
Parameters:
VARx
Label variables
Example
//M(Screen1)
PRESS(HS1)
LM("SCREEN2","CFI.COM",1, POSX, POSY,
DIAMETER)
; Interrupt Screen1 and open Screen2. In
doing this, transfer variables POSX, POSY
and DIAMETER.
DLGL("Screen2 ended")
; After returning from Screen2, the fol-
lowing text appears in the dialog line of
Screen1: Screen2 ended.
END_PRESS
//END
//M(Screen2)
PRESS(HS1)
EXIT(5, , CALCULATED_DIAMETER)
; Exit Screen2 and return to Screen1 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
SINUMERIK Integrate Run MyScreens
160
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
//END
7.3.15
Dynamic manipulation of the lists of toggle fields or list box fields
Description
The LISTADDITEM, LISTINSERTITEM, LISTDELETEITEM and LISTCLEAR functions are used for the
dynamic manipulation of the lists of toggle fields or list box fields.
These functions only have an effect on variables that have their own list, such as:
• "Simple" list
DEF VAR_AC1 = (I/* 0,1,2,3,4,5,6,7,8) or
• "Extended" list
DEF VAR_AC2 = (I/* 0="AC0", 1="AC1", 2="AC2", 3="AC3", 4="AC4",
5="AC5", 6="AC6", 7="AC7", 8="AC8").
If the variable points to an array, e.g. DEF VAR_AC3 = (I/* MYARRAY), these functions are
not available as otherwise the global array would be changed.
At least one value must be defined for the variable in the DEF line. This specifies the "Simple" or
"Extended" list type.
However, the list can then be completely deleted and, if required, completely rebuilt. The
"Simple" or "Extended" type must be retained however, it cannot be changed dynamically.
Programming
Syntax:
LISTINSERTITEM(Variable name, Position, ItemValue[, ItemDispVal-
ue])
Description:
Inserts an element at a specific position; reading from a file
Parameters:
Variable name
Position
Position at which an element is to
be inserted in the list
ItemValue
Value of the list entry
ItemDispValue
Value as it is to be displayed in the
list
Syntax:
LISTADDITEM(Variable name, ItemValue[, ItemDispValue])
Description:
Adds an element to the end of the list
Parameters:
Variable name
ItemValue
Value of the list entry
ItemDispValue
Value as it is to be displayed in the
list
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
161
Programming commands
7.3 Functions
Syntax:
LISTDELETEITEM(Variable name, Position)
Description:
Deletes a specific element
Parameters:
Variable name
Position
Position of the element to be de-
leted in the list
Syntax:
LISTCOUNT(Variable name)
Description:
Returns the current number of elements in the list
Parameters:
Variable name
Syntax:
LISTCLEAR(Variable name)
Description:
Deletes the complete list
Parameters:
Variable name
Examples
Note
The following examples build upon each other. The sequence of the examples is relevant in order
to understand the respective results.
Requirement/assumption:
DEF VAR_AC = (I/* 0="Off",1="On"/1/,"Switch"/WR2)
Adding an element -1="Undefined" to the end of the list:
LISTADDITEM("VAR_AC", -1, """Undefined""")
Result: 0="Off", 1="On", -1="Undefined"
Inserting an element 99="Maybe" at position 2:
LISTINSERTITEM("VAR_AC", 2, 99, """Maybe""")
Result: 0="Off", 1="On", 99="Maybe", -1="Undefined"
Determining the current number of list elements:
REG[10]=LISTCOUNT("VAR_AC")
SINUMERIK Integrate Run MyScreens
162
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
Result: REG[10] = 4
Deleting the element at position 1:
LISTDELETEITEM("VAR_AC", 1)
Result: 0="Off", 99="Maybe", -1="Undefined"
Deletion of the complete list:
LISTCLEAR("VAR_AC")
Result: List is empty
7.3.16
Evaluate (EVAL)
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
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
163
Programming commands
7.3 Functions
IF REG[5] == 3
REG[7] = VAR3
ELSE
IF REG[5] == 4
REG[7] = VAR4
ENDIF
ENDIF
ENDIF
ENDIF
END_CHANGE
7.3.17
Exit Loading Softkey (EXITLS)
Description
You can use the EXITLS function to exit the current user interface and load a defined softkey
menu.
Note
The functions LS, LM, DLGL, EXIT and EXITLS must not be configured in the methods SUSPEND
or RESUME. When using the functions in these methods, the execution of the functions is
prevented.
Programming
Syntax:
EXITLS("Softkey menu"[, "Path name"])
Description:
Exits dialog and loads a softkey menu
Parameters:
Softkey menu
Name of the softkey menu to be loaded
Path name
Directory path of the softkey menu to be loaded
Example
PRESS(HS1)
EXITLS( "Menu1", "AEDITOR.COM" )
END_PRESS
SINUMERIK Integrate Run MyScreens
164
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
7.3.18
Function (FCT)
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
Syntax:
FCTFunction name = ("File"/Type of return/Types of permanent parameters/Types
of variable parameters)
FCT InitConnection = ("c:\tmp\xyz.dll"/I/R,I,S/I,S)
Description:
An external function can, for example, be called from the LOAD method or execu-
ted in the PRESS method.
Parameters:
Function name
Name of external function
File
Complete path to DLL file
Type of return
Data type of the return value
Type of fixed parameter
Value parameter
Type of variable param-
Reference parameter
eter
The data types are separated by commas.
The external function can, for example, be called from the LOAD method or executed in the
PRESS method.
Example:
press(vs4)
RET = InitConnection(VAR1,13,"Servus",VAR2,VAR17)
end_press
Structure of the external function
The external function must take into account a certain, specific signature:
Syntax:
extern "C" dllexport void InitConnection (ExtFctStructPtr FctRet, ExtFctStructPtr
FctPar, char cNrFctPar)
Description:
DLL export, only when implemented in Windows
Specifiers and transfer parameters are strictly defined. The actual call parameters
are transferred using the transferred structures.
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
165
Programming commands
7.3 Functions
Parameters:
cNrFctPar
Number of call parameters = number of structure ele-
ments in FctPar
FctPar
Pointer to a field of structure elements, which contain the
particular call parameter with data type.
FctRet
Pointer to a structure for the function value return with
data type.
Definition of the transfer structure
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;
If the external function is to be developed independently of the platform (Windows, Linux), then
it is not permissible to use the keyword __declspec(dllexport). This keyword is only required
under Windows. For instance, the following macro can be used under Qt:
#ifdef Q_WS_WIN
#define MY_EXPORT __declspec(dllexport)
#else
#define MY_EXPORT
#endif
The function is declared as follows:
external "C" MY_EXPORT void InitConnection
(ExtFctStructPtr FctRet, ExtFctStructPtr FctPar,char cNrFctPar)
If the screens, configured with "Run MyScreens", 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, "Run MyScreens" first searches for the binary
file in the configured directory.
SINUMERIK Integrate Run MyScreens
166
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
7.3.19
Generate code (GC)
Description
The GC (Generate Code) function generates NC code from the OUTPUT method.
Programming
Syntax:
GC("Identifier"[,"Target file"][,Opt],[Append])
Description:
Generating NC code (the GC function can only be used within the NC)
Parameters:
Identifier
Name of the OUTPUT method from which code is generated
Target file
Path name of target file for HMI or NC file system
If the target file is not specified (only possible within Program-
ming Support), the code will be written to the location of the
cursor within the file that is currently open.
Opt
Option for generating comments.
0:
(Default setting) Generate code with comment for the purpose
of recompilability (see also Recompile (Page 184)).
1:
Do not create comments in the generated code.
Note: This code cannot be recompiled (see also Recompile
(Page 184)).
Append
This parameter is only relevant if a target file is specified.
0:
(Default setting) If the file already exists, the old content is
deleted.
1:
If the file already exists, the new code is written at the start of
the file.
2:
If the file already exists, the new code is written at the end of
the file.
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
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
167
Programming commands
7.3 Functions
PRESS(VS1)
D_NAME = "\MPF.DIR\MESSEN.MPF"
GC("CODE1",D_NAME)
; Write NC code from the OUTPUT method to file
\MPF.DIR\MESSEN.MPF:
Cycle123(123, -6)
M30
END_PRESS
Storing the target file
The GC function can only be used within the NC. Use the function CP or MP to move the file. See
the following examples:
; Windows directory
GC("Code","//NC/MPF.DIR/NC1.MPF")
MP("//NC/MPF.DIR/NC1.MPF","d:/tmp/WIN1.MPF")
; LOCAL_DRIVE
GC("Code","//NC/MPF.DIR/NC1.MPF")
MP("//NC/MPF.DIR/NC1.MPF","LOCAL_DRIVE:/WIN_LD1.MPF")
Recompile
• No entry for target file:
The GC function can only be used in the Programming Support 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 "Run MyScreens", an error message is
output when it is executed.
• Entry for target file:
The code generated from the OUTPUT method is entered in 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.
Special features of recompilation
The GC function cannot be called in sub-dialogs because variables originating from master
dialogs can be used in sub-dialogs. These variables would not, however, be available in response
to a direct call.
When generated code is processed manually with the editor, the number of characters for values
created by the code generation program must not be changed. Changing these values would
make it impossible to recompile the code.
SINUMERIK Integrate Run MyScreens
168
Programming Manual, 10/2020, A5E40869575B AD
Programming commands
7.3 Functions
Remedy:
1. Recompile
2. Make change using the configured dialog (e.g. 99 → 101)
3. GC
7.3.20
Password functions
Overview
The following password functions are available:
• Set password
• Delete password
• Change password
HMI_LOGIN function: Set new password
Syntax:
HMI_LOGIN(Passwd)
Description:
A password which sets the current access level is sent to the NCK with the
HMI_LOGIN() function.
Parameters:
Passwd
Password
Example
REG[0] = HMI_LOGIN("CUSTOMER")
; Result = TRUE if the password has been set
successfully, otherwise FALSE
HMI_LOGOFF function: Delete password
Syntax:
HMI_LOGOFF
Description:
The actual access level can be reset using the HMI_LOGOFF function.
Parameters:
- None -
Example
REG[0] = HMI_LOGOFF
; Result = TRUE if the password has been de-
leted successfully, otherwise FALSE
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2020, A5E40869575B AD
169
Programming commands
7.3 Functions
HMI_SETPASSWD function: Change password
Syntax:
HMI_SETPASSWD(AC, Passwd)
Description:
The password of the current level or a lower level can be changed with the
HMI_SETPASSWD function.
Parameters:
AC
Access level
Passwd
Password
Example
REG[0] = HMI_SETPASSWD(4,"MYPWD")
; Result = TRUE if the password has been
changed successfully, otherwise FALSE
7.3.21
Load Array (LA)
Description
The LA (Load Array) function can be used to load an array from another file.
Programming
Syntax:
LA(Identifier [, File])
Description:
Loads an array from a file
Parameters:
Identifier
Name of array to be loaded
File
File in which the array is defined
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
; Extract from file maske.com
DEF VAR2 = (S/*ARR5/"Out"/,"Toggle field")
PRESS(HS5)
LA("ARR5","arrayext.com")
; Load array ARR5 from file arrayext.com
VAR2 = ARR5[0]
; "Above"/"Below"/"Right"/"Left" appears
in the VAR2 toggle field
instead of "Out/In"
SINUMERIK Integrate Run MyScreens
170
Programming Manual, 10/2020, A5E40869575B AD

 

 

 

 

 

 

 

Content      ..     13      14      15      16     ..