Skip to main content
Version: 7.9

Using Touch Screen Mode

Inductive University

Using Touchscreen Mode

Watch the video

It is very common to deploy Ignition Vision projects on touchscreen computers, such as industrial panel-PCs acting as Human Machine Interface (HMI) or Operator Interface Terminal (OIT). In situations where the PC does not have a keyboard attached, Touch Screen Mode can be used to assist with user-input. For this reason, all of the input components in Vision are touch-screen-enabled.

Under normal circumstances, you don't have to do anything special other than enable Touch Screen Mode on your project. This will allow the operator to activate Touch Screen Mode when they log in. You can also enable Touch Screen Mode via scripting.

Vision Client Touch Screen Mode

Touch-screen-enabled input components all have an expert level property called Touch Screen Mode. This property has three settings:

  • Single-Click: The keyboard will appear on a single click.
  • Double-Click: They keyboard will only appear after a double-click.
  • None: Disable touch screen support on the component. The component will no longer invoke the touch screen keyboard.

Enabling Touch Screen Mode

Touch Screen support is built into Ignition. Turn it on through the Project Properties or scripting.

  1. In the Designer, from Project Browser, double-click on Project > Properties, or from the top menus go to Project > Properties. The Project Properties window is displayed.

  2. Go to Client > General page, to see the Touch Screen options.

    Project Properties Touch Screen

    PropertyDescription
    Touch Screen Mode EnabledBy default, this is enabled, which means an operator can activate the mode on the startup screen. All Clients can operate in touch screen mode. When Touch Screen mode is enabled, clicking on numeric and text entry boxes will pop up on-screen keyboards that can be used for data entry. You can optionally set the width of any scrollbars (number of pixels wide/tall).
    Touch Screen Mode Active on StartupThis option sets the Clients to start up with the touch-screen mode active.

These settings are helpful for mixed-use projects, that is, those that are launched on both touch screen devices and traditional computers and laptops.

Invoke the Touch Screen Keyboard with Scripting

To handle touch screen logic via scripting, the general pattern is to respond to a mouse event, popup up a keyboard, and then set the component's value to whatever was entered in the keyboard. For example, for a text field, you would write a script like this:

if system.gui.isTouchscreenModeEnabled():
currentText = event.source.text
newText = system.gui.showTouchscreenKeyboard(currentText)

See also: system.gui.setTouchscreenModeEnabled