Elo Touch CarrollTouch Programmer's Guide

TouchSystem
Programmer's
Guide
CARROLLTOUCH
TOUCHPRODUCTS
ancompanyAMP
Touch System Programmer’s Guide
CARROLL TOUCH
TOUCH PRODUCTS
an AMP company
August 1996 Part #: 2970-0011-01-Rev A
Copyright
Copyright ©1996 Carroll Touch. All rights reserved.
Trademarks
Smart-Frame is a trademark of Carroll Touch, Round Rock, Texas.
IBM and PC are trademarks of International Business Machines Corporation.
All other brands and product names are trademarks of their respective owners.
Disclaimer
Carroll Touch has a policy of continually improving products as new technology becomes available. Carroll Touch reserves the right to make changes and improvements to the specifications of this equipment at any time without notice.
Carroll Touch has made every attempt to ensure that the information in this document is accurate and complete. Carroll Touch assumes no liability for any damages that result from the use of this manual or the equipment it documents. Carroll Touch reserves the right to make changes to this document at any time without notice.
CARROLL TOUCH Table of Contents

Table of Contents

Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
1. Introduction to Infrared Touch Systems . . . . . . . 1-1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Touch Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Touch Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Interpolating Touch Coordinates. . . . . . . . . . . . . . . . . . . . 1-3
Reporting Touch Coordinates . . . . . . . . . . . . . . . . . . . . . . 1-4
Failed Beams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Criteria for Failing a Beam . . . . . . . . . . . . . . . . . . . . . 1-5
Failed Beam Timing Parameters . . . . . . . . . . . . . . . . . 1-5
Criteria for Unfailing a Beam . . . . . . . . . . . . . . . . . . . 1-7
Failed Beam Reports . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
2. Introduction to Guided Wave Touch Systems . . . 2-1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Touch Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Touch Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
EEPROM File and Parameters . . . . . . . . . . . . . . . . . . . . . 2-3
3. General Programming Issues . . . . . . . . . . . . . . . . 3-1
Hardware Configurations . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Built-In Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
External Controllers. . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Application Program Interface . . . . . . . . . . . . . . . . . . 3-4
Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Floating Point Calibration Program Design . . . . . . . . 3-7
Floating Point Calibration Examples. . . . . . . . . . . . . . 3-8
HBC I/O Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Sending a Touch Command to the HBC . . . . . . . . . . . 3-9
Receiving Touch Data from the HBC . . . . . . . . . . . . 3-10
Polling Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Interrupt Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Resetting the HBC. . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
i
Table of Contents CARROLL TOUCH
4. Smart-Frame Protocol . . . . . . . . . . . . . . . . . . . . . . 4-1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
SFP and SFP-II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Types of SFP Commands . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Communication Commands . . . . . . . . . . . . . . . . . . . . 4-3
Reporting Method Commands. . . . . . . . . . . . . . . . . . . 4-3
Touch Mode Commands . . . . . . . . . . . . . . . . . . . . . . . 4-4
Information Request Commands. . . . . . . . . . . . . . . . . 4-5
System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Touch System Initialization. . . . . . . . . . . . . . . . . . . . . . . . 4-7
Resetting the Touch System . . . . . . . . . . . . . . . . . . . . 4-7
Power Cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Dedicated Reset Signal . . . . . . . . . . . . . . . . . . . . . 4-7
Break (Hardware Detected). . . . . . . . . . . . . . . . . . 4-7
HBC Hardware Reset Register . . . . . . . . . . . . . . . 4-8
Break (Firmware Detected) . . . . . . . . . . . . . . . . . . 4-8
Reset (45H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Performing the Autobaud/Autoparity Sequence . . . . . 4-8
Checking for Touch System Errors . . . . . . . . . . . . . . . 4-9
Setting the Reporting Method and Touch Mode . . . . 4-10
Touch System Initialization Examples . . . . . . . . . . . . . . 4-10
Using Autobaud/Autoparity . . . . . . . . . . . . . . . . . . . 4-10
Using a Fixed Baud Rate. . . . . . . . . . . . . . . . . . . . . . 4-11
Using the HBC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Using an SBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
Compatibility Issues/Programming Tips. . . . . . . . . . . . . 4-12
Number of Processors Independence . . . . . . . . . . . . 4-13
Firmware Version Independence. . . . . . . . . . . . . . . . 4-13
Frame Size Independence . . . . . . . . . . . . . . . . . . . . . 4-13
Touch System Response Time Independence . . . . . . 4-13
SFP Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
Autobaud/Autoparity Delay Time. . . . . . . . . . . . . . . 4-14
Maximum Command Completion Time . . . . . . . . . . 4-14
Reset Time/Diagnostics Completion Time . . . . . . . . 4-14
SFP Programming Examples. . . . . . . . . . . . . . . . . . . . . . 4-14
5. Smart-Frame Protocol II . . . . . . . . . . . . . . . . . . . . 5-1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Extensibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Modal Protocols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Backward Compatibility . . . . . . . . . . . . . . . . . . . . . . . 5-4
Types of SFP-II Functions. . . . . . . . . . . . . . . . . . . . . . . . . 5-5
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
ii
CARROLL TOUCH Table of Contents
Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
Validation Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
Interpretation Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Validation Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Interpretation Layer. . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Reporting Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
Report Transfer Mode . . . . . . . . . . . . . . . . . . . . . . . . 5-11
Error Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12
Invalid Command Number . . . . . . . . . . . . . . . . . . . . 5-12
Invalid Parameter Value . . . . . . . . . . . . . . . . . . . . . . 5-13
Unsupported Feature . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
Invalid Byte Count. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Not Enough Parameters. . . . . . . . . . . . . . . . . . . . . . . 5-17
Too Many Parameters . . . . . . . . . . . . . . . . . . . . . . . . 5-17
Overloaded Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
Shared Parameters between SFP and SFP-II. . . . . . . . . . 5-19
Touch Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19
Report Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20
6. Touch Application Program Interface (TAPI) . . 6-1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Installing a TAPI Driver . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
SBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
HBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
RS-232 Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Determining if a TAPI Driver Is Installed. . . . . . . . . . . . . 6-7
Calling TAPI Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Touch System Initialization Using a TAPI Driver . . . . . . 6-8
TAPI Programming Examples. . . . . . . . . . . . . . . . . . . . . . 6-9
7. CTKERN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Scaling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Touch Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Calibration and Scaling Examples. . . . . . . . . . . . . . . . . . . 7-5
Temporal Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
Methods for Interfacing CTKERN and an Application
Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Polling Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Interrupt Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
iii
Table of Contents CARROLL TOUCH
Loading the CTKERN Driver . . . . . . . . . . . . . . . . . . . . . . 7-9
Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
Determining If the CTKERN Driver Is Installed . . . . . . 7-13
Calling CTKERN Functions . . . . . . . . . . . . . . . . . . . . . . 7-13
CALIB.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13
Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-14
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15
Calibrate Mono, EGA, VGA Video Modes . . . . 7-16
Calibrate Other Video Modes . . . . . . . . . . . . . . . 7-17
Edit Entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
Delete Entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
CALIB.DAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
CTKERN Programming Examples . . . . . . . . . . . . . . . . . 7-20
8. Dynamic Link Library (DLL) Functions . . . . . . . 8-1
Calling Windows Driver DLL Functions . . . . . . . . . . . . . 8-2
A. Smart-Frame Protocol Command Reference . . . A-1
Add_Exit_Point_Modifier (29H) ()) . . . . . . . . . . . . . .A-5
Clear_Touch_Report_Buffer (3DH) (=) . . . . . . . . . . .A-6
Continuous_Mode (27H) (’) . . . . . . . . . . . . . . . . . . . .A-7
Coordinate_Reporting (23H) (#) . . . . . . . . . . . . . . . . .A-8
Echo_Off (21H) (!) . . . . . . . . . . . . . . . . . . . . . . . . . .A-10
Echo_On (20H) (SPACE) . . . . . . . . . . . . . . . . . . . . .A-11
Enter_Point_Mode (25H) (%) . . . . . . . . . . . . . . . . . .A-12
Exit_Point_Mode (28H) (() . . . . . . . . . . . . . . . . . . . .A-13
Get_Configuration_Report (33H) (3) . . . . . . . . . . . .A-14
Get_Error_Report (32H) (2) . . . . . . . . . . . . . . . . . . .A-15
Get_Failed_Beam_Report (36H) (6). . . . . . . . . . . . .A-19
Get_Firmware_Version_Report (34H) (4) . . . . . . . .A-21
Get_Frame_Size_Report (37H) (7) . . . . . . . . . . . . . .A-23
Get_One_Report (46H) (F) . . . . . . . . . . . . . . . . . . . .A-24
Get_State_Report (47H) (G) . . . . . . . . . . . . . . . . . . .A-25
Hardware_Flow_Control_Off (42H) (B). . . . . . . . . .A-27
Hardware_Flow_Control_On (41H) (A). . . . . . . . . .A-28
Report_Transfer_Off (43H) (C) . . . . . . . . . . . . . . . .A-29
Report_Transfer_On (44H) (D). . . . . . . . . . . . . . . . .A-30
Reset (45H) (E) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-31
Run_Diagnostics (3AH) (:) . . . . . . . . . . . . . . . . . . . .A-32
Scan_Reporting (22H) (”) . . . . . . . . . . . . . . . . . . . . .A-33
Software_Reset (3CH) (<). . . . . . . . . . . . . . . . . . . . .A-34
SwitchToSFP-II (65H) . . . . . . . . . . . . . . . . . . . . . . .A-35
Touch_Scanning_Off (2BH) (+) . . . . . . . . . . . . . . . .A-37
iv
CARROLL TOUCH Table of Contents
Touch_Scanning_On (2AH) (*) . . . . . . . . . . . . . . . .A-38
Tracking_Mode (26H) (&) . . . . . . . . . . . . . . . . . . . .A-39
B. Smart-Frame Protocol II Function Reference . . B-1
GetConfiguration (11H) . . . . . . . . . . . . . . . . . . . . . . .B-3
GetCoordinateRanges (10H) . . . . . . . . . . . . . . . . . . . . B-8
GetProtocolVersion (65H). . . . . . . . . . . . . . . . . . . . .B-10
GetTouchState (01H). . . . . . . . . . . . . . . . . . . . . . . . . B-12
SetReportProperties (21H) . . . . . . . . . . . . . . . . . . . . B-14
SetReportTransferMode (22H) . . . . . . . . . . . . . . . . . B-19
SetTouchModes (20H) . . . . . . . . . . . . . . . . . . . . . . . B-24
SwitchToClassicSFP (64H). . . . . . . . . . . . . . . . . . . . B-29
C. TAPI Function Reference . . . . . . . . . . . . . . . . . . . C-1
CheckForReports (3) . . . . . . . . . . . . . . . . . . . . . . . . . . C-3
GetCommunicationParameters (4) . . . . . . . . . . . . . . . C-4
GetReports (2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-6
GetTAPIDriverConfiguration (6) . . . . . . . . . . . . . . . .C-7
GetUserEventHandlerParameters (8) . . . . . . . . . . . . . C-8
Reset (0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-9
SendCommand (1). . . . . . . . . . . . . . . . . . . . . . . . . . . C-10
SetCommunicationParameters (5). . . . . . . . . . . . . . . C-11
SetSBCFrameSize (40H). . . . . . . . . . . . . . . . . . . . . . C-13
SetUserEventHandler (7). . . . . . . . . . . . . . . . . . . . . .C-14
D. CTKERN Function Reference . . . . . . . . . . . . . . . D-1
GetCalibrationTableEntry (7) . . . . . . . . . . . . . . . . . . .D-5
GetCommunicationParameters (22) . . . . . . . . . . . . . .D-7
GetCTKERNDriverConfiguration (20). . . . . . . . . . . .D-8
GetCurrentCalibrationModeAndParameters (5) . . . . .D-9
GetCurrentScalingModeAndParameters (10) . . . . . .D-10
GetTAPIDriverConfiguration (19) . . . . . . . . . . . . . .D-11
GetTemporalFilterModeAndParameters (16) . . . . . .D-12
GetTouchState (1) . . . . . . . . . . . . . . . . . . . . . . . . . . .D-13
GetTouchSystemStatus/Configuration (17) . . . . . . .D-15
GetUserEventHandlerModeAndParameters (25) . . .D-16
GetZ-AxisScalingModeAndParameters (13) . . . . . .D-17
Reset (0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-18
SendSmart-FrameProtocolCommand
AndGetReport (18) . . . . . . . . . . . . . . . . . . . . . . . .D-20
SetCalibrationMode (3). . . . . . . . . . . . . . . . . . . . . . .D-22
SetCalibrationParameters (4). . . . . . . . . . . . . . . . . . .D-23
SetCalibrationTableEntry (6) . . . . . . . . . . . . . . . . . .D-24
SetCommunicationParameters (21). . . . . . . . . . . . . .D-26
SetScalingMode (8). . . . . . . . . . . . . . . . . . . . . . . . . .D-28
v
Table of Contents CARROLL TOUCH
SetScalingParameters (9). . . . . . . . . . . . . . . . . . . . . .D-29
SetTemporalFilterMode (14). . . . . . . . . . . . . . . . . . .D-31
SetTemporalFilterParameters (15) . . . . . . . . . . . . . .D-34
SetTouchState (2) . . . . . . . . . . . . . . . . . . . . . . . . . . .D-36
SetUserEventHandlerMode (23) . . . . . . . . . . . . . . . .D-37
SetUserEventHandlerParameters (24). . . . . . . . . . . .D-39
SetZ-AxisScalingMode (11) . . . . . . . . . . . . . . . . . . .D-40
SetZ-AxisScalingParameters (12) . . . . . . . . . . . . . . .D-41
E. Dynamic Link Library (DLL) Function Reference E-1
DisableMouse (11) . . . . . . . . . . . . . . . . . . . . . . . . . . . E-3
DisableTouch (12). . . . . . . . . . . . . . . . . . . . . . . . . . . . E-4
EnableMouse (9) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-5
EnableTouch (10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-6
GetMouseInfo (13) . . . . . . . . . . . . . . . . . . . . . . . . . . . E-7
GetTemporalFilterInfo (18). . . . . . . . . . . . . . . . . . . . . E-8
GetTouchInfo (14). . . . . . . . . . . . . . . . . . . . . . . . . . . . E-9
GetTouchStateandCoord (5) . . . . . . . . . . . . . . . . . . . E-10
InitializeTouch (16). . . . . . . . . . . . . . . . . . . . . . . . . . E-11
SetCalibInfo (7). . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-12
SetTemporalFilterInfo (17) . . . . . . . . . . . . . . . . . . . . E-14
SetTouchEvents (8) . . . . . . . . . . . . . . . . . . . . . . . . . . E-16
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .GL-1
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IN-1
vi
CARROLL TOUCH Table of Contents

List of Figures

Figure 1-1. Infrared Touch Frame . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Figure 1-2. Beam Averaging - Example 1 . . . . . . . . . . . . . . . . . . 1-3
Figure 1-3. Beam Averaging - Example 2 . . . . . . . . . . . . . . . . . . 1-4
Figure 2-1. Guided Wave Touch Screen . . . . . . . . . . . . . . . . . . . 2-2
Figure 3-1. Built-In Smart-Frame Controller Hardware . . . . . . . 3-2
Figure 3-2. RS-232 Controller Hardware (Modular IR Touch
Systems) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Figure 3-3. SBC and HBC Hardware (Modular IR Touch
Systems) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Figure 3-4. Touch Control Software . . . . . . . . . . . . . . . . . . . . . . . 3-5
Figure 3-5. Touch Calibration Screen . . . . . . . . . . . . . . . . . . . . . 3-6
Figure 7-1. Touch System to Application Communication . . . . . 7-3
Figure 7-2. Calibration Mode Fixed or Automatic and Scaling
Mode Fixed or Automatic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Figure 7-3. Calibration Mode Fixed or Automatic and Scaling
Mode Disabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Figure 7-4. Calibration Mode Disabled and Scaling Mode
Fixed or Automatic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Figure 7-5. Calibration Mode Disabled and Scaling Mode
Disabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
Figure 7-6. Calibration Main Menu Screen . . . . . . . . . . . . . . . . 7-15
Figure 7-7. Calibration Menu Screen . . . . . . . . . . . . . . . . . . . . . 7-16
Figure 7-8. Calibration Target Screen . . . . . . . . . . . . . . . . . . . . 7-16
Figure 7-9. Calibration Other Video Mode Screen #1 . . . . . . . . 7-17
Figure 7-10. Calibration Other Video Mode Screen #2 . . . . . . . 7-17
Figure 7-11. Calibration Other Video Mode Screen #3 . . . . . . . 7-18
Figure 7-12. Calibration Manual Edit Menu Screen . . . . . . . . . 7-19
Figure 7-13. Calibration Exit Prompt Screen . . . . . . . . . . . . . . . 7-19
Figure B-1. Flow Diagram for Report Transfer Mode . . . . . . . . B-19
Figure D-1. Temporal Filter Spatial Box Size . . . . . . . . . . . . . .D-32
vii
Table of Contents CARROLL TOUCH
viii
CARROLL TOUCH Table of Contents

List of Tables

Table 1-1. Failed Beam Timing Parameters . . . . . . . . . . . . . . . . . 1-5
Table 3-1. HBC I/O Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Table 3-2. Status Register Bit 0 Values . . . . . . . . . . . . . . . . . . . 3-10
Table 3-3. Status Register Bit 1 Values . . . . . . . . . . . . . . . . . . . 3-10
Table 4-1. SFP Communication Commands . . . . . . . . . . . . . . . . 4-3
Table 4-2. SFP Reporting Method Commands . . . . . . . . . . . . . . 4-4
Table 4-3. SFP Touch Mode Commands . . . . . . . . . . . . . . . . . . . 4-4
Table 4-4. SFP Information Request Commands . . . . . . . . . . . . . 4-5
Table 4-5. SFP System Commands . . . . . . . . . . . . . . . . . . . . . . . 4-6
Table 4-6. SFP Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Table 6-1. TAPI Error Messages and Explanations . . . . . . . . . . . 6-6
Table 7-1. CTKERN Error Messages . . . . . . . . . . . . . . . . . . . . . 7-10
Table A-1. SFP Commands in Alphabetical Order . . . . . . . . . . .A-3
Table A-2. SFP Commands in Numerical Order . . . . . . . . . . . . .A-4
Table A-3. Smart-Frame Protocol Error Report Error Codes . . .A-16
Table A-4. Touch System Default Settings . . . . . . . . . . . . . . . .A-34
Table B-1. SFP-II Functions in Alphabetical Order . . . . . . . . . . . B-2
Table B-2. SFP-II Functions in Numerical Order . . . . . . . . . . . .B-2
Table B-3. ComponentTypes, AttributeTags and
AttributeValues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5
Table C-1. TAPI Functions in Alphabetical Order . . . . . . . . . . . . C-2
Table C-2. TAPI Functions in Numerical Order . . . . . . . . . . . . . C-2
Table C-3. Typical BL/BH Register Contents . . . . . . . . . . . . . . . C-7
Table D-1. CTKERN Functions in Alphabetical Order . . . . . . . .D-3
Table D-2. CTKERN Functions in Numerical Order . . . . . . . . . .D-4
Table D-3. Typical BX Register Contents . . . . . . . . . . . . . . . . . .D-8
Table D-4. Typical BL/BH Register Contents . . . . . . . . . . . . . .D-11
Table E-1. Windows Driver DLL Functions in
Alphabetical Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-2
Table E-2. Windows Driver DLL Functions in
Numerical Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-2
Table E-3. Definition of Touch Events . . . . . . . . . . . . . . . . . . . E-17
ix
Table of Contents CARROLL TOUCH
x

WelcomeWelcome

s computers become a part of daily life, a technology that makes
A
them easier to use has become a necessity. Carroll Touch provides
the solution through the power of touch.
Thank you for your purchase of a Carroll Touch product and welcome to Carroll Touch.

Purpose

Audience

Organization

This Programmer’s Guide is designed to:
Give an overview of the touch technologies used by Carroll Touch,
with a particular emphasis on hardware and software information (such as calibration and initialization) needed by programmers.
Define the use and functions of the Smart-Frame Protocol, the
Smart-Frame Protocol II, the Touch Application Program Interface (TAPI) driver, the CTKERN application interface, and the Windows driver dynamic link libraries (DLLs).
This guide is designed for the programmer or software engineer who integrates Carroll Touch touch systems with host computer systems.
Chapter 1, “Introduction to Infrared Touch Systems,” is an overview of Carroll Touch infrared touch system hardware and operating principles.
Touch System Programmer’s Guide xi
Welcome CARROLL TOUCH
Chapter 2, “Introduction to Guided Wave Touch Systems,” is an overview of Carroll Touch guided wave touch system hardware and operating principles.
Chapter 3, “General Programming Issues,” includes information on programming topics that apply to all Carroll Touch touch systems, such as calibration and HBC I/O registers.
Chapter 4, “Smart-Frame Protocol,” gives an overview of the SFP firmware protocol, including a discussion of command and report types, initialization, timing, and programming tips and examples.
Chapter 5, “Smart-Frame Protocol II,” gives an overview of the SFP-II firmware protocol, which extends the capabilities of SFP by offering support of z-axes and higher resolution. Explanations of command and report formats are included.
Chapter 6, “Touch Application Program Interface (TAPI),” includes an overview of the TAPI software functions, and TAPI driver installation and initialization information.
Chapter 7, “CTKERN,” includes an overview of the CTKERN software functions, CTKERN driver installation, and parameters. It also discusses the operation of the CTKERN calibration program (CALIB.EXE).
Chapter 8, “Dynamic Link Library (DLL) Functions,” describes how to use the DLL function calls to the Carroll Touch Windows driver.
Appendix A, “Smart-Frame Protocol Command Reference,” gives the specifications for each SFP command and report.
Appendix B, “Smart-Frame Protocol II Function Reference,” gives the specifications for each SFP-II function.
Appendix C, “TAPI Function Reference,” gives the specifications for each TAPI function.
Appendix D, “CTKERN Function Reference,” gives the specifications for each CTKERN function.
Appendix E, “Dynamic Link Library (DLL) Function Reference,” gives the specifications for each Windows driver DLL.
xii Touch System Programmer’s Guide
CARROLL TOUCH Welcome

Conventions

For clarity, this guide uses certain conventions to visually distinguish different types of information. The conventions are:
Bold is used to emphasize a word or phrase, including definitions
of important concepts.
MALL CAPITAL LETTERS (such as SPACE or ENTER) indicates a
S
key on the keyboard.
Courier font indicates file names, directory names, messages
displayed by the computer, parameters in command lines, and information to be typed by the user.
Italics indicate a command, function name, or mode (such as
Debug Mode).
Reports (such as the Touch Coordinate Report) and menus (such as
the Configuration Menu) use initial capital letters.
Courier italic font indicates a variable in a command line
for which you must substitute a value.
Hexadecimal numbers in text are identified with capital H; for
example, 1BH is the hexadecimal value 1B. Command and report formats and examples reproduce numbers as they appear on the screen and thus do not use the H convention.
Information of particular importance or actions that may have
undesirable results if performed improperly are included under the headings
Note and Caution.
Touch System Programmer’s Guide xiii
Welcome CARROLL TOUCH
xiv Touch System Programmer’s Guide
1
Introduction to
Introduction to Infrared Touch
Infrared Touch Systems
Systems
his chapter gives an overview of Carroll Touch scanning infrared
T
touch systems, and covers the following topics:
Overview.
Touch Frames.
Touch Controllers.
Interpolating Touch Coordinates.
Reporting Touch Coordinates.
Failed Beams.
Touch System Programmer’s Guide 1-1
Chapter 1 - Introduction to Infrared Touch Systems CARROLL TOUCH

Overview

A Carroll Touch infrared touch system consists of a touch controller and touch frame or a combined touch frame and controller. The touch system uses scanning infrared (IR) beam technology to detect operator input. Generating an invisible grid of IR light beams in front of the host video display screen, the touch system reports touch input when the IR light field is interrupted by a stylus (typically a finger). This input can be used by a touch application just as similar applications use input from pointing devices such as a mouse, light pen or trackball.

Touch Frames

The typical Carroll Touch touch frame is a thin, flat rectangle comprised of four joined printed circuit boards (PCBs). Two adjacent PCBs contain arrays of IR light emitting diodes (LEDs), while the other two PCBs contain arrays of phototransistor/receivers. Each IR LED and the phototransistor opposite it is called an opto-pair. The IR LED of each opto-pair emits an IR light beam that is detected by the phototransistor. The x-axis and y-axis arrays of opto-pairs are pulsed sequentially to create a grid of IR beams, as shown in Figure 1-1.
Figure 1-1. Infrared Touch Frame A beam, or a beam pair, consists of an IR LED and phototransistor
directly across from each other in the touch frame.

Touch Controller

The touch controller is the circuitry required to create and monitor the IR grid. A sequence of electrical pulses is sent to the LEDs to create the
1-2 Touch System Programmer’s Guide
CARROLL TOUCH Chapter 1 - Introduction to Infrared Touch Systems
grid of IR beams in front of the video display surface. This grid of IR beams is the touch active area.
When a stylus enters the touch active area, light beams are obstructed at a particular location on the grid. The touch frame then transmits to the controller a list that indicates which beams have been interrupted. The controller converts this list into an x, y coordinate that identifies the location of the touch. The x, y coordinate data is transmitted to the host processor via the PC bus or the RS-232 serial port and is then processed and used by the application program.

Interpolating Touch Coordinates

To achieve finer resolution than the physical IR beam grid provides, Carroll Touch IR touch systems interpolate a virtual beam between each pair of physical beams. The physical beams are assigned even numbers (0, 2, 4, and so on). The virtual beams are assigned odd numbers (1, 3, 5, and so on). The combination of physical beams and virtual beams results in a set of logical beams.
The coordinate system formed by the logical beams is called the logical coordinate system. The origin of the logical coordinate system (0, 0) is located in the upper left corner of the display. When multiple beams are interrupted, the touch system averages them and reports one x, y logical coordinate pair to the host, a process known as beam averaging. Examples of beam averaging are shown in Figures 1-2 and 1-3.
02 04 0806 1000
00 02 04 06 08
4,4
Figure 1-2. Beam Averaging - Example 1 In Figure 1-2, beams 2, 4, and 6 are interrupted on both the x- and
y-axes. The logical coordinate pair reported to the host is 4, 4.
Touch System Programmer’s Guide 1-3
Chapter 1 - Introduction to Infrared Touch Systems CARROLL TOUCH
02 04 0806 1000
00 02 04 06 08
5,5
Figure 1-3. Beam Averaging - Example 2 In Figure 1-3, beams 2, 4, 6, and 8 are interrupted on both the x- and
y-axes. The logical coordinate pair reported to the host is 5, 5.

Reporting Touch Coordinates

For a touch to be reported, at least one x beam and one y beam must be interrupted. If no beams are interrupted in either the x- or y-axis, the touch is ignored.
The lowest logical coordinate reported for any axis on any touch frame is zero. The maximum logical coordinate that may be reported for a given touch frame axis may be determined from the number of physical beams on that touch frame axis as follows:

Failed Beams

Maximum logical coordinate = 2 x (number of physical beams - 1)
For example, on a frame that has 40 x-axis beams and 30 y-axis beams, the maximum logical coordinates for the frame are:
Maximum logical x coordinate = 2 x (40 - 1) = 78 Maximum logical y coordinate = 2 x (30 - 1) = 58
Therefore, the reported coordinates would range from 0 to 78 on the x-axis and from 0 - 58 on the y-axis.
Carroll Touch touch systems have incorporated into their firmware a mechanism for detecting defective beam pairs and removing them from consideration when determining the location of a stylus within the touch frame. This failed beam mechanism provides a measure of fault tolerance for the touch system so that, in the event of an opto-component
1-4 Touch System Programmer’s Guide
CARROLL TOUCH Chapter 1 - Introduction to Infrared Touch Systems
failure, the touch system simply suffers a localized loss of resolution in one coordinate axis, rather than being completely inoperable.

Criteria for Failing a Beam

The touch system considers a beam to be interrupted if the IR light level at the phototransistor is below a threshold level. A beam is considered failed if it appears to be interrupted for a given period of time.
The touch system detects failed beams:
During power up.
When the touch system is reset using the SFP Reset (45H) command or BREAK.
When the touch system diagnostics are run using the SFP Run_Diagnostics (3AH) command.
While the touch system is scanning the beams during normal operation.
In the first three cases, the time required to fail a beam is less than one second. In the last case, the time required to fail a beam is determined by the failed beam timing parameters.
The touch system maintains a table of beams that have been determined to have failed.

Failed Beam Timing Parameters

The values for the various failed beam timing parameters are different for ASIC-based touch systems and non-ASIC-based touch systems, as shown in Table 1-1.
Table 1-1. Failed Beam Timing Parameters
Parameter
Valid Touch Fail Time 59 - 62 sec. 225 - 270 sec. Non-Contiguous Touch Fail Time 2.2 - 4.4 sec. 10 - 20 sec.
ASIC­Based
Non-ASIC­Based
Single Axis Touch Fail Time 2.2 - 4.4 sec. 10 - 20 sec. Unfail Time 2.2 - 4.4 sec. 10 - 20 sec.
A touch system is probably ASIC-based if it is a modular touch system, or an invasively integrated Smart-Frame with a five switch Communication Parameters jumper block on the frame. If you are
Touch System Programmer’s Guide 1-5
Chapter 1 - Introduction to Infrared Touch Systems CARROLL TOUCH
unsure whether your system is ASIC-based and if you need to know the values of the failed beam timing parameters, use the touch system diagnostics software (CTDIAG) to observe the amount of time required to fail beams that are interrupted by a valid touch.
Table 1-1 gives a range of values rather than a specific value because the touch system firmware checks for failed beams at a regular interval (2.2 seconds or 10 seconds). A beam that appears to be interrupted just after the firmware checks takes longer to fail than a beam that appears to be interrupted just before the firmware checks.
Note
Custom touch systems may have different values for the failed beam timing parameters from those given in Table 1-1.
During normal operation, with the touch system scanning the beams, a beam is considered failed if it is interrupted for the amount of time specified by the Valid Touch Fail Time parameter and if the pattern of interrupted beams appears to indicate a valid touch with a single stylus. (A touch is considered valid if there appears to be one and only one region of contiguous interrupted beams in each coordinate axis.) Thus, a single stylus that remains stationary within the touch screen for the Valid Touch Fail Time causes beams to be failed.
If beams are interrupted on only one axis of the touch frame, the interrupted beams are failed in the amount of time specified by the Single Axis Touch Fail Time parameter.
For any other pattern of interrupted beams, such as more than one region of interrupted beams in an axis, the interrupted beams are failed in the amount of time specified by the Non-Contiguous Touch Fail Time parameter. Thus, multiple styli that remain stationary for longer than the Non-Contiguous Touch Fail Time result in beams being failed, as do non-contiguous touches.
For example, if you place a piece of tape over the opto-devices in one axis of the touch screen, the beams obstructed by the tape are determined by the touch system firmware to be failed and are added to the failed beam table only after the amount of time specified by the Invalid Touch Fail Time parameter has elapsed. If you then remove the tape, the time specified in the Unfail Time parameter must elapse before the beams are considered unfailed by the touch system firmware.
1-6 Touch System Programmer’s Guide
CARROLL TOUCH Chapter 1 - Introduction to Infrared Touch Systems

Criteria for Unfailing a Beam

If a failed beam appears not to be interrupted for the amount of time specified by the Unfail Time parameter, it is unfailed and removed from the failed beam table by the touch system firmware.

Failed Beam Reports

Two SFP commands can be used to generate reports related to the failed beam status of the touch system: Get_Error_Report (32H) and Get_Failed_Beam_Report (36H). See Appendix A, “Smart-Frame Protocol Command Reference,” for details on these commands.
Touch System Programmer’s Guide 1-7
Chapter 1 - Introduction to Infrared Touch Systems CARROLL TOUCH
1-8 Touch System Programmer’s Guide
2
T
Introduction to
Introduction to Guided Wave
Guided Wave Touch Systems
Touch Systems
his chapter gives an overview of Carroll Touch guided wave touch systems and covers the following topics:
Overview.
Touch Screens.
Touch Controllers.
EEPROM File and Parameters.
Touch System Programmer’s Guide 2-1
Chapter 2 - Introduction to Guided Wave Touch Systems CARROLL TOUCH

Overview

A Carroll Touch guided wave touch system consists of a touch controller and touch screen. The touch system uses guided acoustic wave (GW) technology to detect operator input for a variety of applications. Generating invisible acoustic waves, the touch system reports touch input when the wave motion is attenuated by a stylus (typically a finger). This input can be used by a touch application just as similar applications use input from pointing devices such as a mouse, light pen or trackball.

Touch Screens

Guided acoustic wave technology is based on transmitting acoustic waves through a glass overlay placed over the display surface. A transducer mounted on the edge of the glass emits an acoustic wave. The wave travels along the reflector array, is redirected across the overlay to the reflecting edge, and returns to the array where it is reflected back to the transducer. The first reflector will send a signal back first, then the second, and so on, as shown in Figure 2-1.
Figure 2-1. Guided Wave Touch Screen

Touch Controllers

The touch controller is the circuitry required to create and monitor the acoustic waves. A sequence of electrical pulses is sent to the transducer located in the upper left of the glass overlay to generate the acoustic waves. The area covered by the acoustic waves is the touch active area.
2-2 Touch System Programmer’s Guide
CARROLL TOUCH Chapter 2 - Introduction to Guided Wave Touch Systems
When a stylus enters the touch active area, acoustic waves are attenuated at that location on the overlay. The touch screen then transmits to the controller information indicating the location of the attenuated waves. The controller converts this information to an x, y coordinate that identifies the location of the touch. The x, y coordinate data is transmitted to the host processor via the controller and is then processed and used by the application program.

EEPROM File and Parameters

Guided wave touch screens use an electrically erasable programmable read-only memory (EEPROM) chip. An associated file stores the values of the EEPROM parameters that control many features of the touch screen. The following EEPROM values may be displayed, modified, saved, and restored:
Touch sensitivity.
Touch active region.
Transducer corner.
Coordinate origin corner.
Transducer orientation.
Touch refresh time.
No touch refresh time.
Temporal filter space.
Temporal filter time.
Touch System Programmer’s Guide 2-3
Chapter 2 - Introduction to Guided Wave Touch Systems CARROLL TOUCH
2-4 Touch System Programmer’s Guide
3
General
General Programming
Programming Issues
Issues
his chapter includes information that may apply to any Carroll
T
Touch touch system. It discusses the following topics:
Hardware Configurations.
Calibration.
HBC I/O Registers.
Touch System Programmer’s Guide 3-1
Loading...
+ 244 hidden pages