08/2005 Expanding the Operator Interface (BE1)
3 Syntax
© Siemens AG, 2005. All rights reserved
SINUMERIK 840D sl/840D/840Di/810D HMI Installation and Start-Up Guide (IAM) – 08/2005 Edition
BE1/3-105
FOC - Focus
The input focus (current active I/O field) in a screen form is controlled by the FOC
function. FOC can be read and written.
FOC
When FOC is read, the result is the name of the focused variable.
IF FOC == "Var1" ;Read focus
REG[1] = Var1
ELSE
REG[1] = Var2
ENDIF
When FOC is written, 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.
The FOC function may not be initiated as a result of navigation event. The cursor
may only be moved in softkey press blocks, change blocks, …
The response to cursor left, right, up, down as well as PGUP, PGDN are
permanently pre-defined.
Note
The FOC function cannot be applied to variables with input mode wr = 0 and
wr = 4 or to Help variables.
FOC = "Var1" ;Input focus is assigned to variable 1
FOC = 3 ;Input focus is assigned to the 3rd screen
;form element with WR ≥ 2.
Entry
The ENTRY variable can be used to check by what method a screen form has
been called.
ENTRY
The result of the scan can be:
0 = No programming support
1 = Programming support (screen form called under programming)
2 = Programming support + default from previous form screen
(Subscreen form)
3 = Programming support + recompilation
4 = Programming support + recompilation with generated
comments and # characters
5 = Programming support + recompilation with generated comments,
but no # characters
The ENTRY variable is a read only variable.
IF ENTRY == 0
DLGL("The screen form was not called under Programming")
ELSE
DLGL("The screen form was called under Programming")
ENDIF