This guide is intended to help configuring the touch screen device with NI Linux Real Time.
Hardware
The hardware used is:
Toch Screen Monitor NI TSM-1015
CompactRIO NI 9035/9030.
Software
NI LabVIEW 2015 SP1 - Embedded Control and Monitoring Suite
NI Linux Real-time 4.0
Description of the issue
Configuring touch screen used to be an out of the box feature, but we realized it has been a trouble, specially after using the 2015 LabVIEW version or more specifically 2015 SP1.
As it first arrived the NI TSM-1015 used to work right away, just after running a couple of commands as described in Calibrating Your Touch Screen Monitor in NI Linux Real-Time, in which it demonstrates how to calibrate your monitor.
Unfortunately, this solution no longer works with the current software version.
Solving the problem
First of all, we needed to know if it was a hardware problem, so we plugged the monitor in a laptop running Windows 7. It was recognized as a Penmount 6000 Usb Device. In Linux you can find these information using dmesg or other tools.
We installed PenMount USB Driver for Windows and tested the calibration.
http://www.salt.com.tw/en/service-support/downloads/software/
It worked just as expected and we were stuck again in Linux RT problem.
Steps
So far we've already discovered the model and the webpage of the touch screen manufacturer.
Then we tried to install the linux driver from this manufacturer which requires to knowing the version of X11, by using this command:
xdpyinfo | grep version
Download the driver for the X.org version, in this case 1.16.3;
Extract the tarball (need installing bzip2 package);
tar -xjf PenMount-Debian-8.1-8.3_32_64bit-Driver-V4.2.5.tar.bz2
The installer install.sh does not work with this distribution as it was intended to work on a debian like distro.
A workaround is copying files individually.
Inside the folder x86_64/21.0/ there is a driver* which will be used by linux, this file should be copied into lib folder.
*In case you find many driver versions in the tarball, each version is meant to a specific Xorg version, as I experienced, 20.0 > 1.15, 21.0 > 1.16, and so on I believe. You may try different versions until you get it done.
cp pmLinux-Debian8.1-8.3_32_64bit/x86_64/21.0/penmount_drv.so /usr/lib/xorg/modules/input/
Copy and modify the permissons from executables that will provide calibration interface.
chmod +x pmLinux-Debian8.1-8.3_32_64bit/x86_64/*
cp pmLinux-Debian8.1-8.3_32_64bit/x86_64/* /usr/sbin/
Then run the touch screen software for detection and configuration.
pm-setup -s
Reboot system and run calibration utility.
gPen-wrapper
or:
gCal 4
Follow the on screen guidance to finish the setup.
After that, it is wise to reboot once more to test if the touch screen was configured correctly.
Enjoy.