Programming
2.3 Variables
Expanding the user interface
2-36
Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
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) << "th error"
;Result: "This is the 11th error"
● Treatment of numerical values:
VAR13.VAL = "Error " << VAR14.VAL << ": " << $T80001 << $T80002
;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]
2.3.14
CURPOS variable
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.
Summary of Contents for SINUMERIK
Page 6: ...Preface Base software and HMI Advanced 6 Commissioning Manual 03 2009 6FC5397 0DP10 3BA0 ...
Page 96: ......
Page 562: ...Index Expanding the user interface Index 4 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 ...
Page 566: ...Table of contents Online Help HE1 4 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 ...
Page 598: ...Online Help HE1 Commissioning Manual 11 2006 6FC5397 0DP10 0BA0 36 ...