SATO Smart Keyboard Owner's manual

SATO Smart Keyboard
Programming manual

SATO Group of Companies
BARCODE SATO INTERNATIONAL PTE
LT D
438A Alexandra Road #05-01/ 02,
Alexandra Technopark,
Singapore 119967
Tel: +65-6271-2122
Fax: +65-6271-2151
Website: www.barcodesato.com
Email: sale[email protected]
SATO EUROPE NV
Leuvensesteenweg 369,
1932 Sint-Stevens-Woluwe, Brussels, Belgium
Tel: +32 (0)-2-788-80-00
Fax: +32 (0)-2-788-80-80
Website: www.sato-europe.com
Email: info@sato-europe.com
SATO UK LTD
Valley Road, Harwich, Essex England
Co12 4RR, United Kingdom
Tel: +44-1255-240000
Fax: +44-1255-240111
Website: www.satouk.com
Email: enquiries@satouk.com
SATO DEUTSCHLAND GMBH
Schaberweg 28, 61348
Bad Homburg, Germany
Tel: +49 (0)-6-1726-8180
Fax: +49 (0)-6-1726-818-199
Website: www.sato-deutschland.de
Email: info@sato-deutschland.de
SATO POLSKA SP Z O.O.
Ul Okolna 2, 50-422 Wroclaw
Poland
Tel: +48-71-335-23-20
Fax: +48-71-335-23-25
Website: www.sato-europe.com
Email: info@sato-europe.com
SATO AMERICA INC.
10350 Nations Ford Road Suite A,
Charlotte, NC 28273
Tel: +1-704-644-1650
Fax: +1-704-644-1662
Website: www.satoamerica.com
Email: satosales@satoamerica.com
SATO SHANGHAI CO, LTD
11 Floor, D, Pudong South Road 1111,
Pudong New Area, Shanghai,
China 200120
Tel: +86 (0)-21-58307080
Fax: +86 (0)-21-58307978
Website: www.barcodesato.com
Email: sales@satochina.com
BAR CODE SATO ELECTRONICS (S) PTE
LT D
438A Alexandra Road #05-01/02,
Alexandra Technopark, Singapore 119967
Tel: +65-6271-5300
Fax: +65-6273-6011
Website: www.barcodesato.com
www.satosingapore.com
Email: sales@satosingapore.com
SATO BAR CODE & LABELLING SDN BHD
Suite B-08-11&12, Block B Plaza Mont'
Kiara, No.2, Jalan Kiara Mont' Kiara,
50480 Kuala Lumpur, Malaysia
Tel: +60-3-6203-5950
Fax: +60-3-6203-1209
Website: www.barcodesato.com
Email: sale[email protected]
BARCODE SATO (THAILAND) CO. LTD
370/8 Supattra Building, 5th Floor, Rama9
Road, Bangkapi, Huay Kwang
Bangkok 10320, Thailand
Tel: +662-719-7780-3
Fax: +662-719-7784
Website: www.barcodesato.com
Email: sales@satothailand.co.th

Keyboard Programming Manual
1 SATO Europe
The information contained herein is subject to change without notice.
Reproduction of this manual either in part or its entirety is forbidden.
Note that the manufacturer assumes no responsibility for any injury or loss
incurred while using this manual.

Programming Manual Keyboard
SATO Europe 2
CONTENT
DOCUMENT CONVENTIONS ...........................................................................................5
FEATURES OF K012.........................................................................................................6
SPECIFICATIONS .............................................................................................................6
COMMUNICATION INTERFACE .......................................................................................7
SAFETY REGULATION .....................................................................................................8
CHECK-LIST......................................................................................................................8
OPTIONS...........................................................................................................................8
KEYBOARD SETUP ..........................................................................................................
KEYBOARD OPERATION .................................................................................................
POWER-ON UTILITIES .....................................................................................................
AUTO EXECUTION ...........................................................................................................
KEYBOARD INITIALIZATION ............................................................................................
KEYBOARD CONFIGURATION SETUP..........................................................................10
KEYBOARD BIOS UPDATE.............................................................................................12
ON-LINE EDITING UTILITY.............................................................................................12
EXTENDED FILE MANAGER ..........................................................................................13
EXECUTE DOWNLOADED BASIC PROGRAM...............................................................14
USING K012 ....................................................................................................................15
EDIT A PROGRAM ..........................................................................................................15
DOWNLOAD A PROGRAM..............................................................................................15
EXECUTE A PROGRAM..................................................................................................16
VARIABLES, CONSTANTS, FUNCTIONS, OPERATORS, AND EXPRESSIONS ............17
VARIABLES .....................................................................................................................17
LONG INTEGER DATA TYPE VARIABLES......................................................................18
FLOAT DATA TYPE VARIABLES .....................................................................................18
DOUBLE FLOAT DATA TYPE VARIABLES ......................................................................18
STRING VARIABLES.......................................................................................................18
SYSTEM VARIABLES......................................................................................................18
FUNCTIONS ....................................................................................................................1
NUMERIC FUNCTIONS...................................................................................................1
STRING FUNCTIONS......................................................................................................1
OPERATORS...................................................................................................................1
ARITHMETIC OPERATORS ............................................................................................1
STRING OPERATORS ....................................................................................................1
RELATIONAL OPERATORS ............................................................................................1
EXPRESSIONS ...............................................................................................................20

