Specifications
124
7.5.5 Getting the Touch Screen Status
The system may get the current touch screen status of whether the touch screen is pressed or
not and the coordinates that is pressed last.
[ 1 ] Enabling the touch screen
The touch screen is disabled by default. Enabling any of function touch keys, user-defined
touch keys, and software keyboard will automatically enable the touch screen. To enable the
touch screen without using any of them, use the
OUT statement as shown below.
OUT &h6120,1 ’Enable touch screen
Disabling the touch screen will cut off the power to the touch screen device, reducing power
consumption. It is recommended that you cut off the power when you do not need to use the
touch screen.
OUT &h6120,0 ’Disable touch screen
[ 2 ] Getting the touch screen status and the coordinates that is
pressed last
Using the INP function enables you to get the touch screen status of whether the touch screen
is pressed or not. To get the coordinates that is pressed last, use the extended function "CON-
SOLE.FN3."
The sample program below makes the system wait until the touch screen gets pressed. When
the touch screen is pressed, the coordinates will be assigned to the POINT%() variable.
DIM POINT%(1)
WAIT &h6122,1 ’Wait until touch screen gets pressed
CALL "CONSOLE.FN3" .fcPnlGet POINT%()
’Get the coordinates that is pressed