IMDTouchKnowledge BaseShop main store

How-to

Select a Value by Touch and Change It With HMI Function Keys

HMI and touchscreens Published 6 min read

Short answer

WinCC has no switch that hides the keypad from an input-capable field, so split the job: leave the numeric fields in Output mode, let a touch button write a selector tag, and give the increment and decrement function keys actions that change the setpoint that tag names. Tapping then selects without a keypad, and only the highlighted value moves.

On this page
  1. How the I/O field Mode property behaves
  2. A button selects, a key pair adjusts
  3. Configure the fields and the selection buttons
  4. Route the function keys through the selector
  5. Worked example: one key pair, three RPM setpoints
  6. Test the finished interaction on the bench
  7. Questions asked

No property in WinCC keeps an input-capable I/O field touch-selectable while suppressing the on-screen keypad: a field you can tap for entry opens the keypad, and a field that never opens it is in Output mode and cannot take focus at all. So split the job in two. Leave every numeric field in Output mode, let a touch button write a selector tag that names the setpoint, and configure the panel's function keys to change the one value that tag points to. The operator taps a value to select it — nothing opens — and the increment and decrement keys move only the highlighted value.

How the I/O field Mode property behaves #

The field's Mode property offers three settings, and the behavior you want sits on both sides of it. In WinCC Unified, the documentation lists Mode among the field's properties, ships it preset to Output, and describes that mode as displaying values only. The same three modes exist in TIA Portal projects for Basic and Comfort panels:

Mode What a tap does at runtime Use it for
Input Opens the keypad for entry Values operators type in full
Output Nothing: display only, no focus Values changed by keys or by the PLC
Input/output Shows the value, then opens the keypad Both display and entry

Selection is the casualty. Tap-to-select belongs to the modes that also pop the keypad, and Output mode — where the value can be driven by keys without any popup — refuses focus on the touch screen. The mirror-image fault, an IO field that will not accept input on the panel, has the same root, so Mode is the first property to check in either direction.

The decision: stop trying to make one field do both jobs. Move selection off the field and onto a button.

A button selects, a key pair adjusts #

Each displayed setpoint gets a touch button — beside the value, or with the output field overlaid on the button face so the tap lands on the button. Pressing the button writes an index into a selector tag, and three things read that one tag: the highlight animation on the button, the PLC logic that moves the setpoint, and your limit clamp. The function keys never act on a field at all; they act on the tag behind the Output-mode field, which is why the field's mode stops mattering once the keys work on tags.

Keep the selector tag in the PLC rather than in the panel, so the screen and the control logic always read one source of truth.

Configure the fields and the selection buttons #

  1. Set each numeric field's Mode to Output, under the field's General properties. From then on, no tap on the number opens the keypad, and the number cannot receive focus.
  2. Declare the selector tag in the PLC. Illustrative name SelRpm, type Int, initial value 0, with one value per displayed setpoint: 0, 1, 2.
  3. Place a button on each displayed value, sized so a tap on the number lands on the button.
  4. On each button's press event, assign the function that writes its index to SelRpm: button 1 writes 0, button 2 writes 1, button 3 writes 2.
  5. Animate each button's border or background color from SelRpm, so the active value is obvious at a glance.
  6. Leave the fields displaying engineering units and do any scaling in the PLC, so what the operator reads is what the logic commands.

Route the function keys through the selector #

  1. Assign each key a press event that sets a bit — illustrative names JogUp and JogDown, type Bool, initial value 0 — and a release event that resets the same bit, so every press gives the PLC a clean edge.
  2. In the S7-1200, add the step to the setpoint that SelRpm points to on each rising edge of JogUp, and subtract it on each rising edge of JogDown. A compare or case structure over SelRpm keeps the routing readable.
  3. Clamp every setpoint to the machine's documented limits in that same PLC block, so a held key can never command an out-of-range speed.
  4. If a key press triggers a screen change or an action you never assigned, a hidden object on that screen usually owns the same key: find the hidden object behind a function key that does the wrong action.
  5. On a KTP400, an LED assignment area that appears grayed while you configure the key is a separate fault with its own fix — resolving a grayed function-key LED field — not a sign that this pattern is unsupported.

Worked example: one key pair, three RPM setpoints #

The numbers below are an illustrative example; take your step size and limits from the machine data sheet. Three Int setpoint tags: RpmSet1 at 760 RPM, RpmSet2 at 540 RPM, RpmSet3 at 300 RPM. Step = 10 RPM per press, limits 200 RPM to 1200 RPM.

Raise RpmSet1 from 760 RPM to 800 RPM:

  • 800 − 760 = 40 RPM to travel
  • 40 RPM ÷ 10 RPM per press = 4 presses of the increment key
  • Landing value 800 RPM is below the 1200 RPM limit, so the clamp never engages

Now the overrun an engineer checks. An operator leaning on the key for 50 presses commands 760 + (50 × 10) = 1260 RPM; the PLC clamp holds the tag at 1200 RPM, so the overshoot never reaches the drive — which is exactly why the clamp belongs in the PLC and not only in the key configuration.

Downward, from 300 RPM, 11 presses command 300 − (11 × 10) = 190 RPM; the clamp holds 200 RPM.

Decision: with a 10 RPM step, routine corrections take single-digit presses and the clamp absorbs a held key. If your operators routinely trim by 100 RPM, choose a 25 RPM step and the same move takes 4 presses instead of 10 — 40 % of the press count. Keep one field in Input/output mode only where typing an exact number is worth the keypad.

Test the finished interaction on the bench #

  1. With the machine in a safe state and the drives inhibited, run the screen against the PLC with the real tags, or against bench test tags if the PLC is still in development.
  2. Tap each button in turn: the highlight moves to that value, and no keypad appears anywhere on the screen.
  3. With SelRpm at 0, press the increment key 4 times: RpmSet1 must read 800 RPM (760 + 4 × 10) while RpmSet2 stays 540 RPM and RpmSet3 stays 300 RPM.
  4. Change the selection mid-test, then press each key once: only the newly selected value moves.
  5. Hold each key past a limit: the tag stops at 1200 RPM or 200 RPM and does not wrap.
  6. After the final download, repeat steps 2 through 4 once on the machine before handover.

Questions asked

Can I leave one field with the on-screen keypad for full numeric entry?

Yes. Mode is set per field, so convert only the setpoints you want key-adjusted and leave any field in Input or Input/output mode where typing a full number is useful. That field will still open the keypad the moment it is tapped, so keep it off the screen area operators use for quick jogging, or the keypad will interrupt the key workflow.

Should the selector tag live in the panel or in the PLC?

Put it in the PLC, with the buttons, the highlight animation, the key logic and the limit clamp all reading that one tag. A panel-local tag also works, but a panel download or restart can leave the screen highlighting one value while the control logic still holds another, and that mismatch is exactly what a single PLC tag prevents.

How do I choose the increment per key press?

Match the step to the coarsest adjustment operators make routinely. In the worked example, 10 RPM per press moved 760 RPM to 800 RPM in 4 presses, because 40 ÷ 10 = 4; a 1 RPM step would need 40 presses for the same move. If a held key repeats on your panel, measure the repeat rate on the bench and treat it as part of the step-size choice.

Does this pattern work on panels other than a KTP400 Basic?

The pattern relies only on generic objects — an Output-mode field, a button that writes a tag, and key press events — so it carries to any WinCC-engineered panel with programmable function keys. What changes between engineering versions is the exact name of the write and increment functions, so check those names in your version before wiring the keys.

Keep reading

  • Selection guide

    How to Select Lightweight HMI Software for Modbus I/O Control

    Select on three gates in order: a driver that speaks Modbus RTU (and Modbus TCP if the LAN path is required), a tag license at least 20 percent above your counted total, and a runtime that runs the exported project on a clean PC. A 56-device floor plan counts 154 tags, so a 150-tag edition already fails. Prove one floor plan, one popup, one live indicator and one write before you pay.

    HMI and touchscreens

  • How-to

    How to Enter Configuration Mode on a Touch HMI

    On a touch-only operator terminal you enter Configuration Mode by cycling power and pressing the small filled box that appears briefly in the lower-right corner during startup, while hold-both-arrow-keys instructions apply to keypad terminals with physical keys. An application button labeled GoTo Config. Screen reaches the same menu without a reboot.

    HMI and touchscreens

  • Troubleshooting

    Fixing a Missing On-Screen Keyboard From Scripted Input Dialogs

    The scripted input dialog and the touchscreen keyboard are both modal, and one modal dialog cannot open over another, so the field inside the prompt never raises the keyboard. Replace the call with a popup window of palette inputs, or wrap it in a function that branches on touch mode and calls system.gui.showTouchscreenKeyboard or system.gui.showNumericKeypad.

    HMI and touchscreens