01-04-2016 10:04 PM
hi,
i'm making a software for cnc machines and i want to know whether software creeated using labview version 15 will work on touch screen or not,if not how to make that software to work in touch screen.
01-04-2016 10:27 PM
01-04-2016 10:28 PM
@Rizwan00 wrote:
hi,
i'm making a software for cnc machines and i want to know whether software creeated using labview version 15 will work on touch screen or not,if not how to make that software to work in touch screen.
If the touch screen uses standard mouse drivers, you probably don't have to do anything in particular. I would advise making the buttons big enough and spaced far enough apart that they are easy to press.
01-05-2016 08:34 AM
A couple of years ago, one of my students wanted to use LabVIEW to implement a behavioral "Reaching Task", where two lighted buttons were placed in front of a subject, one lights up, and he has to reach and push it if it is Green, not reach if it is Red, and if it changes from Green to Red while reaching, stop the reach.
Rather than get out wood, hammer, drills, buttons, lights, etc., he did this in LabVIEW, with big Boolean Controls as the buttons and a pressure-sensor overlay on a computer monitor (this was before Touchscreens were so popular). The sensor responded as a Mouse, with coordinates, Mouse Down on touch, Mouse Up on release.
Then Dell announced the All-in-One Vostro, with a Touch Screen. He got one, we ported the code, and ... Mouse Down and Mouse Up events absolutely failed in LabVIEW! Why? The Microsoft TouchScreen Mouse Driver uses the length of touch to distinguish between click and right-click, among other things.
We managed (by screwing around with some Windows settings and other things) to "make it work", and he was able to finish his project and graduate. At the time, I reported this to NI (and I think there's a Post about this that I placed somewhere on this Forum). Of course, since this time, we have Windows 8 (very Touch Screen happy), new versions of LabVIEW, and I've not tried this code to see if there are still "Touch Issues", but be careful -- The Finger Is Not A Mouse!
Bob Schor
01-05-2016
09:01 AM
- last edited on
04-11-2025
05:06 PM
by
Content Cleaner
Yeah, I think there are two types of touchscreen drivers and you have to be wary about each:
1) The touchscreen emulates a mouse pointer - commonly with a tap as a left click, and a long touch for a right click. If it's this type - you won't get an event until the driver has finished determining if it was a tap or a long press (i.e. when you lift your finger). I wasn't aware of the type that Bob_Schor is referring to - but I guess that falls under this option but with different parameters.
2) Modern touchscreens have multitouch and I think you have to interface with the appropriate windows DLL (and/or maybe .NET?) to get the information. There is a (paid) toolkit that does the hard work for you here: https://www.ni.com/en-us/shop/product/touchscreen-toolkit-for-labview.html