Keyboard Programming Manual
3 SATO Europe
ARITHMETIC EXPRESSIONS.........................................................................................20
STRING EXPRESSIONS .................................................................................................20
RELATIONAL EXPRESSIONS.........................................................................................20
COMMANDS AND STATEMENTS ...................................................................................21
TSKL COMMANDS ..........................................................................................................22
<ESC>!R..........................................................................................................................22
<ESC>!W.........................................................................................................................23
SOUND............................................................................................................................24
CLS..................................................................................................................................25
CLEAR.............................................................................................................................26
CURSOR .........................................................................................................................27
LOCATE...........................................................................................................................28
PRINT…[USING] .............................................................................................................2
INPUT ..............................................................................................................................30
OUT .................................................................................................................................31
FOUT...............................................................................................................................32
OUT USING .....................................................................................................................33
DOWNLOAD....................................................................................................................34
EOP .................................................................................................................................35
OPEN...............................................................................................................................36
CLOSE.............................................................................................................................37
KILL .................................................................................................................................38
SEEK ...............................................................................................................................3
READ...............................................................................................................................40
WRITE .............................................................................................................................41
GOSUB…RETURN..........................................................................................................42
LOOP STATEMENTS.......................................................................................................43
DO…[EXITDO]…LOOP ...................................................................................................43
FOR…[EXITFOR]…NEXT ...............................................................................................45
WHILE…WEND ...............................................................................................................46
GOTO ..............................................................................................................................47
PROGRAM-CONTROL STATEMENTS............................................................................48
IF…THEN…ELSE............................................................................................................48
END .................................................................................................................................50
DIM ..................................................................................................................................51
FREE ...............................................................................................................................52
REM.................................................................................................................................53
TSKL FUNCTIONS ..........................................................................................................54

Programming Manual Keyboard
SATO Europe 4
POS()...............................................................................................................................54
INKEY()............................................................................................................................55
INP$() ..............................................................................................................................56
EOF()...............................................................................................................................57
LOF() ...............................................................................................................................58
ABS() ...............................................................................................................................5
ASC() ...............................................................................................................................60
LEN() ...............................................................................................................................61
FRE() ...............................................................................................................................62
INT().................................................................................................................................63
VAL()................................................................................................................................64
RND()...............................................................................................................................65
CHR$().............................................................................................................................66
FREAD$() ........................................................................................................................67
LEFT$()............................................................................................................................68
RIGHT$() .........................................................................................................................6
MID$()..............................................................................................................................70
STR$() .............................................................................................................................71
SPC$() .............................................................................................................................72
SYSTEM VARIABLES......................................................................................................73
YEAR ...............................................................................................................................73
MONTH............................................................................................................................74
DATE ...............................................................................................................................75
HOUR ..............................................................................................................................76
MINUTE ...........................................................................................................................77
IDNUMBER$....................................................................................................................7
APPENDIX A - LIMITATIONS OF TSKL ...........................................................................80
APPENDIX B - ERROR MESSAGES...............................................................................81
APPENDIX C - RS-232 PIN CONFIGURATIONS.............................................................84
OPERATION GUIDE........................................................................................................87

Keyboard Programming Manual
5 SATO Europe
Document Conventions
This manual uses the following typographic conventions
Examples of convention Description
> Angle brackets, enclose mnemonic
representations of ASCII control characters.
[ ] Square brackets, the data within square brackets
is optional.
Ctrl Bold letters represent a key on the keyboard.
Ctrl-C Two keys with a dash, means to press them
simultaneously.
Italic Italic letters represent explanations given in the
context.
Bold Italic Note. Important information.
The Keyboard
From PC, Scanner, Scale, etc. To Printer

