Author Topic: How to use Touch Panels  (Read 11099 times)

Offline LBee11

  • PLUS+1 Developer
  • ***
  • Posts: 26
  • Karma: +1/-0
How to use Touch Panels
« on: July 04, 2017, 11:10:50 PM »
How do you set up a touch panel on a DP720? I want to put a touch panel over an image and when the image is pressed (or touch panel rather), a boolean output is active.


When wiring a boolean output signal to "Output.Signal" of the touch panel, I get an error saying the data type is incorrect.


There is no help for a touch panel so I'm at a bit of a loss how these are supposed to work.


Thanks

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: How to use Touch Panels
« Reply #1 on: July 05, 2017, 09:38:07 AM »
The output signal from the touch panel is U16 and will be one of the following values:-

Touch State
0 = Idle State (No Touch)
1 = Touch Active
2 = Touch Release (Active for only one loop)
3 = Double Click
4 = Long Press
5 = Swipe Left
6 = Swipe Right
7 = Swipe Up
8 = Swipe Down

There is some info on the touch functionality starting at page 514 in the user manual (Guide version 9.1.6) and you can find some info in the API specification document for your screen.

Alastair

Offline jashom1

  • PLUS+1 Expert
  • ****
  • Posts: 80
  • Karma: +6/-0
Re: How to use Touch Panels
« Reply #2 on: July 06, 2017, 11:43:27 PM »
Hi,

When ever you connect a touch output, make sure you select the DataType for that signal in the inspector tab.  Usually I use U16 as I think it gets upset if it's smaller than this.

Because I am not interested in swiping or log presses, I usually test for not zero on the signal.

Have fun!

John.

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 127
  • Karma: +1/-0
Re: How to use Touch Panels
« Reply #3 on: January 14, 2021, 05:29:52 AM »
Hi
In my case I want to use Swipe Left  but Touch state output is 0 or 1, Please can you help
Thanks
Touch State
0 = Idle State (No Touch)
1 = Touch Active
2 = Touch Release (Active for only one loop)
3 = Double Click
4 = Long Press
5 = Swipe Left
6 = Swipe Right
7 = Swipe Up
8 = Swipe Down

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 201
  • Karma: +37/-1
Re: How to use Touch Panels
« Reply #4 on: January 14, 2021, 09:08:50 AM »
How are you viewing the state signal?
Any value higher then 1 will only be active for a single program loop so you may not see if directly viewing it on the screen or via the service tool.


Also the swipe states trigger as you release the touch so the sequence is: -
  • Touch state = 1
  • Swipe
  • Release state = 5 to 8 for 1 loop.


 

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 127
  • Karma: +1/-0
Re: How to use Touch Panels
« Reply #5 on: January 14, 2021, 05:13:33 PM »
Hi,

Please any one have any sample touch screen example ( different than touch active) .  I had see in forum without result.

Thank you in advance.