How to Calibrate your Touch Screen Monitor in NI Linux Real-Time

Publish Date: Sep 29, 2015 | 2 Ratings | 1.00 out of 5 | Print | Submit your review

Overview

When first configuring a touch screen monitor for your NI Linux Real-Time target, you will need to calibrate the touch screen before to map your touch inputs properly to the user interface. To calibrate your touch screen monitor with NI Linux Real-Time, you can perform one of three options: use the attached VI to calibrate your monitor, configure the target remotely through SSH, or configure the target using the built-in NI Linux Real-Time terminal.

Table of Contents

  1. Calibrating your Touch Screen Monitor with LabVIEW
  2. Calibrating your Touch Screen Monitor Remotely
  3. Calibrating you Touch Screen Monitor Locally

1. Calibrating your Touch Screen Monitor with LabVIEW

Using LabVIEW 2015 or later:

a.     Create a new project containing your target, and add a new VI under the target.

b.     On the block diagram of this VI, add RT Calibrate Touchscreen.vi located in the Real-Time » RT Utilities pallet.

c.     Run the VI and perform the on-screen calibration procedure on your touch screen monitor.


Using LabVIEW 2014 SP1 or earlier:

a.     Download the attached tpm_calibration.zip and extract the contents to a known location.

b.     Open the LabVIEW Project and re-assign the IP Address of your target to match the IP address found in MAX. You can accomplish this by right-clicking the target and selection Properties shown in Figure 1.



Figure 1. LabVIEW Project IP Setting

c.     Open Touch_Screen_Calibration.vi and run the VI on your target. If your monitor is connected via USB, you will see the calibration screen shown in Figure 2.



Figure 2. Calibration user Interface

d.     Complete the on-screen calibration procedure and the settings will be retained on your NI Linux Real-Time target until you format or re-install software.

 

 

Back to Top

2. Calibrating your Touch Screen Monitor Remotely

a.     You must first configure your NI Linux Real-Time target to allow you to connect via a Secure Shell (SSH) session. For instructions on how to enable this, please follow this KnowledgeBase Article.

Note: You must also have software installed on your target to proceed. For instructions on how to install software, please follow this guide.

b.     Once you have successfully connected to your target, you must log-in as an administrator to be granted proper permissions.

c.     To calibrate the touch screen monitor, enter the following commands in the SSH terminal window:

» export DISPLAY=:0

» xinput_calibrator | tail -6 > /usr/share/X11/xorg.conf.d/99-calibration.conf

Figure 3. SSH Session Demonstrating Touch Screen Calibration

d.     After the commands are entered, the touch screen monitor connected to your target will bring up the screen shown above in Figure 2. Follow the on-screen instructions to successfully calibrate the touch screen.

e.     Once you have finished calibration, the settings will persist between reboots of your target.

 

 

Back to Top

3. Calibrating you Touch Screen Monitor Locally

a.     You must have LabVIEW RT installed on your target to proceed. For instructions on how to install software, please follow this guide.

b.     The embedded UI functionality of NI Linux Real-Time must now be enabled. You can enable this feature by opening MAX, selecting your target beneath the Remote Systems list on the left-hand side of the window, and selecting the "Enable Embedded UI" checkbox in the System Settings tab:

Figure 4. MAX System Settings Tab Showing that "Enable Embedded UI" is Selected.

For more detailed instructions on enabling the embedded UI, please open LabVIEW Help by navigating to Start » Program Files » National Instruments » LabVIEW 2014 (or later) » LabVIEW 2014 (or later) Help.

Once you have opened the LabVIEW Help, navigate to Real-Time Module » Real-Time Module How-To » Configuring RT Target Settings » Using the Embedded UI on RT Targets » Enabling the Embedded UI on RT Targets.

c.     Once you have enabled the embedded UI, restart your target for changes to take effect. Upon reboot, you should see a screen similar to this on your monitor:

Figure 5. NI Linux Real-Time Desktop with Embedded UI Enabled.

d.     Select the Terminal icon at the bottom of the screen.

Figure 6. The NI Linux Real-Time Menu.

e.     Type the following commands in the terminal to calibrate your touch screen monitor:

» su admin

» [enter your administrator password - by default, it is blank]

» xinput_calibrator | tail -6 > /usr/share/X11/xorg.conf.d/99-calibration.conf

Figure 7. NI Linux Real-Time Terminal Window Demonstrating Touch Screen Calibration.

f.     After the commands are entered, the touch screen monitor connected to your target will bring up the screen shown above in Figure 2. Follow the on-screen instructions to successfully calibrate the touch screen.

g.     Once you have finished calibration, the settings will persist between reboots of your target.

Back to Top

Bookmark & Share


Downloads


Ratings

Rate this document

Answered Your Question?
Yes No

Submit