Programming Manual Keyboard
SATO Europe 6
Features of K012
68 keys with keypad
LCD screen (20 characters × 2 lines)
Additional RS-232 port (COM 2) for another input device
Maximum of 50 files can be stored in memory
Upload or download files through both serial ports
Real Time Clock (Y2K compatible)
Built-in Euro logo (ASCII 176, 177)
Floating point calculation
Password security locking
Auto execution function
Specifications
Keyboard Unit
Size 261mm(L)×142.2mm(W)×31mm(H)
Weight 440g
LCD 20 characters × 2 lines
Max Current 5V, 250mA
External Power 5V, 150mA
Operating
emperature 40°F~104°F (5°C~40°C)
Storage emperature -4°F~140°F (-20°C~60°C
Memory
FLASH 512 KB for system, 1 MB for application
SRAM 128 KB for system, 128KB for application

Keyboard Programming Manual
7 SATO Europe
Communication Interface
The available communication parameters for both serial ports are listed below:
Bit rate: 2400, 4800, 9600, 19200 bps
Parity check: none, even or odd
Data bits: 7 or 8
Stop bit(s): 1 or 2
COM1 Port
Serial interface, COM1, is a 9-pin, male, D-style subminiature connector with cable. The pin
assignments are shown below:
Pin Configuration
1 Power input 5 volts, 250mA
2 RxD
3 TxD
4 DTR
5 Ground
6 DSR
7 RTS
8 CTS
9 Connected with Pin1 internally
COM2 Port
COM2 is a 9-pin, female, D-style subminiature connector with pin assignments as shown as
below:
Pin Configuration
1 Power input 5 volts, 250mA
2 TxD
3 RxD
4 DSR
5 Ground
6 DTR
7 CTS
8 RTS
9 Connect with Pin1 internally

Programming Manual Keyboard
SATO Europe 8
Safety Regu ation
FCC Class A
CE EMC
Check-List
Verify the contents of the container according to the list below, if any parts are missing,
please contact your local representative.
K012 keyboard unit
K012 User’s Manual
25 pin to 9 pin RS-232 converter
2 screws for SI thread
Options
External power set
AC adapter
Input: 110V AC or 220V AC
Output: 5V DC
RS-232 cable with power adapter jack

Keyboard Programming Manual
9 SATO Europe
Keyboard Setup
Please turn off printer power prior to connecting the K012 COM1 port to the printer. The
COM2 port of the keyboard is used for downloading files from a PC or may be connected to
other input devices such as a bar code scanner or scale.
Keyboard Operation
Power-on Utilities
Auto Execution
At Power ON, the K012 will automatically execute a program without pressing any
key, if one of the downloaded programs is named “AUTO.BAS”.
Press AL -F1, while applying power, to disable the auto execution function. This
should be done prior to keyboard configuration setup, on-line editing, initialization
and extended file manager utilities, if an auto execution file is downloaded in the
keyboard.
Keyboard Initialization
Pressing AL -CLEAR while turning on the printer power will initialize the keyboard.
All files stored in the SRAM will be deleted. Code page and country codes are set to
default values of 437 and 001 respectively. Both serial port communications
parameters are set to 9600 bps, no parity check, 8 data bits and 1 stop bit.
Items Default Parameters
COM1 Port 9600,N,8,1,Xon/Xoff
COM2 Port 9600,N,8,1,DSR/DTR
Country Code 001
Code Page 437
Key Sound On
ID Number* T.S. C.
Password* None
Note: The items with asterisk (*) can’t be initialized.

Programming Manual Keyboard
SATO Europe 10
Keyboard Configuration Setup
Keyboard configurations can be changed by pressing the AL -F1 keys. The left and
right arrow keys are used to select different parameters. Press EN ER to enable the
selected parameter. Press EXI to return to the top of the menu.
COM1, COM2 SE UP:
With COM1, COM2 SETUP, users can select different communication parameter
as well as handshaking to download or upload data.
DA E / IME SE UP:
The built-in Real Time Clock is compatible with year 2000. The leap year timing is
automatic. The available setting of year is from 1950 to 2049.
INFORMA ION:
The information lists the available memory (SRAM) in system and the extended
Flash memory status. If the extended memory is installed, it shows 8M. Otherwise
“None” is shown on the display.
U ILI Y SE UP:
The code page, country code and key sound ON/OFF is set in UTILITY SETUP.
Setup Utility
COM1 SETUP
COM2 SETUP
DATE /TIME SETUP
UTILITY SETUP
PASS ORD SETUP
INFORMATION

Keyboard Programming Manual
11 SATO Europe
The available code pages and country code are listed as below:
Code pages
437: United States
850: Multilingual
852: Slavic
860: Portuguese
863: Canadian/French
865: Nordic
Country codes
001: USA
002: Canadian French
003: Spanish (Latin America)
031: Dutch
032: Belgian
033: French (France)
034: Spanish (Spain)
036: Hungarian
038: Yugoslavian
039: Italian
041: Switzerland
042: Slovak
044: United Kingdom
045: Danish
046: Swedish
047: Norwegian
048: Polish
049: Germany
055: Brazil
061: English (International)
351: Portuguese
358: Finnish
There is a beep after each keystroke. It can be disabled by setting the key sound
OFF.
PASSWORD SE UP:
K012 supports password security. With password locked on, the download/upload
programs, on-line editing, deleting files, firmware upgrade and extended file

Programming Manual Keyboard
SATO Europe 12
manager will be disabled. The maximum number of password characters is 14,
which are not case sensitive.
Note: If the password is lost, please contact the ustomer Service
Department of your distributor or reseller.
K012 provides another password namely ID Number, which can be verified in
programs. The allowable maximum number of ID characters is 49. The ID number
is not case sensitive. The default ID number is T.S.C.
Keyboard BIOS Update
Press AL -SHIF to enter the update BIOS utility.
Users can upgrade the BIOS by copying the firmware through the specified serial port to
the keyboard in the DOS environment.
If the check sum of the BIOS is not correct after being upgraded, “UPDATE FAIL” will
show on the LCD screen. Turn off the power and enter Upgrade mode again. If the
upgrade process is successful, K012 will boot automatically.
On- ine Editing Utility
The On-line Editing utility can be accessed by pressing AL -F2. This feature is useful
for modifying programs in the field. The available maximum editing characters are 79
characters x 250 lines. The ↑
↑↑
↑ and ↓
↓↓
↓ keys are used to scroll the files displayed on LCD
screen. Enter is used to select the program for editing. AL -CLEAR is used to delete
the files stored in keyboard memory. F1 used to upload the files through the specified
serial port of keyboard to the connected device if the cursor is stopped at selected file.
Select “New File” and press Enter to begin editing a new file. Permissible filenames are
up to 8 characters with 3 characters for the extension. Press F2 to save the file when
editing is completed.

Keyboard Programming Manual
13 SATO Europe
Extended File Manager
Extended File Manager can be accessed by pressing AL -D. Files stored in flash
memory are read-only. File listing, deleting, and the download utility must be operated
through Extended File Manager. The download and delete files process will be different
from files stored in standard memory. The operations of Extended File Manager are
described below:
LIS FILES:
All the files stored in Flash memory will be listed. The BASIC files stored in Flash
memory will also be listed in the BASIC program file list by pressing FORM.
ERASE FILES:
This utility delete all the files stored in Flash memory. The “KILL” command can’t
delete files stored in Flash memory.
DOWNLOAD FILES:
Enter this utility before downloading files to Flash memory. Download files either by
DOS command or by K012 Windows software. Press the EXI key to exit the
download utility.
Note:
1. ALL files will be deleted when you invoke the DOWNLOAD FILES utility.
opy all the files again although only ONE file is appended.
2. With password locked on, the above utilities will be disabled.
EXTENDED FILE MANAGER
LIST FILES
ERASE FILES
DOWNLOAD FILES

Programming Manual Keyboard
SATO Europe 14
Execute downloaded BASIC program
Press FORM to list all the BASIC files stored in the K012 smart keyboard. The UP and
Down arrow keys are used to scroll files displayed in LCD screen. K012 also supports a
hot key feature to find the program. For example: If the program is named DEMO.BAS,
press FORM and then press D. The K012 scrolls the files to the first one that begins
with D automatically. Execute the selected program by pressing EN ER.

Keyboard Programming Manual
15 SATO Europe
Using K012
By the end of this section, you will be able to
1. Edit a TSKL program file on a PC.
2. Download the program file to the K012.
3. Execute the program.
Edit A Program
To edit a program file, you need a plain text editor, for example: DOS Editor, Windows
Notepad or the enclosed K012 Windows software.
he following is an example of editing with a general text editor.
1. Open a new text file.
2. Add the header at the first line of the file as listed below:
DOWNLOAD “MYPROG.BAS”
Where “MYPROG.B S” is the file name to be stored in keyboard memory.
3. Edit the program contents.
4. Insert a line of command at the end of program as below:
EOP
5. Save this file.
The advantages of using enclosed K012 Windows utility software is that users don’t have to
add header and end of program commands to the program file.
Download A Program
Users can download the program either by DOS commands or via the enclosed K012
Windows software.
Connect the PC and K012 together with the keyboard COM2 port.
Connect the K012 COM1 cable to the printer.
Download the program with DOS commands:
Enter the commands as below:
C:\> MODE COM2 96,N,8,1 (sets communications for COM2 of your PC )
C:\> COPY MYPROG.BAS /B COM2
Where MYPROG.BAS is the name of program file, COM2 is the serial port of
your PC.

Programming Manual Keyboard
SATO Europe 16
Download the program by K012 Windows software
Save the program file.
Select Utilities | Download File to download the program to the keyboard.
Note: 1. When downloading programs (*.BAS), please select BAS file extension in
the Download file dialog box.
2. The file name of downloaded file
A sharp short beep means the file has been downloaded to keyboard memory.
Execute A Program
Reset the K012 by pressing AL -EXI .
Press FORM to list program files.
Press ↑
↑↑
↑ and ↓
↓↓
↓ to select a program to execute.
If you want to interrupt the program, press AL -EXI .

Keyboard Programming Manual
17 SATO Europe
Variab es, Constants, Functions, Operators, and
Expressions
The information in this chapter will help you to learn about variables, constants, functions,
operators, and expressions in TSKL (Taiwan Semiconductor keyboard Language).
Variables and constants are manipulated by operators to form expressions.
Variables
Variables are placeholders used to store values. They have names and data types. The
data type of a variable determines how the bits representing those values are stored in
the computer's memory. When you declare a variable, you can also supply a data type for
it. All variables have a data type that determines what kind of data they can store.
The variable name in TSKL can vary from one to ten characters. The first character must be
a letter or an underscore with subsequent characters being letters, numbers, or underscore.
There are two categories of variables in TSKL: numeric data type and string data type.
TSKL supplies several numeric data types: long integer, float and double float.
The maximum numbers of variable available in one program are listed below:
200 long integer and float data type variables
100 double float data type variables
50 string data type variables
he range of data types in the system are listed below.
Data Type Identifier Byte Range Significant digits
Long integer % 4 -2147483648 to 2147483647 10
Float none 4 -9999999 to 9999999 7
Double float # 8 -999999999999999 to
999999999999999 15
String $ 256 254 characters N/A

Programming Manual Keyboard
SATO Europe 18
Long Integer Data Type Variables
The “%” identifier is used to declare a long integer variable by placing the “%” at the
end of variable name. For example, A% and SUM% are integer variables.
Float Data Type Variables
The default data type in TSKL is float data type. If no identifier is placed at the end of
variable name, the variable will be treated as float data type in the system. For
example, A and B are float variables. The precision of float data type is to 6 digits.
Double Float Data Type Variables
The “#” identifier is used to declare a double float variable by placing the “#” at the end
of variable name. For example, A# and SUM# are floating point variables. The
precision of double float data type is to 15 digits.
String Variables
The “$” identifier is used to declare a string variable by placing the “$” at the end of
variable name. For example, A$ and TITLE$ are string variables. Each string variable
can store 254 bytes of data.
System Variables
System variables are the data maintained by the K012. For example, Real Time Clock.
All the system variables are listed below:
YEAR
MONTH
DATE
HOUR
MINUTE
SECOND
IDNUMBER$
Table of contents
Popular Keyboard manuals by other brands

Baxall
Baxall Pyramid 2 Installation and operating instructions

Sony
Sony VGP-WKB1 - VAIO Wireless Keyboard operating instructions

Avanca
Avanca Bluetooth Wireless Keyboard user guide

Micro Innovations
Micro Innovations Internet Keyboard Pro KB535BL Quick installation guide

Bosch
Bosch KBD-DIGITAL installation manual

Cherry
Cherry STREAM XT operating manual