Download project
This visualization example shows how to evaluate and handle touch events of MultiTouch displays in CODESYS.
This visualization example shows how to evaluate and handle touch events of MultiTouch displays in CODESYS.
If visualization is used on a MultiTouch display, then an additional control concept is available to the user.
Apart from the usual mouse and keyboard events, gestures and touch events are evaluated and processed.
Supported gestures
Several elements in a visualization screen can be actuated at the same time with several fingers. Thus it is possible to develop a two-hand control or a virtual mixer in which several sliders can be actuated at the same time.
The IGestureEventHandler
interface of the VisuElems.VisuElemBase
library enables IEC 61131-3 code to
be implemented in order to react to gestures. A gesture event can be intercepted and consequential actions can
be implemented.
The following clients can execute visualization on a MultiTouch device
The project MultiTouchExample.project
shows the usage of the interface IGestureEventHandler2
.
The function block GesturesHandler
implements the interface IGestureEventHandler2
. At first the event
handler must be registered at the event manager. This is done in the method FB_Init
of the function block
GesturesHandler
. The methods HandleFlickGesture
, HandlePanGesture
and HandleTouchEvent
will be
called if a corresponding event occurs.
The example contains following functions:
Scrolling: Scrolling inside of frames and tab controls
Multiple inputs: Simultaneous control of input elements
Two-hand inputs: The example demonstrates the input handling with two hands
Handling in IEC: Event handling of touch events in IEC 61131-3; the example displays the current touch points at the screen
Flick detection: Counts the horizontal and vertical flick events
System requirements and restrictions | Info |
---|---|
Programming System | CODESYS Development System Version 3.5.14.0 or higher |
Runtime System | CODESYS Control Version 3.5.14.0 |
Required Accessories | - |