Siemens SINUMERIK Commissioning Manual page 386

Sinumerik 840di sl/840d sl/840dbase software and hmi advanced
Hide thumbs Also See for SINUMERIK:
Table of Contents

Advertisement

Programming
2.3 Variables
Editing strings:
● Chaining of strings:
● Deleting a variable:
● Setting a variable with a text variable:
● Data type matching:
● Treatment of numerical values:
● Quotation marks within a string:
● System or user-variable strings dependent on variable content:
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.
2-36
VAR12.VAL = VAR1 << " Error."
VAR10.VAL = ""
VAR11.VAL = VAR1.VAL
VAR13.VAL ="This is the " << (VAR14 - VAR8) << "th error"
;Result: "This is the 11th error"
VAR13.VAL = "Error " << VAR14.VAL << ": " << $T80001 << $T80002
;Result: "Error 15: This is an alarm text"
IF VAR15 == "Error"
VAR16 = 18.1234
;Result: VAR16 equals 18.1234,
;if VAR15 equals "Error".
ENDIF
VAR2="Hello, this is a "" Test"
;Result: Hello, this is a " Test
VAR2.Var = "$R[" << VAR8 << "]"
;Result: "This is an error"
;Result: Blank string
;Result: "This is an"
;Strings in IF statement
Commissioning Manual, 11/2006, 6FC5397-0DP10-0BA0
;Result: $R[4]
Expanding the user interface

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents