Professional Documents
Culture Documents
PT-Basic
Programming Manual
Version:1.00
Preface
To satisfy the users customization needs, PT-Basic provides effective approaches for users to generate
programs right to their actual demands. This allows users to collect data, execute data processing, then store
the processed data into proper location for future use.
PT-Basic interpreter provides a platform for users to develop application programs to be excuted on the PT-20
series data terminals using BASIC language. Users can develop an application to meet their own individual
needs efficiently.
Youll soon learn how to use BASIC language to write application programs. Please proceed and enjoy the
perfect combination of PT-Basic and PT-20 series and the productivity they can boost for you in your
application.
Table of Contents
Preface...........................................................................................................................1
Table of Contents .........................................................................................................2
1
How to run BASIC program...............................................................................5
1.1
Download BASIC Interpreter ....................................................................5
1.2
BASIC Menu .............................................................................................7
1.2.1
Run program ..................................................................................7
1.2.2
Communication..............................................................................7
1.2.3
Information ....................................................................................8
2
Command Sets....................................................................................................15
3.1
General commands...................................................................................15
3.2
Commands for decision structures...........................................................19
3.3
Commands for looping structures............................................................22
3.4
Commands for string processing .............................................................24
3.5
Commands for event trapping..................................................................30
3.6
System commands ...................................................................................30
3.7
Reader commands....................................................................................44
3.8
Beeper commands....................................................................................49
2
3.9
3.10
3.11
3.12
3.13
Appendices..........................................................................................................93
Appendix A PT-Basic Commands list.................................................................93
A1.
General commands...........................................................................93
A2.
Commands for decision structures...................................................93
A3.
Commands for looping structures....................................................94
A4.
Commands for string processing .....................................................95
A5.
Commands for event trapping..........................................................96
A6.
System commands ...........................................................................96
A7.
Reader commands............................................................................97
A8.
Buzzer commands............................................................................97
A9.
Calendar and timer commands.........................................................97
A10. LED command .................................................................................98
A11. Keypad commands...........................................................................98
A12. LCD Commands ..............................................................................99
A13. User font commands ........................................................................99
A15. File manipulation commands.........................................................101
A16. Vibrator commands........................................................................102
A17. Communication port commands ....................................................102
A18. Memory commands .......................................................................102
A19. USB commands .............................................................................103
A20. Simulator (Only for PC simulator) commands ..............................103
Appendix B Scan Module Configuration Table.................................................104
3
->Select Communication
->Select AP Install
PC side
Execute PT-Filemanager and select Tool \ Application download
Ver. 1.00
5/120
Through the above steps, BASIC Interpreter can be downloaded into PDT.
Ver. 1.00
6/120
.
If you have already downloaded BASIC Interpreter, then you can view the BASIC
Menu by pressing the power key.
1.2.1
Run program
If the BASIC program file (Default.bas) in the direct path
(D:\\Program\\) then you can run the BASIC program now.
1.2.2
Communication
You can use this item to download program file or
download/upload other files.
Ver. 1.00
7/120
1.2.3
Information
You can use this item to get version information of all software
and firmware parts of the system.
Ver. 1.00
8/120
Program Structure
2.1 Constants
Constants are the actual values used or generated in the program. There
are two types of constants:
2.1.1
String
A string constant is a sequence of up to 255 alphanumeric
characters or symbols enclosed in a pair of double quotation
marks.
"BASIC"
"2007.05.13"
"ArgoBasic program guide"
"168 IbB"
"IbB 168 !"
2.1.2
Numeric
Numeric constants include positive and negative numbers.
Numeric constants in BASIC cannot contain commas. There are
two types of numeric constants that can be used in the PT-Basic
interpreter.
Integer constants: 2147483648 ~ + 2147483647
Real number constants: Positive or negative real number, that
contain a decimal point, such as 1.23
or 3.5897
2.2 Variables
Variable are symbols used to represent data items, such as numerical
values or character strings that are used in BASIC program. The value of a
variable may be assigned explicitly and can be changed during the
execution of the program. Value of a variable is assumed to be undefined
until a value is assigned to it.
Ver. 1.00
9/120
2.2.1
2.2.2
Array Variables
An array is a group or table of values referenced by the same
variable name. Each element in an array is referenced by an array
variable that is subscripted with an integer or an integer
expression.
Each element in an array is referenced by an array variable that is
subscripted with an integer or an integer expression. In PT-Basic,
the maximum number of dimensions for an array is 2.
For example:
A$(8)
Str%(2,5)
DIM A%(23)
DIM Str$(60)
Ver. 1.00
10/120
2.3.1
Assignment Operator
PT-Basic interpreter supports an assignment operator =
For example:
Size% =100
PI! =3.1415
Str1$=back
2.3.2
Arithmetic Operator
The arithmetic operators are:
2.3.3
Operator Operation
Example
Exponentiation
A% = 9^6
Negation
A% = -B%
Multiplication
A% = B% * C%
Division
A% = B% / C%
Addition
A% = B% + C%
Subtraction
A% = B% - C%
MOD
Modulo arithmetic
A% = B% MOD C%
Relational Operator
Relational operators are used to compare two values. Result of the
comparison is either True or False.
2.3.4
Operator
Operation
Example
Equality
A% = B%
<>
Inequality
A%<> B%
>
Greater than
A% > B%
<
Less than
A%< B%
>=
A% >= B%
<=
A% <= B%
Logical Operator
Logical operators perform tests on multiple relations and Boolean
operations. Logical operator returns a result which is either
True (not zero) or False (zero). In an expression, logical
operations are performed after arithmetic and relational
operations.
Ver. 1.00
11/120
Operator
Operation
Example
NOT
Logical negation
AND
Logical and
OR
Inclusive or
XOR
Exclusive or
symbol
Highest
Arithmetic
Arithmetic
*, /, MOD
Arithmetic
+, -
Relational
Logical
Assignment
Lowest
2.5 Labels
Line labels are used to represent some special lines in the BASIC program.
They can be either integer numbers or character strings.
A valid integer number for the line label is in the range from 1 to
65279.
A character string label can have up to 255 characters (if the string
label has more than 255 characters, error can be it cannot be
anticipated).
A character string label that precedes a program line must have a colon
between the label and the program line, but it is not necessary for an
integer label.
Ver. 1.00
12/120
For example:
GOTO 100
100
GOTO LABEL2
LABEL2:
2.6 Subroutines
A subroutine is a set of instructions with a particular name or a line label.
User can simplify their programming by breaking programs into
subroutines. A subroutine will be executed when being called by a
GOSUB command.
For example:
ON COM (1) GOSUB ReadCOM
ReadCOM:
RETURN
The command RETURN marks the end of the subroutine and tells the
processor to return to the caller. A subroutine has to be appended at the
end of the main BASIC program. A subroutine can be defined with or
without a pair of brackets.
For example:
GOSUB FUN
GOSUB Place
GOSUB Test
END
SUB FUN( )
PRINT "Run function!!"
END SUB
Ver. 1.00
13/120
Place:
PRINT "Run Place!!"
RETURN
SUB Test
PRINT TEST
END SUB
In any place of the program, you can use END to exit the
program. The system will go to BASIC Menu.
PRINT "Press key to exit!"
WHILE INKEY$ = ""
WEND
END
Ver. 1.00
14/120
Command Sets
DIM
Purpose To specify the maximum value of variable subscripts and to
allocate storage accordingly.
Syntax DIM Array (range {,range}) {, Array(range {,range})}
Example DIM A%(8), B%(5,5),C$(6)
Description Array is an array variable.
Range can be an integer or an integer expression.
Ver. 1.00
15/120
GOSUB
Purpose To call a specified subroutine.
Syntax GOSUB SubName|SubLabel|SubNumber
Example GOSUB FUN
GOSUB Place
GOSUB 100
END
SUB FUN( )
PRINT "Run SUBNAME"
END SUB
Place:
PRINT "Run SUBLABEL"
RETURN
100
PRINT "RunSUBNUMBER"
RETURN
Description SubName is the name of a subroutine.
SubLabel is the line label of a subroutine.
SubNumber is the line number of a subroutine.
GOTO
Purpose To branch unconditionally to a specified line number or line
lable from the normal program sequence.
Syntax GOTO LineNumber|LineLabel
Example GOTO FUN
100
PRINT "NUMBER"
WHILE INKEY$=""
WEND
END
FUN:
PRINT "LABEL NAME"
GOTO 100
Description LineNumber is the integer number in front of a program line.
LineLabel is the string label of a program line.
Ver. 1.00
16/120
INT
Purpose To return the largest integer that is less than or equal to the
giver numeric expression.
Syntax A% = INT(N%) or A% = INT(N!)
Example A% = INT(9.86)
PRINT A%
B% = INT(-5.68)
PRINT B%
Description A% is an integer variable to be assigned to the result.
N% or N! is a numeric expression,it can be an integer or a
real number.
REM
Purpose To insert explanatory remarks in a program.
Syntax REM remark or 'remark
Example REM This is function
' This is BASIC program
Description remark may be any sequence of characters. BASIC
interpreter will ignore whatever follows the REM or until
end of the line.
SET_PRECISION
Purpose To set the precision of the decimal points for printing real
number expression.
Syntax SET_PRECISION(N%)
Example A! = 3.141592654
SET_PRECISION(6)
PRINT "A = ", A!
' A = 3.141593
Description N% is a numeric expression in the rang of 0 to 6.
The precision default setting is two digits.
Ver. 1.00
17/120
SGN
Purpose To return an indication of the mathematical sign (+ or -) of a
given numeric expression.
Syntax A% = SGN(N%) or A% = SGN(N!)
Example A% = SGN(9.86)
PRINT A%
B% = SGN(-5.68)
PRINT B%
B% = SGN(0)
PRINT B%
Description N% or N! is a numeric expression,it can be an integer or a
real number.
A% is an integer variable to be assigned to the result.
A%
Meaning
N% >0
N% =0
-1
N% <0
Ver. 1.00
18/120
Ver. 1.00
19/120
ON GOSUB
Purpose To call one of the specified subroutines depending on the
value of the expression.
Syntax ON N% GOSUB SubLabel| SubName {,SubLabel|
SubName}
Example D% = DAY_OF_WEEK
ON D% GOSUB MON, THE, WED, THR, FRI, SAT, SUN
WHILE INKEY$=""
WEND
END
MON:
PRINT "MONDAY"
RETURN
THE:
PRINT "TUESDAY"
RETURN
WED:
PRINT "WEDNESDAY"
RETURN
THR:
PRINT "THURSDAY"
RETURN
FRI:
PRINT "FRIDAY"
RETURN
SAT:
PRINT "SATURDAY"
RETURN
SUN:
PRINT "SUNDAY"
RETURN
Description N% is a numeric expression that is rounded to an integer. The
value of N% determines which subroutine is to be called. If
the value of N% is 0 or greater than the number of routines
listed, the interpreter will continue with the next executable
statement.
SubLabel is the name of a subroutine.
Ver. 1.00
20/120
ON GOTO
Purpose To branch to one of several specified Line Labels depending
on the value of an expression.
Syntax ON N% GOTO LineLabel | LineNumber {,LineLabel |
LineNumber}
Example D% = DAY_OF_WEEK
ON D% GOTO 1, 2, 3, 4, 5, 6, 7
1
PRINT "MONDAY"
END
2
PRINT "TUESDAY"
END
3
PRINT "WEDNESDAY"
END
4
PRINT "THURSDAY"
END
5
PRINT "FRIDAY"
END
6
PRINT "SATURDAY"
END
7
PRINT "SUNDAY"
END
Description N% is a numeric expression which is rounded to an
integer.The value of N% determines which line lable in the
list will be used for branching. If the value N% is 0 or greater
than the number of line labels listed,the interpreter will
continue with the next executable statement.
LineLabel is the string label of a program line.
LineNumber is the integer number in front of a program line.
Ver. 1.00
21/120
FOR NEXT
Purpose To repeat the execution of a block of statements for a
specified number of times.
Syntax FOR N% = startvalue TO endvalue [STEP step]
[Statement Block]
NEXT [N%]
Example FOR N% = 1 TO 6 STEP 1
PRINT "FOR NEXT",N%
NEXT N%
Description N% is an integer variable to be used as loop counter.
Startvalue is a mumeric expression which is the initial value
for the loop counter.
Endvalue is a numeric expression which is the final value for
the loop counter.
Step is a numeric expression to be used as an
increment/decrement of the loop counter. The step is 1 by
default.
If the loop counter ever reaches or beyond the endvalue,the
program execution continues to the statement following the
NEXT statement. The Statement block will be executed again
otherwise.
Ver. 1.00
22/120
WHILE WEND
Purpose To repeat the execution of a block of statements while a
certain condition is TRUE.
Syntax WHILE condition
[Statement Block]
WEND
Example N%=1
WHILE 1
PRINT "Cnt=",N%
N%=N%+1
IF N%>5 THEN
EXIT
END IF
WEND
Description If the condition is true, loop statements are executed until the
WEND statement is encountered. Then the program
execution returns to WHILE statement and checks the
condition again. If it is still true,the process will be repeated.
Otherwise the execution continues with the statement
following the WEND statement.
Ver. 1.00
23/120
INSTR
Purpose To search if one string exists inside antoher one.
Syntax A% = INSTR([N%,] S1$, S2$)
Example Str$="ABCGEFGHIJK"
G$="GH"
PRINT INSTR(5,Str$, G$)
PRINT INSTR(3, Str$, "CGE")
Description A% is an integer variable to be assigned to the result.
N% is a numeric expression. Optional offset N% sets the
position for starting the search.
S1$, S2$ may be a string variable, string expression, or string
constant.
If S2$ is found in S1$, it returns the position of the first
occurrence of S2$ in S1$, from the starting point.
If N% is larger than the length of S1$ or if S1$ is null, of if
S2$ cannot be found,it return 0.
If S2$ is null,it return N%(or 1 if N% is not specified).
Ver. 1.00
24/120
LEFT$
Purpose To retrieve a given number of characters from the left side of
the target string.
Syntax A$ = LEFT$(Str$, N%)
Example Str$ = "ABCDEFGHIJK"
PRINT LEFT$(Str$,3)
PRINT LEFT$("168IbB",3)
Description A$ is a string variable to be assigned to the result.
Str$ may be a string variable, string expression, or string
constant.
N% is a numeric expression.
If N% is larger than the length of Str$,the Str$ is returned.
If N% is zero, the null string is returned.
MID$
Purpose To retrieve a given number of characters from anywhere of
the target string.
Syntax A$ = MID$( Str$, N%[, M%])
Example Str$ = "ABCDEFGHIJK"
PRINT MID$(Str$,5,3)
PRINT MID$("123& #168IbB",6,5)
Description A$ is a string variable to be assigned to the result.
Str$ may be a string variable, string expression, or string
constant.
N% and M% are numeric expression.
This command returns a string of length M% characters from
Str$ beginning with the N%th character.
If M% is equal to zero, or if N% is greater than the length of
Str$, then it returns a null string.
Ver. 1.00
25/120
RIGHT$
Purpose To retrieve a given number of characters from the right side
of the target string.
Syntax A$ = RIGHT$(Str$, N%)
Example Str$ = "ABCDEFGHIJK"
PRINT RIGHT$(Str$,3)
PRINT RIGHT$("168IbB",3)
Description A$ is a string variable to be assigned to the result.
Str$ may be a string variable, string expression, or string
constant.
N% is a numeric expression.
If N% is larger than the length of Str$, the entire sring is
returned.
If N% is zero, the null string is return.
TRIM_LEFT$
Purpose To return a copy of a string with leading blank spaces
stripped away.
Syntax A$ = TRIM_LEFT$(Str$)
Example PRINT TRIM_LEFT$(" Happy TEST END")
Description A$ is a string variable to be assigned to the result.
Str$ is a string variable that may contain some space
character at the beginning.
TRIM_RIGHT$
Purpose To return a copy of a string with trailing blank spaces
stripped away.
Syntax A$ = TRIM_RIGHT$(Str$)
Example PRINT TRIM_RIGHT$("Happy TEST END
")
Description A$ is a string variable to be assigned to the result.
Str$ is a string variable that may contain some space
characters at the end.
ASC
Purpose To return the decimal value for the ASCII code for the first
character of a given string.
Syntax A% = ASC(Str$)
Example A%=ASC("Test...")
'A%=84
Description A% is an integer variable to be assigned to the result.
Str$ is a string variable, consisting of characters.
Ver. 1.00
26/120
CHR$
Purpose
Syntax
Example
Description
HEX$
Purpose To return a string that represents the hexadecimal value (base
16) of the decimal argument.
Syntax A$ = HEX$(N%)
Example A$ = HEX$(136)
A$=88
Description A$ is a string variable to be assigned to the result.
N% is a numeric expression.
OCT$
Purpose To return a string that represents the octal value (base 8) of
the decimal argument.
Syntax A$ = OCT$(N%)
Example A$ = OCT$(136)
A$=210
Description A$ is a string variable to be assigned to the result.
N% is a numeric expression.
LCASE$
Purpose To return a copy of a string in which all uppercase letters will
be converted to lowercase letters.
Syntax A$ = LCASE$(Str$)
Example Str$="ABCDEFG"
PRINT LCASE$(Str$)
PRINT LCASE$("168BBqRrGgIbB")
Description A$ is a string variable to be assigned to the result.
Str$ may be a string variable, string expression, or string
constant.
Ver. 1.00
27/120
UCASE$
Purpose To return a copy of a string in which all lowercase letters will
be converted to uppercase letters.
Syntax A$ = UCASE$(Str$)
Example Str$="abcdeFG"
PRINT UCASE$(Str$)
PRINT UCASE$("168BBqRrGgIbB")
Description A$ is a string variable to be assigned to the result.
Str$ may be a string variable, string expression, or string
constant.
STR$
Purpose To convert a numeric expression to a string.
Syntax A$ = STR$(N%) or
A$ = STR$(N!)
Example Str$=STR$(168)
PRINT Str$
Description A$ is a string variable to be assigned to the result.
N% is a numeric expression.
VAL
Purpose To return the numeric value of a string expression in interger
form.
Syntax A% = VAL(Str$)
Example PRINT VAL("16898")
Description A% is an integer variable to be assigned to the result.
Str$ is a string that includes numeric characters.If the first
character is not numeric, this command return 0.
VALR
Purpose
Syntax
Example
Description
Ver. 1.00
28/120
STRING$
Purpose To return a string containing the specified number of the
requested character.
Syntax A$ = STRING$(N%, J%)
A$ = STRING$(N%, X$)
Example PRINT STRING$(10, 45)
---------PRINT STRING$(3, "89")
888
Description A$ is a string variable to be assigned to the result.
N% is numeric expression.
J% is numeric expression in the range of 0 to 255, indicating
the ASCII code of a character.
X$ may be a string variable or string constant.
Ver. 1.00
29/120
ESC_PRESS:
OFF ALL
PRINT "ESC KEY PRESS..."
ON ESC GOSUB ESC_PRESS
RETURN
Description To resume the event trigger, call ON event GOSUB
OFF ESC
Purpose To terminate ESC event trigger.
Syntax OFF ESC
Example ON ESC GOSUB ESC_PRESS
ESC_PRESS:
OFF ESC
OFF COM
Purpose To terminate COM event trigger.
Syntax OFF COM(N%)
Example ON COM(1) GOSUB READ1
READ1:
OFF COM(1)
Ver. 1.00
30/120
OFF HOUR
Purpose To terminate HOUR event trigger.
Syntax OFF HOUR
Example ON HOUR GOSUB A10
A10:
OFF HOUR
OFF KEY
Purpose To terminate KEY event trigger.
Syntax OFF KEY(number%)
Example ON KEY(1) GOSUB F1
ON KEY(2) GOSUB F2
F1:
OFF KEY(1)
ON KEY(1) GOSUB F1
RETURN
F2:
OFF KEY(2)
ON KEY(2) GOSUB F2
RETURN
Description To resume the event trigger, call ON KEY GOSUB
number% is an integer variable in the range of 1 to 6,
indicating a function key of the keypad.
Ver. 1.00
31/120
OFF MINUTE
Purpose To terminate MINUTE event trigger.
Syntax OFF MINUTE
Example ON MINUTE GOSUB A10
A10:
OFF MINUTE
OFF READER
Purpose To terminate READER event trigger.
Syntax OFF READER(N%)
Example ON READER(1) GOSUB GetData
GetData:
OFF READER(1)
CLS
A$=GET_READER_DATA$(1,4)
PRINT "DATA:"+A$
LOCATE 0,2
A$=GET_READER_DATA$(1,1)
PRINT "Name:"+A$
LOCATE 0,4
PRINT GET_READER_DATALEN
Ver. 1.00
32/120
OFF TIMER
Purpose To terminate TIMER event trigger.
Syntax OFF TIMER(N%)
Example ON TIMER(1,200) GOSUB A1
ON TIMER(2,300) GOSUB A2
A1:
OFF TIMER(1)
RETURN
A2:
OFF TIMER(2)
RETURN
Description To resume the event trigger, call ON TIMER GOSUB
N% is an integer variable in the range of 1 to 5, indicating the
timer ID.
ON COM GOSUB
Purpose To activate COM event trigger.
Syntax ON COM(N%) GOSUB SubLabel | SubName
Example ON COM(1) GOSUB READ1
READ1:
OFF COM(1)
Ver. 1.00
33/120
ON ESC GOSUB
Purpose To activate ESC event trigger.
Syntax ON ESC GOSUB SubLabel | SubName
Example ON ESC GOSUB ESC_PRESS
ESC_PRESS:
OFF ESC
ON HOUR GOSUB
Purpose To activate HOUR event trigger.
Syntax ON HOUR GOSUB SubLabel | SubName
Example ON HOUR GOSUB OnHourAlarm
OnHourAlarm:
CurrentTime$=TIME$
H%=VAL(LEFT$(CurrentTime$,2))
FOR I%=1 TO H%
BEEP(30,20,0,0)
WAIT(100)
NEXT
RETURN
Description When the system time is on the hour, a specific subroutine
will be executed.
Ver. 1.00
34/120
ON KEY GOSUB
Purpose To activate KEY event trigger.
Syntax ON KEY(number%) GOSUB SubLabel | SubName
Example ON KEY(1) GOSUB F1
ON KEY(2) GOSUB F2
F1:
OFF KEY(1)
RETURN
F2:
OFF KEY(2)
RETURN
Description When a function key is pressed, a specific subroutine will be
executed.
number% is an integer variable in the range of 1 to 6,
indicating a function key of the keypad.
ON MINUTE GOSUB
Purpose To activate MINUTE event trigger.
Syntax ON MINUTE GOSUB SubLabel | SubName
Example ON MINUTE GOSUB AMINUTE
AMINUTE:
CurrentTime$=TIME$
CurrentMin%=VAL(MID$(CurrentTime$,3,2))
IF CurrentMin%=30 THEN
BEEP(30,50,0,0)
WAIT(200)
END IF
RETURN
Description When the system time is on the minute, a specific subroutine
will be executed.
Ver. 1.00
35/120
ON READER GOSUB
Purpose To activate READER event trigger.
Syntax ON READER(N%) GOSUB SubLabel | SubName
Example ON READER(1) GOSUB GetData
GetData:
OFF READER(1)
CLS
A$=GET_READER_DATA$(1,4)
PRINT "DATA:"+A$
LOCATE 0,2
A$=GET_READER_DATA$(1,1)
PRINT "Name:"+A$
LOCATE 0,4
PRINT GET_READER_DATALEN
Ver. 1.00
36/120
ON TIMER GOSUB
Purpose To activate TIMER event trigger.
Syntax ON TIMER(N%, duration%) GOSUB SubLabel | SubName
Example ON TIMER(1,200) GOSUB TimeOut
TimeOut:
OFF TIMER(1)
RETURN
Description When the system runs out of the time duration specified by
user, a specific subroutine will be executed.
Up to five timers can be set in a BASIC program. Be sure the
timer IDs are properly differentiated. Otherwise, the latter
created timer will overwrite the former one.
N% is an integer variable in the range of 1 to 5, indicating the
ordinal number of timer.
duration% is an integer variable, indicating a specified period
of time in units of 10 ms.
Ver. 1.00
37/120
LOCK
Purpose To hold all the activated event triggers until they are released
by UNLOCK.
Syntax LOCK
Example ON KEY(1) GOSUB F1
ON KEY(2) GOSUB F2
F1:
LOCK
PRINT "press F1"
UNLOCK
RETURN
F2:
PRINT "press F2"
RETURN
In this example, the BASIC program can trap the KEY(1)
and KEY(2) events and reroute to the subroutines F1 and F2
respectively. In F1, the command LOCK disable all the
activated event triggers so that the subroutine F1 will not be
interrupted by a new upcoming KEY(1) and KEY(2) event.
On the other hand, since LOCK is not called in F2, any new
coming KEY(1) and KEY(2) event will interrupt the ongoing
F2, and therefore, may affect the expected results.
Description This command can prevent nesting of event triggers. All the
activated event triggers will be disabled until UNLOCK is
called.
Ver. 1.00
38/120
UNLOCK
Purpose To release all the activated event triggers held by LOCK.
Syntax UNLOCK
Example ON KEY(1) GOSUB F1
ON KEY(2) GOSUB F2
F1:
LOCK
PRINT "press F1"
UNLOCK
RETURN
F2:
PRINT "press F2"
RETURN
Description This command resumes event processing.
Ver. 1.00
39/120
DEVICE_ID$
Purpose
Syntax
Example
Description
GET_TARGET_MACHINE$
Purpose
Syntax
Example
Description
Ver. 1.00
40/120
MENU
Purpose To create a menu.
Syntax A% = MENU(Item$)
Example MENU_STR$="1.Auto off"+CHR$(13)
MENU_STR$=MENU_STR$+"2.System Info"+CHR$(13)
MENU_STR$=MENU_STR$+"3.Power on"+CHR$(13)
MENU_STR$=MENU_STR$+"4.Suspend"+CHR$(13)
MENU_STR$=MENU_STR$+"5.Restart"+CHR$(13)
MENU_STR$=MENU_STR$+"6.Exit"+CHR$(13)
MENU_STR$=MENU_STR$+"@SYSTEM
TEST"+CHR$(13)
S%=MENU(MENU_STR$)
ON S% GOTO 10,20,30,40,50,60
Ver. 1.00
41/120
POWER_ON
Purpose To determine whether to restart or resume the program upon
powering on.
Syntax POWER_ON(N%)
Example POWER_ON(0)
Resume
Description N% can be set 0 or 1.
N%
Meaning
Resume
Reset
RESTART
Purpose To restart the system.
Syntax RESTART
Example ON ESC GOSUB ESC_PRESS
ESC_PRESS:
RESTART
RETURN
Description This command will terminate the execution of the BASIC
program and restart the system.
SYSTEM_INFORMATION
Purpose To get information on components.
Syntax A$=SYSTEM_INFORMATION(index%)
Example PRINT "Kernel:"+SYSTEM_INFORMATION$(1)
PRINT "BASIC:"+SYSTEM_INFORMATION$(2)
PRINT "SCANNER:"+SYSTEM_INFORMATION$(3)
Description A$ is a string variable to be assigned to the result.
index% is an integer variable, indicating a specific category
of information.
index%
Meaning
Kernel version
BASIC version
Scanner version
Ver. 1.00
42/120
SYS_SUSPEND
Purpose
Syntax
Example
Description
CHECK_AID
Purpose To check the agency ID is correct or not.
Syntax A%=CHECK_AID(S1$ , S2$)
Example IF CHECK_AID("6421","08724") THEN
PRINT "AID OK..."
ELSE
PRINT "AID NG..."
END IF
WHILE INKEY$=""
WEND
Description A% is an integer variable to be assigned to the result.
A%
Meaning
AID not
correct.
AID correct.
Ver. 1.00
43/120
ENABLE READER
Purpose To enable the reader ports of the terminal.
Syntax ENABLE READER(N%)
Example ON READER(1) GOSUB SCAN
ENABLE READER(1)
SCAN:
OFF READER(1)
CLS
A$=GET_READER_DATA$(1,4)
PRINT "DATA:"+A$
LOCATE 0,2
A$=GET_READER_DATA$(1,1)
PRINT "Name:"+A$
LOCATE 0,4
PRINT GET_READER_DATALEN
LOOP1:
S1$=INKEY$
IF S1$="" THEN
GOTO LOOP1
END IF
ON READER(1) GOSUB SCAN
RETURN
Description N% is an integer variable, indicating the reader port (now we
only can choose 1).
Ver. 1.00
44/120
SLEEP_READER
Purpose
Syntax
Example
Description
Meaning
Not sleep
To sleep
GET_READER_DATA$
Purpose To get data that is read from a specified reader ports.
Syntax A$ = GET_READER_DATA$(N1%,N2%)
Example ON READER(1) GOSUB SCAN
ENABLE READER(1)
SCAN:
A$=GET_READER_DATA$(1,4)
RETURN
Description This command will get reader port data.
A$ is a string variable to be assigned to the result.
N1% is an integer variable, indicating the reader port (now we
only can choose 1).
N2% is an integer variable, indicating what kind of data to be
retrieved.
N2%
Meaning
Code Name
Full Code
Code ID
Data
Code
Preamble
name
ID
Code
Barcode
ID
Length
data
Postamble
Suffix
Ver. 1.00
45/120
GET_READER_DATALEN
Purpose
Syntax
Example
Description
READER_CONFIG_START
Purpose To start scanner setting procedure.
Syntax READER_CONFIG_START
Example READER_CONFIG_START
A%=READER_SENDCMD(11,1, CHR$(1))
Code-39
can read
READER_CONFIG_END
Description This command can start scanner setting procedure.
READER_CONFIG_END
Purpose
Syntax
Example
Description
Ver. 1.00
46/120
READER_SENDCMD
Purpose To send scanner command to change scanner status.
Syntax A%=READER_SENDCMD(N1% , N2% , S$)
Example READER_CONFIG_START
READER_CONFIG_END
Description This command can change scanner status.
A% is an integer variable to be assigned to the result.
A%
Meaning
Change fail
Change OK
READER_QUERY$
Purpose To query the scanner current setting.
Syntax A$=READER_QUERY$(N1% , N2%)
Example To query the scanner status (Code-128/Read).
Value$=READER_QUERY$(13, 1)
PRINT "Value:",ASC(Value $)
Preamble$=READER_QUERY$(8, 3)
Preamble
characters
PRINT " Preamble:"+ Preamble $
Description A$ is a string variable to be assigned to the result.
N1% is an integer variable, indicating the parameter1.
N2% is an integer variable, indicating the parameter2.
Refer to Appendix B for more details about the parameter
setting.
PT-Basic Programming Manual
Ver. 1.00
47/120
DECODE
Purpose To perform barcode decoding.
Syntax DECODE
Example
ENABLE READER(1)
MAIN:
IF DECODE <>0 THEN
CLS
LOCATE 0,0
A$=GET_READER_DATA$(1,4)
PRINT "DATA:"+A$
LOCATE 0,2
A$=GET_READER_DATA$(1,1)
PRINT "Name:"+A$
LOCATE 0,4
PRINT "Length:",GET_READER_DATALEN
LOCATE 0,6
A$=GET_READER_DATA$(1,2)
PRINT "FULL:"+A$
LOCATE 0,8
PRINT "ID:"+GET_READER_DATA$(1,3)
END IF
IF INKEY$=CHR$(27) THEN
DISABLE READER(1)
END
END IF
GOTO MAIN
Description Once the scanner port is initialized (by using ENABLE
READER command), call this DECODE command to
perform barcode decoding. This command should be called
constantly in user's program loops when barcode decoding is
required. If the barcode decoding is not required for a long
period of time, it is recommended that the scanner port be
disabled by using DISABLE READER command.
Ver. 1.00
48/120
STOP BEEP
Purpose To terminate beeper sequence.
Syntax STOP BEEP
Example BEEP(99,100,0,30,88,100,66,100,0,0)
WAIT(200)
STOP BEEP
Description The STOP BEEP statement terminates the beeping
immediately if there is a beeper sequence in progress.
Ver. 1.00
49/120
SET_BUZZER_VOL
Purpose
Syntax
Example
Description
Buzzer volume
close
Low
Medium
High
Ver. 1.00
50/120
DAY_OF_WEEK
Purpose
Syntax
Example
Description
TIME$
Purpose To set or to get the current time.
Syntax TIME$ = X$
Y$ = TIME$
Example PRINT TIME$
TIME $="180831"
PRINT TIME$
Description X$ is a string variable in the form of hhmmss.
TIME$ = X$, to set the current time.
Y$ is a string variable to be assigned to the result.
Y$ = TIME$, to get the current time, in the form of hhmmss.
TIMER
Purpose To return the number of seconds elapsed since the terminal is
powered on.
Syntax A% = TIMER
Example PRINT TIMER
Description A% is an integer variable to be assigned to the result.
Ver. 1.00
51/120
WAIT
Purpose
Syntax
Example
Description
Ver. 1.00
52/120
description
LED displays green light.
LED displays red light.
LED displays orange light.
mode%
description
1
2
3
Ver. 1.00
53/120
INKEY$
Purpose To read one character from the keypad buffer then remove it.
Syntax Str$ = INKEY$
Example START:
S$=INKEY$
IF S$<>"" THEN
PRINT ASC(S$)
IF ASC(S$)=27 THEN
ESC key
END
END IF
END IF
GOTO START
INPUT_LEN
Purpose To set or get input length when using INPUT or INPUT_S"
command.
Syntax X%= INPUT_LEN
INPUT_LEN=A%
Example INPUT_LEN=4
PRINT "INPUT STRING:"
A%=INPUT("",S$)
Ver. 1.00
54/120
INPUT
Purpose To retrieve input from the keypad and store it in a variable.
Syntax A%=INPUT(S$ , variable)
Example PRINT "INPUT STRING:"
Result%=INPUT("",String$)
Input a string variable
Meaning
Inputs correctly.
255
-1
Input error.
INPUT_S
PT-Basic Programming Manual
Ver. 1.00
55/120
Meaning
Inputs correctly.
255
-1
Input error.
INPUT_S_ CARRYENT
Purpose
Syntax
Example
Description
No
Yes
INPUT_S_VIBRATE
Purpose
Syntax
Example
Description
Meaning
Vibrate off
Vibrate on
Ver. 1.00
56/120
INPUT_S_SLEEP
Purpose To set scanner sleep on or off when using INPUT_S command.
Syntax INPUT_S_SLEEP(N%)
Example INPUT_S_SLEEP(1)
R%=INPUT_S("",S1$)
Scanner to sleep
Meaning
To sleep
INPUT_MODE
Purpose
Syntax
Example
Description
Meaning
KEY_CLICK
Purpose
Syntax
Example
Description
Ver. 1.00
57/120
ALPHA_LOCK
Purpose
Syntax
Example
Description
Alpha status
Default input
Unlock
Numeric mode
Lock
Lock
Lock
Numeric mode
GET_ALPHA_LOCK
Purpose
Syntax
Example
Description
GET_KEY_CLICK
Purpose
Syntax
Example
Description
Off
On
Ver. 1.00
58/120
KEYPAD_BL_TIMER
Purpose To set or get keypad backlight timer.
Syntax A% = KEYPAD_BL_TIMER
KEYPAD_BL_TIMER = X%
Example KEYPAD_BL(0)
PRINT "K,B timer=",KEYPAD_BL_TIMER
...
KEYPAD_BL_TIMER=3
Keypad backlight timer=3
sec
Description A% is an integer variable to be assigned to the keypad
backlight timer.
X% is an integer variable indicating a period of time in units
of 1-second.
KEYPAD_BL
Purpose
Syntax
Example
Description
Off
On
Ver. 1.00
59/120
DEF_PKEY
Purpose To change the definition of programmable key (P1 & P2) .
Syntax DEF_PKEY(N1% ,N2%)
Example DEF_PKEY(1,13)
P1 key define to ENT key
DEF_PKEY(2,49)
P2 key define to 1 key
DEF_PKEY(1,21)
P1 key define to P1 key
DEF_PKEY(2,22)
P2 key define to P2 key
DEF_PKEY(1,5)
P1 key define to UP key
DEF_PKEY(2,6)
P2 key define to DOWN key
DEF_PKEY(1,7)
P1 key define to LEFT key
DEF_PKEY(2,11)
P2 key define to RIGHT key
DEF_PKEY(1,27)
P1 key define to ESC key
DEF_PKEY(2,8)
P2 key define to BS key
DEF_PKEY(1,127)
P1 key define to DEL key
DEF_PKEY(2,32)
P2 key define to SP key
DEF_PKEY(1,45)
P1 key define to - key
Description N1%
Meaning
1
Define P1 key
Define P2 key
Ver. 1.00
60/120
BACK_LIGHT_DURATION
Purpose To specify how long the backlight will last once the terminal
is turned on.
Syntax BACK_LIGHT_DURATION(N%)
Example BACK_LIGHT_DURATION(20)
Description N% is an integer variable indicating the LCD backlight timer
in the range from 0 to 65535. It is specified in units of 1-sec.
If N%=0, then LCD backlight will always be on.
LCD_CONTRAST
Purpose
Syntax
Example
Description
CURSOR
Purpose To turn on/off the cursor indication in the activated
TextBlock.
Syntax CURSOR(status%)
Example CURSOR(1)
Description status% is an integer indicating the cursor on or off.
status%
Meaning
Cursor off
Cursor on
CURSOR_X
Purpose To get the x coordinate of the current cursor position in the
activated TextBlock.
Syntax X% = CURSOR_X
Example X% = CURSOR_X
Description X% is an integer variable to be assigned to the X coordinate
of the current cursor position.
Ver. 1.00
61/120
CURSOR_Y
Purpose To get the y coordinate of the current cursor position in the
activated TextBlock.
Syntax Y% = CURSOR_Y
Example Y% = CURSOR_Y
Description Y% is an integer variable to be assigned to the Y coordinate
of the current cursor position.
LOCATE
Purpose To move the cursor to a specified location in the activated
TextBlock.
Syntax LOCATE X% , Y%
Example LOCATE 0,0
LOCATE 2,3
FILL_RECT
Purpose To fill a rectangular area in the activated TextBlock with a
user defined color.
Syntax FILL_RECT(color% , left% , top% , width% , height%)
Example FILL_RECT(65280,100,100,100,100) green rectangular
area
Description Several the argument as follows:
color%
left %
top %
width%
height%
Ver. 1.00
62/120
ICON_ZONE_PRINT
Purpose
Syntax
Example
Description
Meaning
Status bar on
PRINT
Purpose To display data in the activated TextBlock.
Syntax PRINT expression[{,|;[expression]}]
Example PRINT "Print data"
X% = CURSOR_X
Y% = CURSOR_Y
PRINT "Cur. Location=>(";X%;",";Y%;")"
Description expression may be numeric or string expression.
The position of echo printed item is determined by the
punctuation used to separate items in the list. In the list of
expression, a comma causes the next character to be printed
after the last character with a blank space. A semicolon
causes the next character to be printed immediately after the
last character. If the list of expressions terminates without a
comma or semicolon, a carriage return is printed at the end of
the line.
CLR_RECT
Purpose To clear a rectangular area in the activated TextBlock. The
cursor position is not affected after the operation.
Syntax CLR_RECT(left% , top% , width% , height%)
Example CLR_RECT(100,100,100,100)
Description Several key argument as below:
left %
top %
width%
height%
Ver. 1.00
63/120
CLS
Purpose
Syntax
Example
Description
SHOW_IMAGE
Purpose
Syntax
Example
Description
top %
width%
height%
path$
CLR_EOL
Purpose To clear from where the cursor is to the end of the line. The
cursor position is not affected after the operation.
Syntax CLR_EOL
Example PRINT "TEST BASIC"
LOCATE 3,0
CLR_EOL
Description The CLR_EOL command clears from where the cursor is to
the end of the line and then moves the cursor to the original
place.
Ver. 1.00
64/120
3.13 Font
This utility SDK Tool can be used as the following:
When you need a font file for your application, you can make the font file by
SDK Tool, the font generator can help you making a font file.
Meaning
Set font OK
Font ID (2~9)
FontPath$
DISPFONT_INFO_TYPE
Purpose
Syntax
Example
Description
DISPFONT_INFO_HEIGHT
Purpose
Syntax
Example
Description
Ver. 1.00
65/120
DISPFONT_INFO_WIDTH
Purpose
Syntax
Example
Description
Ver. 1.00
66/120
3.14 TextBlock
TextBlock is a floating text printing rectangle area on LCD screen. TextBlock
defines activated area anywhere within LCD screen display. An out of display
area definition is not allowed.
Each TextBlock has individual attribute definition for position, size, font,
background color or bmp. There are total 16 TextBlocks. TextBlock(0) is system
default block. The setting of TextBlock(0) cant be executed. TextBlock(1~15)
are user defind.
Ver. 1.00
67/120
A%=SETTEXTBLOCK(1,0)
Define TextBlock OK
TextBlock number(1~15)
FontID%
Defined Font:
0~1: system font
2~9: user font.
BGType%
Color%
Background color
Column%
Row%
XPos%
Ver. 1.00
68/120
YPos%
DEFINETEXTBLOCK_IMAGE
Purpose To define the TextBlock setting and the background using bitmap
file or default background color.
Syntax A%=DEFINETEXTBLOCK_IMAGE(BlockNo% ,FontID% ,
BGType% ,BitmapPath$ ,Column% ,Row% ,XPos% ,YPos%)
Example A%=DEFINETEXTBLOCK_IMAGE(2,0,1,"d:\PROGRAM\5.bmp"
,8,6,120,30)
Description A% is an integer variable to be assigned to the result.
A%
Meaning
0
Define TextBlock OK
TextBlock number(1~15)
FontID%
Defined Font:
0~1: system font
2~9: user font.
BGType%
BitmapPath
$
Column%
Row%
XPos%
YPos%
Ver. 1.00
69/120
SETTEXTBLOCK
Purpose
Syntax
Example
Description
Meaning
Set TextBlock OK
TextBlock number(1~15)
Save%
RESETTEXTBLOCK
Purpose
Syntax
Example
Description
PRINTTEXTBLOCK
Purpose To print Text to specific TextBlock.
Syntax PRINTTEXTBLOCK
(BlockNo%, Column%, Row%, Str$ ,FontColor%)
Example PRINTTEXTBLOCK(2,5,5,"Hello",0) font color is black
Description Several key arguments as below:
BlockNo%
TextBlock number(0~15)
Column%
Row%
Str$
Text data.
GETTEXTBLOCKCUR_X
Purpose
Syntax
Example
Description
Ver. 1.00
70/120
GETTEXTBLOCKCUR_Y
Purpose
Syntax
Example
Description
SETTEXTBLOCKCUR
Purpose
Syntax
Example
Description
TextBlock number(0~15)
Column%
Row%
SHOWTEXTBLOCKCURSOR
Purpose
Syntax
Example
Description
TextBlock number(0~15)
Show %
1:Show cursor
0:Hide cursor
Type %
0: Cursor off.
1: Cursor on, and cursor type is a line as _.
2: Cursor on, and cursor type is a line as |.
3: Cursor on, and cursor type is a block as .
TEXTBLOCK_SETBGCOLOR
Purpose
Syntax
Example
Description
Ver. 1.00
71/120
TEXTBLOCK_SETBGIMAGE
Purpose
Syntax
Example
Description
Meaning
Setting fail
Setting OK
Ver. 1.00
72/120
OPENIN
Purpose To open (r mode) a DAT file and get the file for further
processing.
Syntax F% = OPENIN filename$
Example FilePath$="C:\DATA\Test.DAT"
fileID%=OPENIN FilePath $
Description F% is an integer variable to assigned to the result.
F%
Meaning
Other
Open successfully.
It returns the file handle.
Ver. 1.00
73/120
OPENOUT
Purpose To open (w+) a DAT file and get the file for further
processing.
Syntax F%=OPENOUT filename$
Example FilePath$="C:\DATA\Test.DAT"
fileID%=OPENOUT FilePath $
Description F% is sn integer variable to be assigned to the result.
F%
Meaning
Other
Ver. 1.00
74/120
OPENUP
Purpose To open (r+) a DAT file and get the file for further
processing.
Syntax F% = OPENUP filename$
Example FilePath$="C:\DATA\Test.DAT"
fileID%=OPENUP FilePath $
Description F% is sn integer variable to be assigned to the result.
F%
Meaning
Other
CLOSE
Purpose
Syntax
Example
Description
Ver. 1.00
75/120
BGET
Purpose To read a byte from a DAT file. The current position is
updated after reading.
Syntax STR% = BGET # FILEID%
Example STRING1%=BGET # FILEID%
PRINT CHR$(STRING1%)
Description STR% is an integer variable to be returned to the result.
FILEID% is an integer variable indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
BGETEXT
Purpose To read a specified number of bytes from a DAT file. The
current position is updated after reading.
Syntax STR$ = BGETEXT(N%) # FILEID%
Example STRING1$=BGETEXT(5)#FILEID%
PRINT STRING1$
PRINT "STRING LEN=",LEN(STRING1$)
Description STR$ is a string to be returned to the result.
N% is an integer indicating the number of bytes to be read.
FILEID% is an integer variable indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
Ver. 1.00
76/120
GET$
Purpose Read a line terminated by a null character \0 from a DAT
file.
Syntax FileData$ = GET$ # FILEID%
Example WHILE (EOF#FILEID% <> -1)
Str$=GET$ # FILEID%
PRINT Str$
WEND
Description FileData$ is a string to be returned to the result.
FILEID% is an integer variable indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
BPUT
Purpose To write data to a DAT file.
Syntax BPUT # FILEID% , <expr 1>, <expr 2>, ... ,<expr n>
Example AAA%=168
BPUT # FILEID%,STR$(AAA%),"HELLO"
Description FILEID% is an integer variable, indicating the file handle.
expr 1 ~ expr n is string expression indicating the string data
to write to DAT file.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
10
Ver. 1.00
77/120
EOF
Purpose To check if file pointer of a DAT file reaches end of file.
Syntax E%=EOF # FILEID%
Example WHILE (EOF#FILEID% <> -1)
Str$=GET$ # FILEID%
PRINT Str$
WEND
Description E% is an integer to be assigned to the result.
E%
Meaning
0 (False)
Not end-of-file.
-1 (True)
End-of-file
PTR
Purpose To get or move the file pointer position of a DAT file.
Syntax TELLPTR% = PTR # FILEID%
PTR # FILEID% = NPTR%
Example ...
TELLPTR%=PTR # FILEID%
PTR # FILEID% = 40
Description TELLPTR % is an integer variable to be assigned to the
result.
TELLPTR% = PTR # FILEID%, to get the file pointer
position of a DAT file.
NPTR % is an integer variable indicating the offset bytes
address been specified.
FILEID% is an integer variable indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
PT-Basic Programming Manual
Ver. 1.00
78/120
15
EXT
Purpose To get or change file length of a DAT file.
Syntax FILESIZE% = EXT # FILEID%
EXT # FILEID% = SIZE%
Example FILESIZE%=EXT # FILEID%
PRINT FILESIZE%
EXT # FILEID% = 20
Description FILESIZE% is an integer variable to be returned the file
length.
SIZE% is an integer variable indicating the length to be
changed of the file.
FILEID% is an integer variable indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
GET_FILE_ERROR
Purpose To get the file error code.
Syntax A%=GET_FILE_ERROR
Example A%=GET_FILE_ERROR
PRINT File error code:,A%
Description A% is an integer to be assigned to the result. If there is no
error, it returns 0. If it returns a value other than 0, its file
error code.
Ver. 1.00
79/120
DBMS Commands
DBMS_INIT_SEARCH
3.15.2
Meaning
DBMS initialization OK
DBMSID
%
DBMS ID (1~10)
S$
N1%
N2%
80/120
N3%
DBMS_CLOSE_SEARCH
Purpose
Syntax
Example
Description
DBMS_APPEND_DATA
Purpose To increase one record on the file end.
Syntax DBMS_APPEND_DATA(DBMSID%,data$)
Example data$ = "Happy, TEST, DBMS"
DBMS_APPEND_DATA(1,data$)
Description DBMSID% is an integer variable in the range from 1 to 10.
data$ is a string variable indicating the data of record introduced.
DBMS_DEL_DATA
Purpose
Syntax
Example
Description
DBMS_EMPTY
Purpose
Syntax
Example
Description
DBMS_FIND_RECORD
Purpose To search the designated field.
Syntax A%=DBMS_FIND_RECORD(DBMSID% , field% , key$)
Example A% = DBMS_FIND_RECORD(1, 2, " TEST3")
PRINT A%
Ver. 1.00
81/120
Meaning
Search defeat.
Other value
key $
DBMS_GET_COUNT
Purpose To obtain the figure of all records in the file.
Syntax A%=DBMS_GET_COUNT(DBMSID%)
Example A% = DBMS_GET_COUNT(1)
PRINT A%
Description A% is an integer variable to be assigned to the result.
DBMSID% is an integer variable in the range from 1 to 10.
DBMS_GET_DATA$
Purpose To read the data of appointed field in the appointed record.
Syntax A$=DBMS_GET_DATA$(DBMSID%, record%, field%)
Example A$ = DBMS_GET_DATA$(1, 3, 3)
PRINT A$
Description A$ is a string variable to be assigned to the result.
Several key arguments as below:
DBMSID% DBMS ID (1~10)
record %
field %
DBMS_UPDATE_DATA
Purpose
Syntax
Example
Description
field %
key$
Ver. 1.00
82/120
VIBRATOR
Purpose To set the vibrator on/off.
Syntax VIBRATOR(N%)
Example VIBRATOR(1)
Vibrator on
'Wait 0.5 sec
WAIT(100)
VIBRATOR(0)
Vibrator off
Description N% is an integer variable indicating vibrator on or off.
N%
Meaning
Vibrator off
Vibrator on
Ver. 1.00
83/120
OPEN_COM
Purpose To enable a specified COM port and initialize
communication.
Syntax OPEN_COM (N%)
Example OPEN_COM(1)
Description
N% is an integer variable indicating which COM port is to be
enabled (now we only can choose 1).
SET_COM
Purpose To set parameters of a specified COM port.
Syntax SET_COM(N%, Baudrate%, Parity%, Data%,
Handshake%)
Example SET_COM(1, 1, 1, 2, 1)
Description Several key arguments as below:
1: RS-232 (now we only can choose 1)
N%:
Baudrate%:
Parity%:
Data%:
Handshake%:
Ver. 1.00
Baud rate
1: 115200
2-3: 57600
4: 38400
5: 19200
6: 9600
7-8: 4800
Parity
1:None
2:Odd
3:Even
Data bits
1: 7 bits
2: 8 bits
Flow control
1: None
2: Auto Flow control
84/120
READ_COM$
Purpose To read data from a specified COM port.
Syntax A$ = READ_COM$(N%)
Example ON COM(1) GOSUB READ1
CLS
PRINT "==COM TEST=="
LOCATE 0,1
PRINT "ENT TO WRITE"
SET_COM(1,1,1,2,1)
OPEN_COM(1)
CLEAR_COM(1)
SET_RTS(1,1)
LOOP2:
IF INKEY$="" THEN
GOTO LOOP2
END IF
CLOSE_COM(1)
END
Description
READ1:
A$=READ_COM$(1)
PRINT A$
RETURN
A$ is a string variable to be assigned to the data.
N% is an integer variable indicating which COM port the
data is to be read (now we only can choose 1).
If the receiver buffer is empty, an empty string will be
returned.
Ver. 1.00
85/120
WRITE_COM
Purpose To send a string to the host through a specified COM port.
Syntax WRITE_COM(N%, A$)
Example CLS
PRINT "===COM TEST==="
PRINT "ENT TO WRITE"
SET_COM(1,1,1,2,1)
OPEN_COM(1)
WHILE INKEY$<>CHR$(13)
WEND
Description
STR1$="Hello!!"
WHILE GET_CTS(1)=0
WEND
WRITE_COM(1,STR1$)
CLOSE_COM(1)
END
N% is an integer variable indicating which COM port the
data is to be sent to (now we only can choose 1).
A$ is a string variable indicating the string to be sent.
GET_CTS
Purpose
Syntax
Example
Description
Meaning
Negated (Space)
Asserted (Mark)
Ver. 1.00
86/120
SET_RTS
Purpose
Syntax
Example
Description
Meaning
Negated (Space)
Asserted (Mark)
CLEAR_COM
Purpose To clear receiver buffer.
Syntax CLEAR_COM(N%)
Example CLEAR_COM(1)
Description N% is an integer variable indicating which COM port to
clear receive buffer (now we only can choose 1).
COM_DELIMITER
Purpose To change delimiter of sending and receiving string for a
specified COM port.
Syntax COM_DELIMITER(N% ,C%)
Example COM_DELIMITER(1,13)
use carriage return as
delimiter
COM_DELIMITER(1,38)
use & character as
delimiter
COM_DELIMITER(1,-1)
no delimiter
Description N% is an integer variable indicating which COM port is to be
set (now we only can choose 1).
C% is an integer variable indicating the ASCII code of the
delimiter character, in the range from 0 to 255. If it is other
value, no delimiter will be applied.
The default COM_DELIMITER is 0xd.
Ver. 1.00
87/120
FILE_TRANS
Purpose Using FILE_TRANS to upload or download files.
Syntax FILE_TRANS
Example FILE_TRANS
FILE_TRANS_REALTIME
Purpose Using FILE_TRANS_REALTIME to upload or download
files immediately.
Syntax FILE_TRANS_REALTIME(N%)
Example FILE_TRANS_REALTIME(1)
Description N% is an integer variable indicating the transmission state.
N%
Meaning
Real-time transmission.
Ver. 1.00
88/120
FILE_TRANS_BAUD
Purpose To get or set the transmission baud rate.
Syntax A% = FILE_TRANS_BAUD
FILE_TRANS_BAUD = X%
Example N%=FILE_TRANS_BAUD
FILE_TRANS_BAUD=2
baud rate is 38400 bps
Description A% is an integer variable to be assigned for the transmission
baud rate.
X% is an integer variable indicating baud rate to be set.
FILE_TRANS_BAUD
115200
57600
38400
19200
9600
4800
FILE_TRANS_INTERFACE
Purpose To get or set the transmission interface.
Syntax A% = FILE_TRANS_INTERFACE
FILE_TRANS_INTERFACE = X%
Example N%=FILE_TRANS_INTERFACE
FILE_TRANS_INTERFACE=0
RS-232
Description A% is an integer variable to be assigned for the transmission
interface.
X% is an integer variable indicating interface to be set.
FILE_TRANS_INTERFACE
Interface
RS-232
USB
Ver. 1.00
89/120
ROM_SIZE
Purpose
Syntax
Example
Description
FREE_MEMORY
Purpose To check the free space in disk C or disk D.
Syntax FREESIZE% = FREE_MEMORY(N%)
Example PRINT Free on disk C:;FREE_MEMORY(0)
PRINT Free on disk D:;FREE_MEMORY(1)
DISK_USEDSIZE
Purpose To check the occupid space in disk C or disk D.
Syntax USEDSIZE% = DISK_USEDSIZE(N%)
Example PRINT "USED C SIZE:",DISK_USEDSIZE(0)
PRINT "USED D SIZE:",DISK_USEDSIZE(1)
Description USEDSIZE% is an integer variable to be assigned for the
occupied space in disk C (N%=0) or disk D (N%=1).
Ver. 1.00
90/120
USB_CLOSE
Purpose
Syntax
Example
Description
USB_READ$
Purpose
Syntax
Example
Description
USB_WRITE
Purpose
Syntax
Example
Description
Ver. 1.00
91/120
BACKUPDATAFILETOPC
Purpose To backup a file from PDT to PC.
Syntax BACKUPDATAFILETOPC(PDTPath$ , PCPath$)
Example BACKUPDATAFILETOPC("D:\PROGRAM\5.BMP","d:\test.bmp
")
Description The BACKUPDATAFILETOPC command copies the simulator
datafile path specified by PDTPath$ to the PCPath$ in PC and
stored in PC with the same file name.
Ver. 1.00
92/120
4 Appendices
Appendix A
PT-Basic Commands list
A1.
General commands
Command
description
ABS
DIM
GOSUB
GOTO
INT
REM
SET_PRECISION
SGN
A2.
Command
IF THEN {ELSE IF}
[ELSE] END IF
ON GOSUB
ON GOTO
Ver. 1.00
description
To provide a decision structure for multiple-line
conditional execution.
To call one of the several specified subroutines
depending on the value of the expression.
To branch to one of several specified Line
Labels depending on the value of an expression.
93/120
A3.
description
To provide an alternative exit for looping
structures, such as FORNEXT and
WHILEWEND statements.
To repeat the execution of a block of statements
for a specified number of times.
To repeat the execution of a block of statements
while a certain condition is TRUE.
EXIT
FOR NEXT
WHILE WEND
Ver. 1.00
94/120
A4.
description
To return the length of a string.
To search if one string exists inside antoher one.
To retrieve a given number of characters from the
left side of the target string.
To retrieve a given number of characters from
anywhere of the target string.
To retrieve a given number of characters from the
right side of the target string.
To return a copy of a string with leading blank
spaces stripped.
To return a copy of a string with trailing blank
spaces stripped.
To return the decimal value for the ASCII code
for the first character of a given string.
To return the character for a given ASCII value.
To return a string that represents the hexadecimal
value (base 16) of the decimal argument.
To return a string that represents the octal value
(base 8) of the decimal argument.
To return a copy of a string in which all uppercase
letters will be converted to lowercase letters.
To return a copy of a string in which all lowercase
letters will be converted to uppercase letters.
To convert a numeric expression to a string.
To return the numeric value of a string expression
in interger form.
LEN
INSTR
LEFT$
MID$
RIGHT$
TRIM_LEFT$
TRIM_RIGHT$
ASC
CHR$
HEX$
OCT$
LCASE$
UCASE$
STR$
VAL
VALR
STRING$
Ver. 1.00
95/120
A5.
Command
OFF ALL
OFF ESC
OFF COM
OFF HOUR
OFF KEY
OFF MINUTE
OFF READER
OFF TIMER
ON COM GOSUB
ON ESC GOSUB
ON HOUR GOSUB
ON KEY GOSUB
ON MINUTE GOSUB
ON READER GOSUB
ON TIMER GOSUB
LOCK
description
To terminate all the event triggers.
To terminate ESC event trigger.
To terminate COM event trigger.
To terminate HOUR event trigger.
To terminate KEY event trigger.
To terminate MINUTE event trigger.
To terminate READER event trigger.
To terminate TIMER event trigger.
To activate COM event trigger.
To activate ESC event trigger.
To activate HOUR event trigger.
To activate KEY event trigger.
To activate MINUTE event trigger.
To activate READER event trigger.
To activate TIMER event trigger.
To hold all the activated event triggers until they
are released by UNLOCK.
To release all the activated event triggers held by
LOCK.
UNLOCK
A6.
System commands
Command
AUTO_OFF
DEVICE_ID$
GET_TARGET_MACHINE$
MENU
POWER_ON
RESTART
SYSTEM_INFORMATION$
SYS_SUSPEND
CHECK_AID
Ver. 1.00
description
To set auto power off timer.
To get the serial number of the terminal.
To get the model name of the target terminal.
To create a menu.
To determine whether to restart or resume the
program upon powering on.
To restart the system.
To get information on components.
To shut down the system.
To verify if the agency ID is correct or not.
96/120
A7.
Reader commands
Command
DISABLE READER
ENABLE READER
SLEEP_READER
GET_READER_DATA$
GET_READER_DATALEN
READER_CONFIG_START
READER_CONFIG_END
READER_SENDCMD
READER_QUERY$
DECODE
A8.
Buzzer commands
Command
description
To assign a beeper sequence to beeper
operation.
To terminate beeper sequence.
To set the buzzer volume.
BEEP
STOP BEEP
SET_BUZZER_VOL
A9.
description
To disable the reader ports of the terminal.
To enable the reader ports of the terminal.
To set scanner module to sleep.
To get data that is read from a specified reader
port.
To get data length that is read from a specified
reader port.
To start scanner setting procedure.
To end scanner setting procedure.
To send scanner command to change scanner
status.
To query the scanner current setting.
To perform barcode decoding.
description
To set or to get the current date.
To get the day of the week.
DATE$
DAY_OF_WEEK
TIME$
TIMER
WAIT
Ver. 1.00
97/120
A10.
LED command
Command
description
To set the LED indicators.
LED
A11.
Keypad commands
Command
CLR_KBD
INKEY$
INPUT_LEN
INPUT
INPUT_S
INPUT_S_ CARRYENT
INPUT_S_VIBRATE
INPUT_S_SLEEP
INPUT_MODE
KEY_CLICK
ALPHA_LOCK
GET_ALPHA_LOCK
GET_KEY_CLICK
KEYPAD_BL_TIMER
KEYPAD_BL
DEF_PKEY
description
To clear the keypad buffer.
To read one character from the keypad buffer
and then remove it.
To set or get input length when used
INPUT or INPUT_S" command.
To take user input from the keypad and store
it in a variable.
To take user input from the keypad, scanning
and store it in a variable.
To set ENT auto press on/off when use
INPUT_S command.
To set vibrator on or off when use
INPUT_S command.
To set scanner sleep on or off when use
INPUT_S command.
To set the display mode of the input data.
To enable or disable the key click sound.
To set the ALPHA state for input mode.
To get information of the ALPHA state for
input mode.
To get current key click status.
Ver. 1.00
98/120
A12.
LCD Commands
Command
BACK_LIGHT_DURATION
LCD_CONTRAST
CURSOR
CURSOR_X
CURSOR_Y
LOCATE
FILL_RECT
ICON_ZONE_PRINT
PRINT
CLR_RECT
CLS
SHOW_IMAGE
CLR_EOL
A13.
description
To specify how long the backlight will last
once the terminal been turned on.
Command
DISPFONT_SETFONT
DISPFONT_INFO_TYPE
DISPFONT_INFO_HEIGHT
DISPFONT_INFO_WIDTH
Ver. 1.00
description
To set user font from font file.
To get font type.
To get font height.
To get font width.
99/120
A14.
TextBlock commands
Command
DEFINETEXTBLOCK_COLOR
DEFINETEXTBLOCK_IMAGE
SETTEXTBLOCK
RESETTEXTBLOCK
PRINTTEXTBLOCK
GETTEXTBLOCKCUR_X
GETTEXTBLOCKCUR_Y
SETTEXTBLOCKCUR
SHOWTEXTBLOCKCURSOR
TEXTBLOCK_SETBGCOLOR
TEXTBLOCK_SETBGIMAGE
Ver. 1.00
description
To define the TextBlock setting and the
background using color or default background
color.
To define the TextBlock setting and the
background using bitmap file or default
background color.
To enable the specific TextBlock.
To disable the specific TextBlock.
To print Text to specific TextBlock.
To get the x coordinate of the current TextBlock
position.
To get the y coordinate of the current TextBlock
position.
To set specific TextBlock as active TextBlock
and set position.
To show or hide TextBlock cursor.
To set default background color.
To set default background image for bitmap file.
100/120
A15.
Command
OPENIN
OPENOUT
OPENUP
CLOSE
BGET
BGETEXT
GET$
BPUT
EOF
PTR
EXT
GET_FILE_ERROR
DBMS_INIT_SEARCH
DBMS_CLOSE_SEARCH
DBMS_APPEND_DATA
DBMS_DEL_DATA
DBMS_EMPTY
DBMS_FIND_RECORD
DBMS_GET_COUNT
DBMS_GET_DATA$
DBMS_UPDATE_DATA
description
To open (r) a DAT file and get the header of the file
for further processing.
To open (w+) a DAT file and get the header of the
file for further processing.
To open (r+) a DAT file and get the header of the
file for further processing.
To close a DAT file.
To read a byte from a DAT file.The current position
is updated after reading.
To read a specified number of bytes from a DAT
file. The current position is updated after reading.
Read a line terminated by a null character \0 from
a DAT file.
To write data to a DAT file.
To check if file pointer of a DAT file reaches end of
file.
To get or move the file pointer position of a DAT
file.
To get or change file length of a DAT file.
To get the file error code.
To initiate the file search in disk.
To close the file search in disk.
To increase one record on the file end.
To delete the appointed record in the file.
To remove all the record in the file.
To search the designated field.
To obtain the figure of all records in the file.
To read the data of appointed field in the appointed
record.
To revise the data of appointed field in appointed
field record.
Ver. 1.00
101/120
A16.
Vibrator commands
Command
VIBRATOR_TIMER
VIBRATOR
A17.
description
To set or get the vibrator timer.
To set the vibrator on/off.
Command
CLOSE_COM
description
To terminate communication and disable a
specified COM port.
To enable a specified COM port and initialize
OPEN_COM
communication.
To set parameters of a specified COM port.
SET_COM
To read data from a specified COM port.
READ_COM$
To send a string to the host through a specified
WRITE_COM
COM port.
To get CTS level.
GET_CTS
To set RTS level.
SET_RTS
To clear receiver buffer.
CLEAR_COM
To change delimiter of sending and receiving
COM_DELIMITER
string of a specified COM port.
Using FILE_TRANS to upload or download files.
FILE_TRANS
FILE_TRANS_REALTIME Using FILE_TRANS_REALTIME to upload or
download files immediately.
To get or set the FILE_TRANS baud rate.
FILE_TRANS_BAUD
FILE_TRANS_INTERFACE To get or set the FILE_TRANS interface.
A18.
Memory commands
Command
RAM_SIZE
ROM_SIZE
FREE_MEMORY
DISK_USEDSIZE
description
To check the total space in disk C.
To check the total space in disk D.
To check the free space in disk C or disk D.
To check the occupied space in disk C or disk D.
Ver. 1.00
102/120
A19.
USB commands
Command
USB_OPEN
USB_CLOSE
USB_READ$
description
To initialize and enable USB port.
To close the USB port.
To read specific number of bytes from USB
port.
To write specific number of bytes to the PC
side.
USB_WRITE
A20.
Command
COPYFILETOPDT
BACKUPDATAFILETOPC
Ver. 1.00
description
To copy a file from PC side to PDT.
To backup a file from PDT to PC.
103/120
Appendix B
Scan Module Configuration Table
Parameter1
5
Indication
6
Transmission
7
Scan
Parameter2
Alphanumeric Entry
2
LED indication
0: Disable
1: Enable
3
Buzzer indication
0: Disable
1: Enable
7
Code ID position
8
Code ID transmission
0: Disable
1: Proprietary ID
2: AIM ID
9
Code length
transmission
0: Disable
1: Enable
10
Code name
transmission
0: Disable
1: Enable
11
Case conversion
0: Disable
1: Upper case
2. Lower case
4
Double confirm
0~9
6
Global min. code length
0 ~ 64
7
Global max. code
length
0 ~ 64
8
Inverted image scan
0: Disable
1: Enable
Ver. 1.00
104/120
Parameter1
Parameter2
Alphanumeric Entry
8
String setting
2
Suffix characters setting
3
Preamble characters
settings
4
Postamble characters
settings
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: One digit
2: Two digits
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Code 11
Ver. 1.00
105/120
Parameter1
Parameter2
Alphanumeric Entry
11
Code 39
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 20
20: Truncate characters before
space
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Format
0: Standard
1: Full ASCII
13
Start/stop transmission
0: Disable
1: Enable
Ver. 1.00
106/120
Parameter1
Parameter2
Alphanumeric Entry
12
Code 93
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
Ver. 1.00
107/120
Parameter1
Parameter2
Alphanumeric Entry
13
Code 128
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Format
0: Standard
1: UCC.EAN 128
12
UCC/EAN 128 ID
setting
13
Concatenation code
Ver. 1.00
108/120
Parameter1
Parameter2
Alphanumeric Entry
14
Codabar
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Start/stop type
0: ABCD/ABCD
1: abcd/abcd
2: ABCD/TN*E
3: abcd/tn*e
11
Start/stop transmission
0: Disable
1: Enable
Ver. 1.00
109/120
Parameter1
Parameter2
Alphanumeric Entry
15
EAN 8
1
Read
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Supplement digits
0: None
1: 2 digits
2: 5 digits
3: 2, 5 digits
4: UCC/EAN 128
5: 2, UCC/EAN 128
6: 5, UCC/EAN 128
7: All
11
Truncation/expansion
0: None
1: Truncate leading zero
2: Expand to EAN 13
12
Expansion
0: Disable
1: Enable
Ver. 1.00
110/120
Parameter1
Parameter2
Alphanumeric Entry
16
EAN 13
1
Read
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Supplement digits
0: None
1: 2 digits
2: 5 digits
3: 2, 5 digits
4: UCC/EAN 128
5: 2, UCC/EAN 128
6: 5, UCC/EAN 128
7: All
12
ISBN/ISSN conversion
0: Disable
1: Enable
1
Read
0:Disable
1:Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
17
Industrial 2 of 5
Ver. 1.00
111/120
Parameter1
Parameter2
Alphanumeric Entry
18
Interleaved 2 of 5
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
19
Standard 2 of 5
Ver. 1.00
112/120
Parameter1
Parameter2
Alphanumeric Entry
20
MSI Plessey
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Mod 10
2: Mod 10/10
3: Mod 11/10
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
21
UK Plessey
Ver. 1.00
113/120
Parameter1
Parameter2
Alphanumeric Entry
22
Telepen
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Format
0: Numeric
1: Full ASCII
Ver. 1.00
114/120
Parameter1
Parameter2
Alphanumeric Entry
23
UPCA
1
Read
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Supplement digits
0: None
1: 2 digits
2. 5 digtis
3: 2, 5 digits
4: UCC/EAN 128
5: 2, UCC/EAN 128
6: 5, UCC/EAN 128
7: All
11
Truncate/expansion
0: None
1: Truncate leading zero
2: Expand to EAN 13
Ver. 1.00
115/120
Parameter1
Parameter2
Alphanumeric Entry
24
UPCE
1
Read
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Supplement digits
0: None
1: 2 digits
2: 5 digits
3: 2, 5 digits
4: UCC/EAN 128
5: 2, UCC/EAN 128
6: 5, UCC/EAN 128
7: All
11
Truncate/expansion
0: None
1: Truncate leading zero
2: Expand to EAN 13
3: Expand to UPCA
12
Expansion
0: Disable
1: Enable
13
UPCE-1
0: Disable
1: Enable
Ver. 1.00
116/120
Parameter1
Parameter2
Alphanumeric Entry
25
Matrix 25
1
Read
0: Disable
1: Enable
2
Check-sum verification
0: Disable
1: Enable
3
Check-sum
transmission
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
1
Read
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
28
China post
Ver. 1.00
117/120
Parameter1
Parameter2
Alphanumeric Entry
29
RSS 14
1
Read
0: Disable
1: Enable
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
11
UCC/EAN 128
emulation
0: Disable
1: Enable
1
Read
0: Disable
1: Enable
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
11
UCC/EAN 128
emulation
0: Disable
1: Enable
30
RSS Limited
Ver. 1.00
118/120
Parameter1
Parameter2
Alphanumeric Entry
31
RSS Expanded
1
Read
0: Disable
1: Enable
4
Max. code length
0 ~ 99
5
Min. code length
0 ~ 99
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
11
UCC/EAN 128
emulation
0: Disable
1: Enable
1
Read
0: Disable
1: Enable
4
Max. code length
0 ~ 64
5
Min. code length
0 ~ 64
6
Truncate leading
0 ~ 15
7
Truncate ending
0 ~ 15
8
Code ID setting
10
Leading A
0: Disable
1: Enable
32
Italian Pharmacode
39
Ver. 1.00
119/120