Configuring SINUMERIK Operate Easy Screen Program Selection

David Krause12 min read
HMI / SCADASiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Configuring SINUMERIK Operate Easy Screen Program Selection on 828D/840D

1. Problem Overview

Operators on shop-floor SINUMERIK 828D and SINUMERIK 840D sl controllers frequently need to switch between a small set of recurring part programs (.MPF files) without navigating through the full directory tree, part program manager, or HMI soft-key hierarchy. The shipped Easy Screen runtime includes only a single-program launch behavior, so a custom dialog must be built that:

  • Displays a numbered list of named part programs.
  • Allows the operator to scroll and pick a single entry.
  • Loads the corresponding .MPF from a workplan directory (.WPD).
  • Optionally starts execution immediately.

Easy Screen provides no native program-list widget, so the dialog must be constructed from the supported primitives: a DEF TXT indirect text variable, vertical soft-keys (VS) for navigation, and horizontal soft-keys (HS) for commit actions. The SP() function is used to load the selected program.

Scope: This reference applies to SINUMERIK Operate on the NCU/PCU platform of 828D and 840D sl running HMI software versions V4.5 SP2 through V4.95 (and equivalent HMI Pro on PC). Easy Screen syntax has been stable since V4.5; later versions add CP (copy) and CV (case) but the variables, SP(), LM(), and PRESS/END_PRESS blocks described here are unchanged.

2. Prerequisites

Item Requirement
Controller SINUMERIK 828D (PPU 16x.3 / 26x.3) or 840D sl (NCU 710.3 / 720.3 / 730.3)
HMI software Operate V4.5 SP2 or later (V4.7 / V4.8 / V4.95 confirmed)
Access level for editing Easy Screen Manufacturer (password 1) or Service (password 2) via the Setup menu
Editor SinuTrain, HMI Explorer, or the HMI's built-in text editor on the CF card
Storage path /siemens/sinumerik/hmi/template/easyScreen/ for screen source
Program directory A workplan directory (e.g. PROG.WPD) on /WKS.DIR/
Files in scope PROG1.MPF, PROG2.MPF, PROG3.MPF (or any number of .MPF files)
NC variable R-variable R267 (or any free GUD/R variable) for the index

Verify access level before editing: Setup → Password → enter Manufacturer password. The CF card must be write-enabled in the NCU's Setting screen or via scard command in the service menu.

3. Easy Screen Architecture

Easy Screen files are plain-text definitions with the extension .eas (compiled) or .com (source). The runtime parses them on power-up if they reside in the configured template path. Three constructs are used in the program-selection pattern:

Construct Purpose Typical use
DEF TXT Indirect text driven by a numeric NC variable Display "Test Program N" based on R267
VS (Vertical Soft-Key) Up/Down list selector on the right edge of the screen Cycle through entries 0..2
HS (Horizontal Soft-Key) Bottom action bar with up to 8 keys Commit / Start / Back
PRESS / END_PRESS Code block executed when a soft-key is touched Branch on selected index
LM("name") Load a different Easy Screen Navigate to sub-screen PROG
SP("path") Select the active part program Load PROG1.MPF into the channel

4. Step 1: Define the Indirect Text Variable

The DEF TXT statement binds a numeric NC variable to an indexed string table. The runtime inspects the variable and shows the matching entry. The syntax is:

