EasyManuals Logo
Home>Siemens>Control Unit>SINUMERIK

Siemens SINUMERIK Commissioning Manual

Siemens SINUMERIK
736 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #386 background imageLoading...
Page #386 background image
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.

Table of Contents

Other manuals for Siemens SINUMERIK

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK and is the answer not in the manual?

Siemens SINUMERIK Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK
CategoryControl Unit
LanguageEnglish

Related product manuals