Using Eurotech's ARCTouch driver.



Introduction.

This document explains how to install and use Eurotech's ARCTouch touch screen controller driver. The driver currently supports the following touchscreen controllers using any available RS232 port.
  • Eurotech TSC1 controller in 8 or 10 bit mode.
  • 3M EXII 1000SC based controllers.
  • Penmount DMC9000 based controllers.
  • EEly EELY-Touch serial controllers.
  • Gunze serial controllers in continuious ASCII mode.

The driver runs as a regular user program but does not appear in the task bar. It generates a standard left button down message when the stylus first touches the screen, mouse move messages as the stylus is moved around, and a left button up message as the stylus is lifted from the screen. If the stylus is touched against the screen and held without moving for approx 1 second, a right button down message will be generated. If two taps occur very quickly, close to each other, a double click will be simulated by sending two left button down messages quickly, at the same location. Applications will see the touch screen as another mouse.

The driver incorporates a calibration program which allows various touch screens to be used. The calibration program is auto scaling and will work with screen resolutions of 320 x 240 upwards. Versions of the driver are available for Windows 2000, Windows XP and Windows CE 4.x, it should also work with Windows NT4, Windows 98 and Windows Me but these have not been tested.

[contents]


Installing The ARCTouch Driver.

The ARCTouch driver is supplied as single .zip file for the required OS. This file contains the ARCTouch program along with a number of low level DLL files, one for each of the supported touchscreen controllers, and this html file.
ARCTouch.exe The main touchscreen driver application.
TSC8.dll Support for the Eurotech TSC1 in 8 bit mode.
TSC10.dll Support for the Eurotech TSC1 in 10 bit mode.
3MTouch.dll Support for 3M EXII 1000SC controllers.
PMTouch.dll Support for Penmount DMC9000 controllers.
EETouch.dll Support for EELY-Touch serial controllers.
GNZTouch.dll Support for Gunze serial controllers in continuious ASCII mode.

To install the driver simply copy ARCTouch.exe and the appropriate DLL file for the required controller to the following directory.

\Windows\system32 For Windows XP or Windows 2000
\Flashdisk\System For Windows CE

If you want to evaluate a number of touchscreen controllers it is quite safe to copy all of the DLL files, you can simply delete the unused ones later to save space if required.

NB If you received the ARCTouch driver as part of a Eurotech Development Kit then the drivers may have already been installed and configured for you.

NB If you have upgraded a system you may find that the Winnt directory is used as your system directory in Windows 2000 & XP.

[contents]


Running The ARCTouch Driver.

The ARCTouch driver runs as a normal user program so it can be started from the command line, there are a number of command line options which may be given to select the COM port and the type of controller being used. 
/p= Specifies the COM port to be used eg /P=COM3:
/d= Specified the controller DLL to use eg /D=TSC10.dll
/b= Specifies the baud rate to be used eg /B=19200
/s Will stop a currently running touchscreen.
/c Will force a re-calibration of the controller.
/r Indicates that the display is in portrait mode.
/nr Disables the right mouse click gesture.

If you want the ARCTouch driver to run automatically at startup you will need to do one of the following depending on which system you are running on.

On a Windows 2000 or XP system create a shortcut to the ARCTouch.exe program with the appropriate command line parameters and place it in the startup directory on the start menu.

On a Windows CE system edit the startup.ini file in \flashdisk\startup and add the required command line there.

Under normal opperation the ARCTouch driver will not appear in the Taskbar and may also not be displayed in the task manager. The ARCTouch driver must be sent a message to make it stop, this can be done by running arctouch /s. If you want to be able to stop the driver from you application you should include a function like this

void StopDriver(void)
{
    DWORD dwKillMessage;

    dwKillMessage = RegisterWindowMessage(_T("TOUCHKILL"));
    PostMessage(HWND_BROADCAST, dwKillMessage, 0, 0);
}

[contents]


Calibrating The ARCTouch Driver.

A calibration program has been included in the ARCTouch driver but it is normally invisible and must be initiated by sending the driver a message. You can start the calibration routine by running arctouch /c. The calibration program will cover the whole screen including the taskbar, there will be a cross near the top left hand corner of the display and some instructions in the center. At this point the driver is not generating events so the mouse pointer will not move (unless you have a mouse plugged in as well).

Follow the on screen instructions and touch each of the three points in turn. Use a small stylus and make sure that you touch the center of the cross. Try to look directly down on the display from above while calibrating as this reduces errors. Also press the screen firmly as light touches can appear as touches in a different position.

Once all three points have been touched the driver will start to generate mouse events and the mouse pointer will follow the stylus around the screen. Move the stylus around a bit and make sure that the mouse pointer follows the stylus closely enough for your application. If it does, click on the 'Save' button to save the new calibration data and return to normal operation. If you are not happy with the calibration click on the 'Re-Calibrate' button to start the calibration process over again.

If you would like to be able to run the calibration process from within your application add a function like this.

void Calibrate(void)
{
    DWORD dwCalMessage;

    dwCalMessage = RegisterWindowMessage(_T("TOUCHCAL"));
    PostMessage(HWND_BROADCAST, dwCalMessage, 0, 0);
}

NB: If any of the parameters required for normal opperation are missing the the calibration screen will be displayed automatically.

[contents]


The ARCTouch Driver Parameters.

The ARCTouch driver stores a number of parameters about the touchscreen and how it is positions on the display in the registry. These parameters are determined during the calibration proceedure and are stored when the 'Save' button is clicked at the end of a calibration. If any of these parameters is missing when the driver is started the calibration screen will automatically be displayed.

The ARCTouch parameters are stored in the following registry key.

HKEY_LOCAL_MACHINE\Software\Arcom.\ARCTouch\PortName

Where PortName is the name of the COM port that the controller is connected to. The following list describes the values that you will find in this key they are all set during calibration and are presented here for completeness.

XMultiplier The number of mouse points per touchscreen point on the X axis.
YMultiplier The number of mouse points per touchscreen point on the Y axis.
XOffset The X offset from the center of the display to the center of the touchscreen in mouse points.
YOffset The Y  offset from the center of the display to the center of the touchscreen in mouse points.
XInverted Non 0 if the touchscreen X values decrease from left to right.
YInverted Non 0 if the touchscreen Y values decrease from top to bottom.

NB: The 3M capacitive touchscreen are already calibrated and the following values are recommended XMultiplier=4 YMultiplier=4 XOffset=0 YOffset=0 XInverted=0 and YInverted=0.

[contents]


Things To Watch Out For.

When specifying the serial port to be used by the driver remember that the name must end with a colon.

Windows assumes that the 0,0 position is in the top left corner of the screen and that the X coordinates increase from left to right and that Y coordinates increase from top to bottom. It is quite common for touch screens to have their 0,0 position in the bottom left corner, but the driver should take care of this during calibration. However the driver cannot cope with the X and Y coordinates being reversed, so if you find that the cursor moves up and down rather than left to right you need to swap the X and Y inputs to the controller or you may find that specifying /r or the command line will help.

[contents]