DEF TXT<id>=(i/* <ncvar>=<v0>="string0",<v1>="string1",... <vn>="stringN" //
            ,/<default>//"<fallback>"/,,/<X>,<Y>,<W>,/<attr>,<type>)

For a three-program picker driven by $R[267]:

DEF TXT1=(i/* 0="Test Program 1",1="Test Program 2",2="Test Program 3" //,
          ,,"/wr1//"$R[267]"/,,/185,40,200,/0,2)

Parameter breakdown:

Field Value Meaning
i input Field is read/write, accepts operator touch
0="Test Program 1" index = string When the linked variable equals 0, display "Test Program 1"
/wr1/ format mask Write/read integer, 1-character width
"$R[267]" NC variable Index source; bound to global R-variable 267
185,40 X, Y Top-left pixel position on the Easy Screen canvas (default 640x480)
200 Width Field width in pixels
0,2 attr, type Attribute 0 (normal), type 2 (single-line text)

Any integer NC variable may be used. GUD (Global User Data) variables such as GUD_1[0] are also valid and recommended for production to avoid clashes with reserved R-numbers. Keep R-numbers below 100 reserved for Siemens defaults; use 200+ for application logic.

5. Step 2: Configure a Vertical Soft-Key for Selection

Vertical soft-keys live on the right side of the screen and let the operator increment/decrement the linked variable. The declaration uses VS<id>=("label%nstep") where %n inserts a newline and step is the delta applied to the variable when the key is pressed.

VS1=("Program%n1")
PRESS(VS1)
    TXT1.val=0
    LM("PROG")
END_PRESS

Behavior:

  1. Operator touches VS1 on the right edge of the screen.
  2. Runtime executes the PRESS(VS1) block.
  3. TXT1.val=0 resets the indirect text index to 0 (so the picker starts clean).
  4. LM("PROG") loads the Easy Screen file PROG.eas from the template path.
Tip: If you want the vertical key to scroll through entries rather than reset, increment the variable instead: TXT1.val = TXT1.val + 1 and wrap with an IF TXT1.val > 2 THEN TXT1.val = 0 ENDIF.

6. Step 3: Configure the Horizontal Soft-Key for Commit

Horizontal soft-keys appear on the bottom bar (8 keys max). The commit key inspects the current value of the indirect variable and dispatches the matching program via SP():

HS1=("Start%nProgram")
PRESS(HS1)
    IF TXT1==0
        SP("\WKS.DIR\PROG.WPD\PROG1.MPF")
        EXIT
    ELSE
        IF TXT1==1
            SP("\WKS.DIR\PROG.WPD\PROG2.MPF")
            EXIT
        ELSE
            IF TXT1==2
                SP("\WKS.DIR\PROG.WPD\PROG3.MPF")
                EXIT
            ENDIF
        ENDIF
    ENDIF
END_PRESS

Each branch terminates with EXIT so the runtime does not fall through to the next test. This pattern is the only practical way to bind a discrete list to a hard-coded path in Easy Screen; there is no array or loop construct in the language.

7. Step 4: File-System Layout

The SP() function takes a fully qualified NCK path. On 828D and 840D sl, programs live under /WKS.DIR/<workplan>.WPD/<program>.MPF. The Windows-style backslashes are required by the path interpreter:

Component Description Example
\WKS.DIR\ Root of the active workpiece directory tree Fixed
PROG.WPD Workplan directory containing the part programs Created once, contains .MPF files
PROG1.MPF ... PROG3.MPF Main part programs Plain-text NC programs

To create the workplan directory from the operator panel: Program Manager → WKS.DIR → New Directory → name = PROG. Copy or paste your .MPF files into it. The path is case-sensitive on NCU firmware ≥ V4.8.

8. Step 5: The Full Screen Source

The complete file /siemens/sinumerik/hmi/template/easyScreen/PROG.eas for a three-program picker:

;--------------------------------------------------------------
; SINUMERIK Operate Easy Screen - Program Selector
; Compatible with 828D and 840D sl, HMI V4.5 SP2 or later
; Author: shop-floor template
;--------------------------------------------------------------

DEF TXT1=(i/* 0="Test Program 1",1="Test Program 2",2="Test Program 3" //,
          ,,"/wr1//"$R[267]"/,,/185,40,200,/0,2)

VS1=("Program%n1")
PRESS(VS1)
    TXT1.val=0
    LM("PROG")
END_PRESS

HS1=("Start%nProgram")
PRESS(HS1)
    IF TXT1==0
        SP("\WKS.DIR\PROG.WPD\PROG1.MPF")
        EXIT
    ELSE
        IF TXT1==1
            SP("\WKS.DIR\PROG.WPD\PROG2.MPF")
            EXIT
        ELSE
            IF TXT1==2
                SP("\WKS.DIR\PROG.WPD\PROG3.MPF")
                EXIT
            ENDIF
        ENDIF
    ENDIF
END_PRESS

HS8=("Back")
PRESS(HS8)
    EXIT
END_PRESS

Save the file to the CF card, restart HMI (or use Setup → HMI → Reload), then navigate to the Easy Screen via the operating-area switch key.

9. Extending to More Than Three Programs

For an N-entry picker, declare each entry as a separate DEF TXT on the same canvas with offset Y coordinates, or stack them in a single column by adjusting the 40 pixel base offset in 24-pixel increments. The PRESS block must contain a corresponding IF / ELSE IF chain. Example for five programs:

HS1=("Start%nProgram")
PRESS(HS1)
    IF TXT1==0
        SP("\WKS.DIR\PROG.WPD\PROG1.MPF")
    ELSE
        IF TXT1==1
            SP("\WKS.DIR\PROG.WPD\PROG2.MPF")
        ELSE
            IF TXT1==2
                SP("\WKS.DIR\PROG.WPD\PROG3.MPF")
            ELSE
                IF TXT1==3
                    SP("\WKS.DIR\PROG.WPD\PROG4.MPF")
                ELSE
                    IF TXT1==4
                        SP("\WKS.DIR\PROG.WPD\PROG5.MPF")
                    ENDIF
                ENDIF
            ENDIF
        ENDIF
    ENDIF
    EXIT
END_PRESS

For more than 10 programs, switch from a manual IF tree to a PLC-driven program selection (next section) which scales linearly without source bloat.

10. PLC Program-Selection Alternative

For installations where the operator screen is built on the PLC rather than Easy Screen, Siemens provides program selection from the PLC. The PLC writes a job number into the NCK interface, the NCK fetches the matching program from SPF_DIR, and reports back the active program. The relevant interface is the PI service SELECT (PI index 0x05 / 5) accessed via FB9 or FB11 in the Siemens PLC toolbox.

Triggering from the PLC avoids the per-entry IF chain entirely and is the recommended path when the picker exceeds roughly ten entries or when programs must be selected based on a barcode scan or production order number.

11. Reference: Soft-Key Limits and Naming

Key type Maximum count Index range Position on screen
HS - Horizontal Soft-key 8 HS1 .. HS8 Bottom bar
VS - Vertical Soft-key 8 VS1 .. VS8 Right edge
SS - Side-soft-key (840D sl only) 8 SS1 .. SS8 Left edge of dialog

Soft-key labels may contain up to two lines, separated by %n. Special characters %, ",\ must be escaped with a leading \.

12. Reference: SP() Function Semantics

Parameter Description
path Fully qualified NCK path. Accepts Windows-style \ separators or forward slashes /. UNC-style //server/share is not supported.
Return value None. SP() is asynchronous; the program becomes active on the next NC start signal.
Active channel Must be the channel that will execute the program. Channel is determined by the active operating-mode area.
Reset behavior SP() issues an implicit reset if the channel is in AUTO mode with a program already loaded.
Read-only mode If the channel is in READ ONLY (program-test without NC start), SP() still works but does not overwrite the active block display until reset.

13. Reference: LM() Screen Loading

LM("name") loads the Easy Screen file name.eas from the active template directory. The name is case-insensitive on HMI < V4.7 and case-sensitive on HMI ≥ V4.7. To chain screens without recursion, use EXIT to leave the current PRESS block before calling LM() if the target screen is the same one (loop); otherwise LM() replaces the visible screen immediately.

14. Commissioning Procedure

  1. Insert a USB or CF card with the new PROG.eas file.
  2. From the operator panel, navigate to Setup → Password and enter the Manufacturer password.
  3. Open Start-up → HMI → Explorer (or use WinSCP / PuTTY against the NCU at port 22 / 23).
  4. Copy PROG.eas to /siemens/sinumerik/hmi/template/easyScreen/.
  5. Power-cycle the HMI or select Setup → HMI → Reload Easy Screen.
  6. Switch to the operating area where Easy Screen is exposed (typically a custom area; activate it under Setup → Operating Areas).
  7. Touch VS1: confirm the screen re-displays with PROG1 highlighted.
  8. Touch HS1: confirm the active program in the NC block display switches to PROG1.MPF.
  9. Press NC Start: confirm the program executes.

15. Verification Checklist

Step Expected result Pass criteria
Load Easy Screen "Test Program 1" is shown when R267=0 Text matches the index variable
Vertical key Resets R267 to 0 and reloads the screen Operator cannot get stuck in an unknown state
Horizontal commit key with TXT1==0 Active program display changes to PROG1.MPF Block display reads the new file
Horizontal commit key with TXT1==1 Active program display changes to PROG2.MPF Branch executes correctly
Horizontal commit key with TXT1==2 Active program display changes to PROG3.MPF Branch executes correctly
NC Start after SP() Program runs end-to-end No alarm 15390 "Channel %1 program %2 cannot be selected"
Power-cycle Selection persists or defaults cleanly No crash dialog on boot

16. Troubleshooting Matrix

Symptom Root cause Remedy
Easy Screen does not appear in the operating-area menu Operating area not activated in Setup → Operating Areas Tick the Easy Screen area, restart HMI
Soft-key press does nothing Forgot END_PRESS or used the wrong HS/VS index Recompile and verify pairings
SP() returns "File not found" Path uses forward slashes or wrong workplan name Use backslashes and confirm PROG.WPD exists
Alarm 15390 "Program selection failed" Channel not in RESET or wrong mode Issue RESET, then re-touch the soft-key
Index variable out of range R267 has no matching entry in the indirect-text list Initialize R267 to 0 before opening the screen, or add a fallback string
Screen white-screens after edit Syntax error in .eas file Check the HMI log under /siemens/sinumerik/hmi/log/
TXT displays raw index number Indirect-text format string is malformed Re-verify the i/* ... // section uses double quotes
PLC-driven selection overrides Easy Screen selection PLC writes to the same program list simultaneously Disable PLC SELECT service while operator screen is active

17. Safety Notes

Operator protection: The SP() call must not be issued while the spindle is running, the axes are moving, or a tool change is in progress. Add an IF guard on the channel state if needed: IF $AC_STAT == 0 THEN SP(...) ENDIF where $AC_STAT == 0 means the channel is idle.
Password discipline: Do not distribute the Manufacturer password to operators. Use a Service-level password if the operator must reload screens during a shift.
Backup: Keep a copy of the PROG.WPD directory on the network share; Easy Screen edits and .MPF changes are not version-controlled by the HMI.

18. Related Constructs and Edge Cases

Dynamic index via arithmetic: The TXT1.val property accepts expressions, so you can drive the picker from a calculation. Example: TXT1.val = $AA_IM[X] / 100 binds the picker to an analog input scaled to the integer index.

Reading vs writing: Replace i (input) with o (output-only) on the DEF line if the index must be display-only and not user-editable.

Multi-channel systems: On 840D sl with multiple channels, use SP("\WKS.DIR\PROG.WPD\PROG1.MPF",1) with a second argument indicating the channel number when the picker is invoked from a non-default channel.

Localization: The string table accepts Unicode on HMI ≥ V4.7. Use UTF-8 encoded source files and the /utf8 directive in the .eas header.

19. Frequently Asked Questions

Which Siemens controllers support this Easy Screen program-selection pattern?

The pattern works on SINUMERIK 828D (PPU 16x.3 / 26x.3) and 840D sl (NCU 710.3 / 720.3 / 730.3) running HMI Operate V4.5 SP2 or later. Earlier HMI versions lack the indirect-text indirection and the SP() function.

Why does my TXT variable always show a number instead of a name?

The indirect-text format string is malformed. Confirm the syntax reads i/* 0="Test Program 1",1="Test Program 2" //,, with double quotes around the strings and the trailing double slash. A missing comma between sections forces the runtime to fall back to numeric display.

How do I add a fourth program without rewriting the IF tree?

Declare a new DEF TXT1 entry by appending 3="Test Program 4" to the existing format string, and add an ELSE IF TXT1==3 branch that calls SP("\WKS.DIR\PROG.WPD\PROG4.MPF"). For more than ten programs, switch to the PLC SELECT service to avoid source-code growth.

What is the maximum number of programs an Easy Screen picker can list?

Practically eight vertical soft-keys and eight horizontal soft-keys, so a single screen can support 8 visible entries before paging logic is required. The IF tree in the commit handler has no formal limit but source readability degrades above about ten branches.

Can I trigger NC Start automatically after SP() in Easy Screen?

Easy Screen cannot issue NC Start directly. Use PLC logic to monitor the active program change and pulse the NC-Start PLC interface (DB380x.DBX0.1 on 840D sl) when the program matches a selected picker index. This decouples the HMI from motion commands and keeps the operator safe.

Back to blog