THE EQUIPMENT REFERENCED IN THIS DOCUMENT COMPLIES WITH THE REQUIREMENTS IN
PART 15 OF FCC RULES FOR A CLASS B COMPUTING DEVICE. OPERATION OF THIS EQUIPMENT
IN A RESIDENTIAL AREA MAY CAUSE UNACCEPTABLE INTERFERENCE TO RADIO AND TV
RECEPTION.
Page 3
TABLE OF CONTENTS
OUTLINE1
BASIC INTERPRETER OVERVIEW1
BASIC INTERPRETER TABLE3
Basic Interpreter Table3
Operator4
Character Operation5
Control Flag5
The Basic Interpreter Mode can execute the printer’s program in BASIC format enabling
applications such as performing stand alone printing. Since the emulation content is different,
there is limitation in the application command which will be described in the manual.
BASIC INTERPRETER OVERVIEW
SPECIAL NOTES
•SEMBL-BASIC has changed the partial specification based on ZBI of the ZEBRA. Details
may be found in the Instruction Reference.
•Input is performed at the half-sized alphanumeric character ASCII Code in accordance with
ANSI.
•The valid code range is 20
CR(0D
and HT(09
16), LF(0A16, ETX(0316), and BS(0816). Other control codes will be ignored after receipt
16) will also be thrown out. There is not a code limitation in the string quote and
16, 7E16, and partial control code. The valid control code is only
CHR$().
•When 2 byte code and half-sized code (80
16 . FF16) at shiftout side is used for the LCD
display data string, it might not be generated correctly.
•Command input and parameters that accompany the command will not differentiate between
upper and lower case. When command and command parameter are entered in lower case,
or with the mixture of upper and lower, it will be interpreted similarly as if it is upper case.
•Numeric mark has the following limitation:
•Other than decimal numeral, numeral marks of hexdecimal, octal, and binary is
applicable.
NUMERALDESCRIPTION METHODEXAMPLE
Decimal
10
Hexidecimal
16
Octal
8
Binary
2
Data string that is composed by
using numeric of 0 thru 9.
Data string that is composed by
using both numeric &H. 0 thru
9 and alphabet A thru F.
Data string that is composed by
numeric of &O. 0 thru 7
Data string that is composed by
numeric of &B. 0 thru 1
1021, -5, 0
&H3FD, &H8005, -&H5, &H0
&H8005 and -&H5 shows the same value
&O1775, &O700005, -&O5, &O0
&O700005 and -&O5 shows the same
value
&B001111111101,
&B1000000000000101, &B101, &B0
•Only positive and negative integral numbers may be used. Fractions cannot be
assigned.
•As for hexadecimal, the lower case mark is allowed in A thru F.
SATO GT4xxe SEMBL User GuidePN 9001148APage 1
Page 6
•Integral numbers will be single-precision real numbers. Double-precision and
exponent mark is not allowed.
•The valid range of numerical value is -2147483647 thru 2147483637 (with code 4 byte value:
-7FFFFFFF
16 thru -7FFFFFFF16). When the valid range is exceeded, a rounded interpretation
within the valid range will be provided, but perhaps without the expected result.
•The maximum quantity of the digits for character string is 256. An error will appear if
exceeding the valid range.
•The definable number of numeric variable is at maximum 256.
•The definable number of string variable is at maximum 256.
•Both numeric variables and string variables can define the one-dimensional and two
dimensional arrays in the variable. In either case, the definable array element number is
defined in the number.
•Variable name is valid to 8 digits. Length exceeding 8 digits is interpreted by rounding off to 8
digits beginning at variable definition.
•Variable identifier distenguishes the upper and lower cases. In other words, variable WORK
and work, Work is all treated as other variable.
•Please assign the priority order by putting parenthesis at logical operation above 3 items:
e.g..IF (A = B) OR (A = C). 1 thru 32767.
•The line number is valid to 5 digits, and can be assigned with a range of 1 . 32767.
•The maximum times a line number can be programmed is 1000.
•The file number limit is that which can be stored in the extended memory cartridge. A memory
full error will appear if 512 KB is reached. About 32 byte will be consumed with each file.
•The following is the output format of BASIC syntax error during direct input (not RUN):
•Following is the output format of BASIC syntax error when running a program (RUN):
•818 (110) Syntax Error: file not found.
SATO GT4xxe SEMBL User GuidePN 9001148APage 2
Page 7
BASIC INTERPRETER TABLE
BASIC INTERPRETER TABLE
COMMANDCONTENTCOMPATIBILITY
AUTONUMLine number auto assign numberingX
BEEPBuilt-in BuzzerO
BREAKInterrupt executionO
CANCTRLCancel code enable/disableO
CLOSEChannel closeO
CLRERRError flag clearX
CTIMEObtain the internal clock counterO
CTIMERCancel theinternal clock timer settingO
CTRL-CForce interruptionO
DEBUGEnable the TRACE BREAKO
DIMVariable declarationO
DELETELine deletionO
KILLFile deletionO
DATEDate send-backO requires calendar IC
DATAREADYCheck the availability of assigned dataX
DIRFile name displayO
DO-LOOPEnable WHILE/UNTILX
ECHOLCD display ON/OFFO
ECHOBACKCancel receive code send-back settingO
ENDProgram endO
‘(APOSTROPHE)Commant startO
EXITProcess end (only EXIT FOR)O
FOR-LOOPLoop formO
GOTOUnconditional branchO
GOSUB-RETURNMigrate to assigned sub-routineO
IF.ENDIFConditional branchO
INARRAYArray inputO
INBYTE1 character inputO
INKEYKey switch inputO
INPUT1 line inputO
INUNTILTermination code assign inputO
LETSubstitutionO
LISTList displayO
LOADCalling programO
MAXSend-back the largest value of the twoX
SATO GT4xxe SEMBL User GuidePN 9001148APage 3
Page 8
BASIC INTERPRETER TABLE
COMMANDCONTENTCOMPATIBILITY
MAXLENSend-back the longest numerical stringX
MAXNUMSend-back the biggest numerical valueX
MINSend-back the smallest value among two of itX
CLEARInitialize programO
ON-CTIMERAssign destination when internal clock O
ON-ERRORAssign destination when error occurO
ON-TIME$Assign destination when timer interruptO
OPENChannel openO
ASCASCII code conversion of character stringO
OUTBYTE1 character outputO
POSPosition checkX
PRINT1 line outputO
REMAssign commentO
RENUMLine number changeO
RESTARTInterrupted program restartO
RUNRunning programO
SBPLAssign BASIC interpreter mode endO
SLEEPDelayO
STEPExecute stepO
SAVESave programO
SEARCHTO$Data SearchX
SETERRSet printer error flagX
TIMESend-back internal clock secondO require calendar IC
TIMERCancel interrupt timer settingO require calendar IC
TRACEDisplay execution result of the lineO
OPERATOR
COMMANDCONTENTCOMPATIBILITY
ANDAND operationO
NOTNegativeO
ORInclusive ORO
&Character conjunctionO
$Character typeO
<, <=, >, >=, =, <>ComparisonO
^, */, +-ArithmeticO
MIDCharacter extractO
MODDivide overflowO
SATO GT4xxe SEMBL User GuidePN 9001148APage 4
Page 9
CHARACTER OPERATION
COMMANDCONTENTCOMPATIBILITY
CHR$Character conversionO
DATES$Send-back the date with character stringO
LENSend-back the length with character stringO
STR$Value character conversionO
TIME$Acquire timerO
VALCharacter value conversionO
EXTRACT$Data extractionX
LCASE$Send-back of lower caseX
LTRIM$Delete left spaceX
REPEAT$Character repetitionX
RTRIMS$Delete right spaceX
UCASE$Send-back upper caseX
CONTROL FLAG
COMMANDCONTENTCOMPATIBILITY
ISERRORError flagO
ISWARNINGWarning flagO
GETSTATUSAcquisition of printer status informationO
SATO GT4xxe SEMBL User GuidePN 9001148APage 5
Page 10
INSTRUCTION REFERENCE
ECHO
FunctionCancel the setting of ouput data monitoring.
FormatECHO<ON/OF>
ExampleECHO ON
From ON assignment, the content of the standard output will be displayed onto the LCD at the same
time, enable the monitoring. End the monitoring by assigning OFF and return to the normal LCD display.
Except CRLF, characters that cannot be displayed such as control code, etc, will be displayed with “.”.
NOTE: During ECHO ON, the display of ONLINE/OFFLINE and QTY is suppressed. And the following
cases show that the ECHO ON setting is cancelled (OFF) automatically:
•error message displays when error occurs
•offline by pressing the LINE key.
CLOSE
FunctionClose the channel.
FormatCLOSE<#channel>
ExampleCLOSE#1
CLOSE is to shut down the channel allocated to the port opened by OPEN. The default port will be
reallocated to the closed channel. Input/Output is only allowed in the default port until it is reopened.
NOTE: When program is ended without executing END, the channel cannot be closed.
CTRL-C
FunctionForce termination of the program
Format0316
Example
Data that is sent from the PC to the printer becomes control code ETX (03
only when it is at Cancel Code “enable/disable” assign CANTRL ON.
10 DIM A,B,C AS INTEGER...declaration of integer-form variable.
20 DIM B(10) AS INTEGER ...declaration of integer-form 1-D array variable.
Example
Declare a variable based on a parameter. Definition of interger-form, string-form is enabled. Integerform is the integer in 4 bytes which takes the range of -2147483647 thru 2147483647. Legend of 1-D
and 2-D array is describable. Maximum for definition number of array name is up to 128 in both integerform and string-form. Interger-form and string-form is allowed to declare up to 256 variables respectively
(each array element is treated as interger-form or string-form).
30 DIM C(10,20) AS INTEGER ...declaration of integer-form 2-D array variable.
40 DIM S$,T$,U$ AS STRING ...declaration of string-form variable.
50 DIM T$(5) AS STRING ...declaration of string-form 1-D array variable.
60 DIM T$(5) AS STRING ...declaration of string-form 1-D array variable.
SATO GT4xxe SEMBL User GuidePN 9001148APage 6
Page 11
END
FunctionDeclare the end of a program.
FormatEND
ExampleEND
End the execution of a program, closes all channels and returns back to command leave. Although the
last END can be abbreviated in the program, channel closing cannot be executed.
FOR NEXT
FunctionExecute loop handling.
FOR<# variable>=<# from> TO <# form> [STEP <# form>]
Format
Example
Able to boil out from the loop with EXIT FOR. Allows use of nesting up to 24 groups with the entire
nesting inside and outside of GOSUB. STEP can take the value of both positive and negative definite.
The variable of NEXT cannot be abbreviated.
abbreviation
NEXT <# variable>
10 FOR X=1 TO 10
20 PRINT X; “:SEMBL IS FUN”
30 NEXT X
ASC
FunctionASCII code conversion of character string.
FormatASC ( <character string> )
10 LET A$=”ABC”
Example
20 PRINT ASC(A$)
>RUN
result 65
IF ENDIF
FunctionConditional branch
IF <Boolean-form> THEN
abbreviation
ELSE IF <Boolean-form> THEN
Format
Example
Nesting is applicable. When executing nesting, there is not an upper limit of the group.
abbreviation
ELSE
abbreviation
ENDIF
10 IF A$=”0” THEN
20 PRINT “SEMBL PRINTER”
30 ELSE IF A$=”1” THEN
40 PRINT “SEMBL IS GOOD”
50 ELSE
60 PRINT “X=0”
70 ENDIF
SATO GT4xxe SEMBL User GuidePN 9001148APage 7
Page 12
GOTO
FunctionJump to the assigned line, and then execute the program.
FormatGOTO<Line No.>
Example
10 PRINT “Sato Printers”
20 GOTO 10
Jump to <Line No.>, continue with program execution.
NOTE: When jumping from the inside to the outside of FOR-NEXT, or the opposite of FOR-NEXT, the
resultant behavior cannot not be predicted. Also, when Jumping from the inside to the outside of
GOSUB sub-routine, or the opposite of GOSUB sub-routine, the resultant behavior cannot be predicted.
INPUT
FunctionSubstitute the inputted 1 line data into the variable.
FormatINPUT [<#channel>,] <variable> [,variable]
10 OPEN “SPL” AS #1
20 INPUT #1, A$
Example
Enter line feed code (CR CR LF) as 1 line, data (exclusive of line feed code) in the line feed code will be
substituted with a variable. Remain at standby status until the line feed code is entered. The valid code
range is 20
16 . 7E16 , and partial control code CR(0D16), LF(0A16), ETX(0316), BS(0816) only. Back Space
will be executed (delete 1 character) when BS is available in the input data.
ETX signified force termination, when ETX is available in the input data, the program will terminate at
that point. However, if data is available subsequently after ETX, this data will be treated as a command
the resultant perfomance cannot be pridicted.
The upper limit of input data is 256 characters (CR locates at 257th character). If this limit is exceeded,
the result may not be as anticipated.
30 PRINT A$
40 END
>RUN
result: A000000 ...before RUN, when sending ENQ(05
16) from the HOST
Assign a KEY and INPUT at the open port. The printer’s original key operation will not be executed until
INPUT has ended.
LET
FunctionSubstitution of a value for the variable.
FormatLET <variable name> = <form>
10 LET J=1
20 J=(J+1)
Example
When entering the line number and adding legend, LET is allowed for non-descriptions. This is used
when data is entered without a line number to operate as a substitution. Substitutions have to be located
on the left side as a variable.
SATO GT4xxe SEMBL User GuidePN 9001148APage 8
30 PRINT J
>RUN
result: 2
Page 13
LIST
FunctionDisplay the program list.
FormatLIST [<initial line no.>] [-[<end line no.>]] del.up
>LIST 30 ...list & display the line of No. 30.
Example
This command cannot be executed by giving a line number. The assignment of a range can be made
even if a line number does not exist.
>LIST 30- ...list & display the line of No. 30 to the end.
>LIST 30-100 ...list & display the line of No. 30 to 100.
LOAD
FunctionLoad the program.
FormatLOAD <“file name”>
ExampleLOAD “PROGRAM1.BAS”
When the extended memory cartridge has not yet been installed, loading of the program cannot be
executed. As for the device that is assignable, please refer to Detail Specification of Command. This
command cannot be executed by giving a line number.
CLEAR
FunctionInitialize the program and variable on the memory.
FormatCLEAR
ExampleCLEAR
When clear is executed, the entire channel will be reassigned to the default port. This cannot be
executed by giving a line number.
OPEN
FunctionChannel open.
FormatOPEN <port name character string> AS <#channel>
Example10 OPEN “SPL” AS #1
Other than the standard output, OPEN is executed by assigning the port name defined by NAME before
its ran through the system. Refer to Details Specification Command for further details.
ACCESS descriptor does not have any meaning in SEMBL (all is sequential access).
OUTBYTE
FunctionGenerate 1 character
FormatOUTBYTE [<#channel>,]
OPEN “PO1” AS#1
LET A$=”Hello”
Example
OUTBYTE#1,A$
RUN
result: H
SATO GT4xxe SEMBL User GuidePN 9001148APage 9
Page 14
PRINT
FunctionGenerate 1 line
FormatPRINT [<#channel>,]<form>;<form>...[;]
10 LET A$=”This is a Printer”
20 LET B$=” of SATO.”
Example
30 PRINT A$;B$
RUN
result: This is a printer of SATO
The format can be linked with a separator “;” and its maximum allowed size is 1024 bytes. If “;” is not
placed at the end of the format, CRLF will be added automatically in the output result. Note that “;”
cannot be desrcibed without format.
REM
FunctionComment assignment
FormatREM [comment]
Example10 REM FORMAT1 PRINT LABEL
Please describe this command in the next row of the line number. The description cannot be made
before the line number, the middle, nor end of the line description.
Incrementation can be abbreviated. The default is 10. Start number and incrementation can be
abbreviated at the same time. The default for start number and incrementation is 10, 10. The start
number alone cannot be abbreviated. This command cannot be executed by giving a line number.
RESTART
FunctionRe-start of a terminate program.
FormatRESTART
Example
A program that is interrupted at CTRL-C(03
line. This command cannot be executed by giving a line number.
16) or BREAK will be restarted from the following interrupted
SATO GT4xxe SEMBL User GuidePN 9001148APage 10
Page 15
RUN
FunctionRunning a program.
FormatRUN [“file name”]
10 PRINT”SEMBL & SBPL”
Example
This command can be executed by giving a line number. When giving a file name as a parameter, LOAD
and execute this file. The program will not be executed if the parameter file cannot be LOADED.
>RUN
result: SEMBL & SBPL
SBPL
FunctionAssignment of BASIC Interpreter Mode End.
FormatSBPL
ExampleSBPL
To give a line number and description, please describe it before the END statement. However, the line
from SBPL statement onward will not be interrupted and will be thrown out.
SBPL text cannot be described consecutively after the SBPL command. Separate this text from the
BASIC program file into another file, then send it after confirming it has been returned to normal mode.
SLEEP
FunctionDelay
FormatSLEEP <standby time: unit in second:>
Example>10 SLEEP 60
Delay only the set time (units in seconds) of the line being assigned. During the delay, it can be
interrupted by inputting CTRL-C, input detection of CTRL-C is at each interval.
STEP
FunctionStep execution.
FormatSTEP
Example
Execute the program with a single step each when running every command.
SAVE
FunctionSave a program.
FormatSAVE <“file name”>
Example>SAVE “SATO!.BAS”
A program is usable after being saved. If the extend memory cartridge is not installed, the program
cannot be saved.
There is not a limitation on the storage file quantity nor their size in the program file stored in the
extended memory cartridge. The entire file cannot exceed 512KB or it cannot be saved. This command
can be executed by giving a line number.
SATO GT4xxe SEMBL User GuidePN 9001148APage 11
Page 16
AND
FunctionAND
FormatAND
Example<numerical value> AND <numerical value>
NOT
FunctionNegative
FormatNOT
10 LET A=5
Example
20 IF NOT A=0 THEN
30 PRINT A
40 ENDIF
OR
FunctionInclusive OR
Format<numerical value> OR <numerical value>
Example
&
FunctionCharacter conjunction
Format<character string> & <character string>
10 LET A$=”SEMBL”
20 LET B$=”SBPL”
Example
A space (20
16) is required in between & and 2 items character string.
10 LET A$=”SATO PRINTER SBPL”
20 LET B$=MID(A$,1,12)
Example
30 PRINT B$
>RUN
result: SATO PRINTER
MOD
FunctionOverflow calculation
FormatMOD(X,Y)
10 LET A=9
20 LET B=2
Example
30 PRINT MOD(A,B)
>RUN
result: 12
LEN
FunctionObtain the length of character string.
FormatLEN(A$)
10 LET A$=”SATO PRINTER”
Example
20 PRINT LEN(A$)
>RUN
Result: 12
SATO GT4xxe SEMBL User GuidePN 9001148APage 13
Page 18
VAL
FunctionNumerical value conversion of character string.
FormatVAL(<characterr string>)
10 LET A$=”123”
20 LET C=VAL(A$)
Example
The first character cannot convert data string other than the figure (ignored).
30 PRINT C
>RUN
result: 123
CHR$
FunctionValue of the character with the assigned character code is acquired.
FormatCHR$(>numerical experssion>)
10 LET A=97
Example
20 PRINT CHR$(A)
>RUN
result: a
STR$
FunctionCharacter conversion of numerical value.
FormatSTR$(numerical value)
10 LET A=53
Example
20 PRINT stR$(A)
>RUN
result: 53
DATE$
FunctionObtain date information.
FormatDATE$
10 PRINT DATES
Example
Date is in the order of YY/MM/DD. If calendar chip is not installed, the content becomes “**/**/**”.
>RUN
result: 03/10/20
TIME$
FunctionObtain time information.
FormatTIME$
10 PRINT TIME$
Example
Time is in the order of hh:mm:ss. If calendar chip is not installed, the content becomes “**:**:**”.
SATO GT4xxe SEMBL User GuidePN 9001148APage 14
>RUN
result: 23:15:30
Page 19
DELETE
FunctionDelete the line.
FormatDELETE <line number> [- [<line number>]]
>DELETE 10 ...delete line No.10
Example
When a line number is assigned and the subjected line is not available, the command will be invalid.
The line number range is from the assigned start line until the assigned end line. If the line subjected to
this assigned line is not available, the line that falls within this range will be taken as the subjected line.
This command can be executed by giving a line number.
>DELETE 10- ...delete line No.10 to the end
>DELETE 10-100 ...delete line No.10 to 100
KILL
FunctionDelete registration file
FormatKILL “file name”
Example>KILL “PROGRAM1.BAS” ... deletion of registration file
When a file name is assigned and the subjected file is not registered, the command will be invalid. This
command cannot be executed by giving a line number.
DIR
FunctionGenerate a list of file that has been stored.
FormatDIR [“file name”]
Example>DIR
Generates a list of BASIC files which has been stored in the extended memory cartridge for standard
output. This command cannot be executed by giving a line number.
ISERROR
FunctionThis is the printer error flag, Integer of non 0 is obtained when an error occurs.
FormatISERROR
10 LET ERRNO = ISERROR
20 IF ERRNO = 0 THEN
30 PRINT “NOT ERROR”
40 ELSE
Example
If the printer status is ONLINE or OFFLINE, it is 0. All errors that occur without specified reason, or
when a SEMBL peculiar error occurs, an integer except 0 will be returned. The return value when the
printer error occurs will conform to the error code of the error number icon displayed on the LCD. When
a SEMBL syntax error or SEMBL system error occurs, the return value will match the error code
included in the error message generated by SEMBL. When both happens at the same time, the priority
of error warnings will be printer error--> (printer alert) >SEMBL error. The list of ISERROR return value
is shown in the following tables.
SATO GT4xxe SEMBL User GuidePN 9001148APage 15
50 PRINT “ERROR “;ERRNO
60 ENDIF
70 END
>RUN
result: ERROR 7 ... when head is opened
46File name length limitation over822SEMBL syntax error
47Token number upper limit over823SEMBL syntax error
48False device824SEMBL syntax error
49FOR stack overflow825SEMBL syntax error
50Memory cartridge not assessible840SEMBL system error
51Memory cartridge R/W error841SEMBL system error
52Memory cartridge memory full842SEMBL system error
SATO GT4xxe SEMBL User GuidePN 9001148APage 17
Page 22
ISWARNING
FunctionThis is the printer warn flag. Integer of non 0 is obtained when warning occurs.
FormatISWARNING
10 LET WARNNO = ISWARNING
20 IF (WARNNO AND 3) = 0 THEN
30 PRINT “NOT WARNING”
40 ELSE
Example
Printer status will return a interger of 0 + n for OFFLINE and ONLINE respectively. Where n is the
warning code. However, when printer error occurs, warning code n will be in 0. And the warning will be
detected preferentially from SEMBL syntax error. The list of ISWARNING return values are shown in the
next table beginning at ONLINE & OFFLINE line status.
50 PRINT “WARNING”;WARNNO
60 ENDIF
70 END
>RUN
result: WARNING 1 ... online, ribbon near end
ISWARNING CONDITIONS
#
1ONLINENo warning00
2Ribbon near end11
3Receive buffer near full22
4Ribbon near end + receive buffer near full33
5Label near end44
6Ribbon near end + label near end55
7Receive buffer near full label near end66
8Ribbon near end + receive buffer near full + label near end77
9OFFLINENo warning0100
10Ribbon near end1101
11Receive buffer near full2102
12Ribbon near end + receive buffer near full3103
13Label near end4104
14Ribbon near end + label near end5105
15Receive buffer near full + label near end6106
16Ribbon near end + receive buffer near full + label near end7107
LINE
STATUS
WARNING CONDITION
WARN
CODE
RETURN
VALUE
SATO GT4xxe SEMBL User GuidePN 9001148APage 18
Page 23
STOP
FunctionInterrupt the execution of program.
FormatSTOP
10 PRINT “Line 1”
15 STOP
20 PRINT “Line 2”
Example
This command functions only at DEBUG ON.
>DEBUG ON
>RUN
result: Line 1
15 break >
EXIT FOR
FunctionBoil out the FOR-NEXT loop
FormatEXIT FOR
10 FOR I = 1 TO 10
20 PRINT I;
30 IF I = 3 THEN
40 EXIT FOR
Example
50 ENDIF
60 NEXT I
70 END
>RUN
result: 123
INKEY
FunctionDetect the key switch pressing of the printer.
FormatINKEY <variable>
10 INKEY A
20 PRINT A
Example
Return value from the key is prescribed. Detectable key is: LINE, FEED, LEFT, RIGHT, UP, DOWN,
ENTER, CANCEL, and FUNCTION. Trigger key (determine key) and shift key (key to be pressed
simultaneously) can be detected. Once INKEY is issued, key input will be detected, printer’s original key
operation may not operate until key input is detected and INKEY is completed.
30 END
>RUN
result: 2048 ... when pressing the LINE key
SATO GT4xxe SEMBL User GuidePN 9001148APage 19
Page 24
GOSUB RETURN
FunctionBranch to the sub-routine/recovery from the sub-routine.
Format
Example
Nesting of sub-routine recalls are allowed up to 8 groups.
GOSUB<line number>
RETURN
10 PRINT “Before GOSUB”
20 GOSUB 50
30 PRINT “After GOSUB”
40 END
50 PRINT “Into Subroutine”
60 Return
>RUN
result: Before GOSUB, Into Subroutine, After GOSUB
ON ERROR
Function
FormatON ERROR GOTO <line number> ON ERROR GOSUB <line number>
Example
Usage of GOTO or GOSUB to indicate if the ON ERROR will be as same as the usual GOTO and
GOSUB. The original return point of ON ERROR GOSUB is the next line of the error detect line.
To return to the operation program after an error is processed using ON ERROR GOTO, indicate the
GOTO at the end of error process.
When running the SEMBL program and a printer error is detected once, jump to the branch instruction
ON ERROR. The involved setting of ON ERROR will be cleared.
To operate the error detection continuously, set ON ERROR again. The ON ERROR assignment is not
inherited from another SEMBL program. The ON ERROR and ISERROR types are similar.
Detect printer error when executing SEMBL program, jump to the assigned branch
instruction.
10 ON ERROR GOTO 200
20 operation program
100 END
200 PRINT “PRINTER ERROR”
210 BREAK
>RUN (when printer error occur)
result: PRINTER ERROR. break
DEBUG
FunctionSet/cancel the debug mode.
FormatDEBUG <ON/OFF>
ExampleDEBUG ON
Set the debug mode by assigning ON. During the debug mode setting, TRACE and BREAK is valid for
standard operation. By assigning OFF, the debug mode will be cancelled and TRACE and BREAK will
not be processed. The default for non-assignment is off.
This command can be appied by executing direct input and providing line number.
SATO GT4xxe SEMBL User GuidePN 9001148APage 20
Page 25
TRACE
FunctionDisplay the trace information.
FormatTRACE <ON/OFF>
10 LET A=5
20 GOTO 40
30 PRINT “Error”
Example
40 PRINT A
>DEBUG ON
>TRACE ON
>RUN
result: <TRACE>00010, <TRACE> A=5, <TRACE>00020, <TRACE>00040, 5
By assigning ON, trace information will be displayed with the standard output by the following format
(<TRACE>trace information). The generated trace information will be entering the variable and the line
number. When the content of the defined variable changes, it will display as: <TRACE>variable$=new
substitution value. The line number will be displayed thusly: <TRACE>Line No.
By assigning OFF, output of trace information is completed. Default for non-assignment is Off. This
command can be appied by executing direct input and providing line number.
NOTE: Trace output from this command operates effectively only with DEBUG ON. No requirements are
needed for the order of assignments of DEBUG ON and TRACE ON.
‘ (APOSTROPHE)
FunctionStart the comment.
Format[form] ‘ [comment]
10 LET W=10 ‘Initialize
Example
20 PRINT w’;W+1
>RUN
result: 10
This command can be described in the optional location hereafter the line number. From this command
to the end of the line will be treated as comment, and will be ignored when executing this command.
This command cannot be described before, nor in the middle of, the line number.
NOTE: When the format is inserted midway, the inserted format may not be interpreted correctly. Even if
it is used as a separator HT(09
16) before the comment, it will be skipped. You must use a space (2016).
ECHOBACK
FunctionCancel receive code send-back setting
FormatECHOBACK <ON/OFF>
ExampleECHOBACK OFF
By assigning ON, data that is received at the communication port will be sent back to its origin divided
into 1 byte each. Cancel the send-back setting by assigning OFF by either running direct input or adding
the line number. The default setting for non-assignment is ON.
NOTE: With the ON setting, the input echo display setting of the terminal application must be canceled
on the host side. When the host side terminal application is not applied, it is recommended to set the
ECHOBACK OFF in order to speed up the process.
SATO GT4xxe SEMBL User GuidePN 9001148APage 21
Page 26
TIMER
FunctionCancel timer interruption setting
FormatTIMER <ON/OFF> [“setting timer”]
Example
By assigning ON, the timer interruption may be set from the time interrupt process. The timer
interruption is assigned by the format of HH:MM:SS within the character string and enclosed with ‘’’’. HH
allows two digit assignment of the hours with a maximum of 24. MM allows two digit assignment of the
minutes with a maximum of 59. SS allows two digit assignment of the seconds with a maximum of 59.
The timer assignment character string can be abbreviated. When it is abbreviated, the time section that
was assigned previously will be applied. Cancel the setting of timer interruption by entering OFF. This
command can be assigned by either running direct input or adding the line number.
TIMER ON “12:15:00”
TIMER OFF
ON TIME$~
Function
FormatON TIME$ GOTO <line number> ON TIME$ GOSUB <line number>
Example
With the assignment of TIMER ON, the preset timer’s progressed time will be detected and proceed
with branch execution. Usage of GOTO or GOSUB which is described after ON TIME$ will be similar to
the usual GOTO and GOSUB.
The return destination of ON TIME$ GOSUB is at the next line of timer match detection line. After timer
interruption of ON TIME$ GOTO, when you want to return back to the operation program, describe the
GOTO in the end of timer interruption.
While running the SEMBL program, timer interruption is detected once and multidrops onto ON TIME$
branch destination, this ON TIME$ branch destination is not inherited from another SEMBL program,
you are required to add a description within the operation program one by one if necessary.
NOTE: When the Calendar chip is not installed, timer interruption will not occur in the preset timer
depending on TIMER ON. Detection of setting timer that has progressed has to be executed before
running the next line. Hence, detection will not be running during SLEEP, do it only after ended SLEEP.
Detect timer interruption when running SEMBL program, jump to the assigned
branch instruction.
10 TIMER ON “10:30:00”
20 ON TIME$ GOSUB 100
30 operation progragrm
90 END
100 PRINT “Now On Time!”
110 RETURN
SATO GT4xxe SEMBL User GuidePN 9001148APage 22
Page 27
INBYTE
FunctionSubstitute the inputted 1 byte into the variable.
FormatINBYTE [<3channel>,] <variable>
10 OPEN “PO1” AS #1
20 FOR I=1 TO 8
30 INBYTE #1, INB$
40 PRINT ASC(INB$);”,”;
Example
Inclusive of the received byte that is ignored at INPUT, data will be read from the received buffer.
NOTE: INBYTE operates effectively only when data is sent to an open port: “PO1” and “PO2”. INBYTE
will behave unstably when INBYTE sends data to an open port other than “PO1” and “PO2”.
50 NEXT I
60 END
>RUN
result: 27,88,32,30,44,65,66,6 ... when sending ESC X 20, A B C from HOSTPC
to printer
BEEP
FunctionPrinter built-in bzzer beeps.
FormatBEEP [<tone>]
BEEP ... 1 short beep
BEEP 0 ... 1 short beep
Example
Short beeps last for 175 milliseconds and long beeps last for 400 millisecond. Interval of the continuous
beep (tone 2, 3, 4) is 5 millisecond or longer. This command can be assigned by either running direct
input or adding the line number. BEEP and BEEP 0 has the same behavior.
NOTE: When the buzzer beeps, the BASIC application is in suspension.
BEEP 1 ... 1 long beep
BEEP 2 ... 2 consecutive short beep
BEEP 3 ... 2 consecutive long beep
BEEP 4 ... 3 consecutive long beep
CANCTRL
FunctionSet cancel code (0316) into enable/disable.
FormatCANCTRL <ON/OFF>
ExampleCANCTRL ON
In cancel code ETX(0316) which is sent from the host, valid or invalid will be set with the assignment of
ON/OFF. Once cancel code is received during RUN from the CANCTRL ON, BREAK the execution of
BASIC program. From CANCTRL OFF, even if the cancel code is received during RUN, it will be read as
an invalid code. This command can be assigned by either running direct input or adding the line number.
The default setting is CANCTRL OFF (cancel invalid) for non-assignment.
SATO GT4xxe SEMBL User GuidePN 9001148APage 23
Page 28
GETSTATUS
FunctionObtain printer’s status information.
FormatGETSTATUS <character variable$>
10 DECLARE STRING STS$
20 GETSTATUS STS$
Example
Send the printer’s status information in accordance with currently established interface protocol. The
printer’s status information conforms to the format of ENQ respond data. When interface is setting at
serial is Ready/Busy or XON/XOFF, the interface will create the status information at format of
STATUS4 expediently.
For details of ENQ respond information format, you can refer to that item of each interface in the SBPL
Programin Guide.
30 PRINT “Printer Status :”;STS$
>RUN
result: Printer Status : A000000 .. when interface protocol is at STATUS4, no
error online standby to receive data.
CTIME
FunctionObtain progress time from system lock.
FormatCTIME
10 PRINT CTIME
Example
SEMBL operation time is notified by multiplying the count of the printer’s system clock. The recall value
range is 0 - 2147483647(H’7FFFFFFF). If the clock count exceeds the upper limit, it will return to 0 and
is applicable regardless of whether the calendar chip is installed. To convert the clock counter into units
of seconds, remember that 1 count=5 millisecond.
The clock count is initialized depending on the migration of SEMBL MODE and the system’s clock timer
setting command of CTIMER.
>RUN
result: 328790
CTIMER
FunctionCancel system lock timer setting.
FormatCTIMER <ON/OFF> [<clock count value>]
Example
By assigning ON, the clock count value that disrupts clock interruption is set when the current
progressed clock count is initialized into 0. 0 - 2147483647(H’7FFFFFFF) is given for interrupt timer.
The progressed clock counter value can be abbreviated. When it is abbreviated, the clock count value
that was assigned previously will be applied. By assigning OFF, the setting of the progressed clock
interruption is cancelled.
This command can be assigned by either running direct input or adding the line number.
SATO GT4xxe SEMBL User GuidePN 9001148APage 24
CTIMER ON 6000
CTIMER OFF
Page 29
ON CTIME
Function
Format
Example
By assigning CTIMER ON, the progression of the pre-set clock count is detected and proceeds with
branch execution. The usage of GOTO or GOSUB is described after the ON CTIME is similar to the
usual GOTO and GOSUB. The return destination of ON CTIME GOSUB will be the next line of the
progressed clock detection line.
After the progressed clock interruption has used the ON CTIME GOTO and you want to return to the
operation program, the description of GOTO must be added to the end of the interruption.
When running the SEMBL program, once the interruption clock is detected and multidrops to the ON
CTIME branch destination, the ON CTIME setting will be cleared. To continuously operate this
progressed clock interruption, assign ON CTIME again. The assignment of the ON CTIME branch
destination is not inherited from another SEMBL program, you must describe it in the operation program
ono by one if necessary.
NOTE: The progressed clock interruption will happen regardless of whether the calendar chip is
installed or not. Detection of the progressed clock is executed before running the next line. Thusly, start
the detection only after completing SLEEP but not during SLEEP.
Detect progressed clock interruption when running SEMBL program, jump to the
assigned branch instruction.
ON CTIME GOTO <line number>
ON CTIME GOSUB <line number>
10 CTIMER ON 6000
20 ON CTIME GOSUB 100
30 operation program
90 END
100 PRINT “30 Seconds Passed!”
110 RETURN
INARRAY
FunctionSubstitute the input data of byte array into the array variable.
10 DIM ARY(8) AS INTEGER
20 Open “PO1” AS #1
30 INARRAY #1,ARY(1),8
40 FOR I=1 TO 8
Example
The receive buffer reads the assigned byte size input data and stores it into the array variable in 1 byte
increments. The array variable is handed over as a command and storage start member must be
assigned. The storage start member can be assigned also for first non-member.
NOTE: INBYTE operates effectively only when printing to the open port of “PO1” and “PO2”. When
printed to an open port except “PO1” and “PO2”, the behavior is unstable. If the assigned variable does
not belong to the array variable, the command will become an error. If the assigned digit is larger than
the declaration of array variable, INARRAY implicitly extends to the maximum size of the array and then
stores the received data.
50 PRINT ASC(ARY(I));”,”;
60 NEXT I
70 END
>RUN
result: 27,88,32,30,44,65,66,67...when sending <ESC>X20,ABC from HOSTPC
to the printer.
SATO GT4xxe SEMBL User GuidePN 9001148APage 25
Page 30
INUNTIL
Function
Substitute the input data of byte array into the array variable until obtaining the end
code.
10 DIM ARY(10) AS INTEGER
20 OPEN “PO1” AS #1
30 INUNTIL #1,ARY(1),10,0
40 FOR I=1 TO 10
50 PRINT ASC(ARY(I));”,”;
60 IF ASC(ARY(I))=THEN
Example
70 END
80 ENDIF
90 NEXT I
100 GOTO 30
>RUN
result: 65,66,67,68,69,70,72,73,74,75,76,77,0, ...when sending ABCDEF
GHIJKL<NUL>from HOSTPC to the printer.
The receive buffer reads the input data containing the assigned end code and stores the data into an
array variable in 1 byte increments. This command operates after initializing all array elements by the
end code before receiving data. The array variable is provided as a command requiring the storage start
number to be assigned. The storage start number can also be assigned for the non-first number.
NOTE: INUNTIL operates effectively only when printing to the open port of “PO1” and “PO2”. When
printed to open port except “PO1” and “PO2”, the behavior is unstable. If the assigned variable does not
belong to an array variable, the command will become an error. If the receive digit is larger than the
declaration of an array variable, INUNTIL implicitly extends the array number to the assigned input digit
and then stores the received data.
Even if the receive byte size exceeds the assigned input size, the end code cannot be obtained and the
command will be ended. If the data is received, INUNTIL must be printed again. You can judge whether
to reprint INUNTIL or not by checking the array end member to determine if it is the end code.
SATO GT4xxe SEMBL User GuidePN 9001148APage 26
Page 31
SPECIFICATION DETAILS OF THE COMMAND
DEVICE
DEVICEDEFAULTDESCRIPTIONSUMMARY
ANot defined
BCARDAssigned to extend FLASH-ROM cartridgeFixed operation*
CNot defined
DNot defined
EROMAssigned into built-in FLASH-ROMNot supported
FNot defined
GNot defined
HNot defined
INot defined
JNot defined
KNot defined
LNot defined
MNot defined
NNot defined
ONot defined
PNot defined
QNot defined
RMEMORYAssigned into built-in SDRAMNot supported
SNot defined
TNot defined
UNot defined
VNot defined
WNot defined
XNot defined
YNot defined
ZNot defined
* SBPL which is supposed to be installed in new scantro does not have command to re-define the
memory device. In the SEMBL which is supposed to be installed in new scantro, device is not defined
yet, B: treat it as assigned. If there is no extension assignment, add “.BAS” automatically (during storing,
reading).
SATO GT4xxe SEMBL User GuidePN 9001148APage 27
Page 32
PORT
Channel number subjected to definition. There are ten types definable: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
The zero (0) is the default for non-assignment. Standard console output will be assigned
(generally is screen, interface allocated to data port in printer.
Port name can be opened (key word). Port name is the key word of 3 fixed character, below is
assigned by the system.
PORT
SYMBOLDESCRIPTIONINPUTOUTPUTAPPLICABLE
PO1Connect to the data port as the printer.o(o)o
PO2Connect to the sub-port as the printer.o(o)o
LCDConnect to LCD screen of operation panel.xoo
EXT
SCNNo mechanism for standard or option (for extension)..x
SW1Not used - DSW not installed.oxx
SW2Not used - DSW not installed.oxx
SW3Not used - DSW not installed.oxx
SW4
KEYConnect to every key.oxo
LEDConnect to every lamp.xox
SPLPrinter’s input/output.ooo
DEFConnect to data port.ooo
Output from printer to PC is not working for data port/sub-port and centronics parallel. the setting of data
port/sub-port is executed at printer’s menu setting (interface mode). As for SW4, sensors of dispenser
and cutter is valid only when installing optional mechanism. The input value is undefined for noninstallation. If data port is set in currently installed extension IF board (parallel, serial, LAN, USB),
standard IF board (mini LAN) will become sub-port. If data port is set in standard IF board (mini LAN),
currently installed extension IF board (parallel, serial, LAN, USB) will become sub-port.
Connect to external input port (PRIN/PRIN2),
external output port (PREND/PE/MC_ERR/CE)
Connect to sensors of: head open, dispenser, cutter,
ribbon supply and rewind.
ooo
(o)xo
SATO GT4xxe SEMBL User GuidePN 9001148APage 28
Page 33
INPUT PROCESS
SYMBOLDESCRIPTIONINPUT UNIT
PO1Read data received from data port.1 line or 1 byte
PO2Read data received from sub-port.1 line or 1 byte
LCDCannot input..
EXTRead input data from external signal input Port 1 and 2 (PRIN/PRIN2).1 byte
SCNCannot input..
SW1Cannot input..
SW2Cannot input..
SW3Cannot input..
SW4
Read status information of sensors: head open, dispenser, cutter, ribbon
supply and rewind.
1 byte
KEYRead every key.2 byte
LEDCannot input..
SPLRead status data (serial status 1 or SOH return data) sent-back to PC.Define size
DEFRead data received from the data port.1 line or 1 byte
OUTPUT PROCESS
SYMBOLDESCRIPTIONOUTPUT UNIT
PO1Output data to PC return data or external connection device into sub-port.Option
PO2Output data to PC return data or external connection device into data port.Option
LCDOperation panel screen. Occupy 2 lines of scrollable message display.Option
EXTExternal output signal into signal output port (PREND/PE/MC_ERR/CE).1 byte
SCNCannot output..
SW1Cannot output..
SW2Cannot output..
SW3Cannot output..
SW4Cannot output..
KEYCannot output..
LEDCannot output..
SPLHand over (become print data) as data received from SBPL analyst.Option
DEFOutput as PC return data into data port.Option
NOTE: .SER.PAR.LAN.USB.LN2.DEF echo back the output content onto LCD by assignment. . To display onto the
LCD with a maximum of 16 characters onto each line. All characters beyond 16 will not be displayed.
SATO GT4xxe SEMBL User GuidePN 9001148APage 29
Page 34
KEY INPUT VALUE (USING PRINTER KEY ONLY)
1514131211109876543210.VALUEKEY
X0000110241FEED
X0001020482LINE
X0001130723ENTER
X0010040964CANCEL
X0010151205RIGHT
X0011061446LEFT
0011171687UP
0100081928DOWN
0100192169FUNCTION
00000n/a
Fomula: key input value.trigger value x 1024.shift key value.
The trigger key value shows the value obtained with the pressing of a single key to decide input. The
trigger key value is calculated from 6 bits of the upper bit (inside of 2 bytes) in which polarity bit has to be
excluded.
To remove only the trigger value, divide the key value by 1024 and obtain the quotient. The trigger and
shift keys are not allowed for simultaneous input if the keys are the same. Among nine (9) keys, they
cannot entirely be shift keys.
KEY INPUT VALUE (USING SHIFT KEY + PRINTER KEY)
1514131211109876543210.VALUEKEY
X000000000111FEED
X000000001022LINE
X000000010044ENTER
X000000100088CANCEL
X00000100001616RIGHT
X00001000003232LEFT
X00010000006464UP
X0010000000128128DOWN
X0100000000256256FUNCTION
X0000000000N/A
Fomula: key input value.trigger value x 1024.shift key value.
The shift key value shows values of all keys that can be pressed simultaneously. When two or more
keys are pressed simultaneously, the key input value will be the add-up sum (OR) of the shift key value.
Hence, th actual value of the shift key to be obtained when pressing two or more keys simultaneously,
will be displayed in the total sum value of each pressed shift key.
Example: press ENTER while pressing LINE.FUNCTION.DOWN simultaneously and the key input value
. ENTER(3) x 1024 . (LINE(2) . FUNCTION(256) . DOWN(128) . 3072 . 386 . 3458
The shift key value is calculated from 10 bits of the lower bit (inside of 2 bytes) in which one (1) bit each
is allocated so that it allows multiple keys to be pressed at the same time. To remove only the trigger
value, divide the key value by 1024 and obtain the quotient.
The trigger and shift keys are not allowed for simultaneous input if the keys are the same. Among nine
(9) keys, they cannot entirely be shift keys.
SATO GT4xxe SEMBL User GuidePN 9001148APage 30
Page 35
KEY WORDS
VALID KEY WORDS
#KEY WORD#KEY WORD
1ACCESS34MOD
2AND
3AS
4ASC
5CHR
6CLOSE
7CTIME
8CTIMER
9DATE
10DELETE
11DEBUG
12DIM
13DIR
14ECHO
15ECHOBACK
16ELSE
17END
18ENDIF
19ERROR
20EXIT
21FOR
22GOSUB
23GOTO
24IF
25INBYTE58TIMER
26INKEY
27INPUT
28ISERROR61VAL
29ISWARNING
30KILL
31LEFT
32LEN
33MID
NOTE: Regardless of the upper and lower case, key words are apllicable in the BASIC syntax as a
variable name.
35NEXT
36NOT
37INTEGER
38OFF
39ON
40OR
41OUTBYTE
42PRINT
43REM
44RENUM
45RESTART
46RETURN
47RIGHT
48RUN
49SAVE
50SBPL
51SLEEP
52STEP
53STOP
54STR
55STRING
56THEN
57TIME
59TO
60TRACE
62‘.
63&B
64&H
65&O
SATO GT4xxe SEMBL User GuidePN 9001148APage 31
Page 36
INVALID KEY WORDS
#KEY WORD#KEY WORD
1AUTONUM10MAXNUM
2CLRERR
3DATAREADY
4DO
5LCASE
6LOOP
7LTRIM
8MAX
9MAXLEN
NOTE: These are only recommended for use as variable names in the BASIC syntax regardless of their
case.
11POS
12REPEAT
13RTRIM
14SEARCHTO
15SETERR
16UCASE
17UNTIL
18WHILE
SATO GT4xxe SEMBL User GuidePN 9001148APage 32
Page 37
ERROR MESSAGES
The table below displays the list error messages generated by BASIC interpreter with standard
output.
ERROR MESSAGES
#ERROR MESSAGEOUTPUT CONDITIONS
1801 syntax error: invalid command
2802 syntax error: if nesting out of order
3803 syntax error: divide by zero (0)
4804 syntax error: line/strings length >256
5805 syntax error: print buffer overflow
6806 syntax error: value not integer
7807 syntax error: value not strings
8808 syntax error: no else/endif
9809 syntax error: no destination to go
10810 syntax error: no next
11811 syntax error: array count > 128
12812 syntax error: value count > 256
13813 syntax error: channel number > 9
14814 syntax error: illegal port nameNon-definition port name
15815 syntax error: line count >1000Exceed line’s upper limit
16816 syntax error: line number > 32767Exceed line number’s upper limit
17817 syntax error: illegal line numberCharacter other than numeric is included in the line
18818 syntax error: file not foundThe assigned file cannot be found
19819 syntax error: gosub stack overflowGOSUB nesting group exceeds upper limit of 8 groups
20820 syntax error: return without gosubRETURN not accompanied by GOSUB is discovered
821 syntax error: filename not
21
recognized
22822 syntax error: filename too longFilename exceeds the defined length
23823 syntax error: no parameter memoryNumber exceeded 64 of the controlled upper limit
25825 syntax error: for-next stack overflowFOR-NEXT nesting group exceeds the 24 upper limit
26826 syntax error: timer not recognized
27827 syntax error: illegal goto destinationGOTO destination conflict. Go further into block group
28828 syntax error: beep number > 4Exceeds the upper limit of printer’s built-in buffer zone
29840 syntax error: unreachable device
30841 syntax error: device read/write failFailed to write data into extension memory cartridge
31842 syntax error: device memory fullCapacity of the memory cartridge is insufficient
Found character not defined in the filename
Filename format is removed from 8.3 format
Found character not defined in the time assignment
Time assignment exceeds the valid range
Cannot access to the extension memory cartridge
(includes non-installation)
SATO GT4xxe SEMBL User GuidePN 9001148APage 33
Page 38
FUNCTIONALITY
There are three ways to enter the SEMBL Mode:
•send SEMBL migration command
•SEMBL selection by LCD menu
•preset the SEMBL auto-run feature.
Once the migration to the SEMBL Mode is complete, the printer will generate the character string
of “WELCOME!<CR><LF>” to the standard output.
SEND MIGRATION COMMAND OF SEMBL
In the Online Mode, send the SBPL command of SEMBL migration. The printer will immediately
migrate from the online mode to SEMBL Mode so the text will executed. The following is an
example of the send data: ESC A ESC C I ESC Z
CAUTION
Do not confuse the ESC C I with other SBPL commands. Do not describe
SEMBL text after the above mentioned SBPL data. When shifting from online
to SEMBL mode, clear the receive buffer once. SEMBL text that is sent
continuously cannot be secured. Send SEMBL text following mode migration.
By giving a program a name that is stored as a parameter in the ESC C I, the program will run
automatically. Details may be found in the “Auto Run of BASIC Program” chapter that follows.
SEMBL SELECTION BY LCD MENU
The following procedure provides instruction on how to shift to the SEMBL Mode by use of the
LCD menu without dependence on the transmission of the SEMBL migration command. Details
may be found in the “Auto Run of BASIC Program” chapter that follows.
1.Press the LINE key to take the printer offline.
2.Press the ENTER key to display the Mode Select screen.
3.Select the SEMBL MODE icon.
4.Press the ENTER key to access the START PROGRAM select screen.
5.Select NONE and then press ENTER to enter the SEMBL Mode.
PRESET SEMBL AUTO-EXECUTION
By setting the SEMBL auto run feature in the Advanced Mode, the printer can operate in SEMBL
Mode automatically when powering on. Details may be found in the “Auto Run of BASIC
Program” chapter that follows.
1. Press the LINE key to take the printer offline.
2.Press the ENTER key to display the Mode Select screen.
3.Select the ADVANCED MODE icon.
4.Press the ENTER key several times to access the SEMBL MODE AUTO START screen.
5.Select NONE and then press ENTER key to power on in the SEMBL Mode thereafter.
SATO GT4xxe SEMBL User GuidePN 9001148APage 34
Page 39
AUTO EXECUTION OF BASIC PROGRAM
There are two methods to run the BASIC program which is registered in the printer:
•Auto run when shifting to SEMBL Mode,
•Auto run when inputting power.
AUTO RUN WHEN SHIFTING TO SEMBL MODE
There are two ways to initiate this activity:
•using SEMBL Mode shifting command,
•select SEMBL MODE from the LCD menu.
(1)
USINGSEMBLMODESHIFTINGCOMMAND
As the parameter of SBPL command of the SEMBL Mode shifting, the registered program name
is handed over. Example: ESC CI , PROGRAM1.BAS
Read the same name of the BASIC program file from the extended memory cartridge and then
allow it to auto RUN.
After the PROGRAM FINISHED execution, it remains with the SEMBL Mode. The READ
PROGRAM LIST will not disappear.
(2)
SELECTSEMBLMODEFROMTHELCDMENU
Use the up and down keys to select the terget program name and press the ENTER key in the
START PROGRAM select screen (refer to previous).
Read the same name in the BASIC program file from the extended memory cartridge and then let
it auto RUN. After the program is finishes execution, it remains with the SEMBL Mode. The
READ PROGRAM list will not disappear.
AUTO RUN WHEN INPUTTING POWER
Use the up and down keys to select the target program name and press th ENTER key in the
SEMBL MODE AUTO START screen (refer to previous).
When powering on again, read the same name BASIC program file from the extended memory
cartridge while starting the printer with SEMBL Mode, and then allow it to RUN. After the program
finishes execution, it remains with the SEMBL Mode. The READ PROGRAM list will not
disappear.
SATO GT4xxe SEMBL User GuidePN 9001148APage 35
Page 40
EXITING FROM THE SEMBL MODE
There are four methods of shifting from SEMBL Mode to usual mode (online mode):
•Send SBPL shift command,
•select other than SEMBL MODE from the LCD menu,
•power on/off,
•other SEMBL Mode exit conditions.
Neither of the stored BASIC programs will be cancelled. Once exited from the SEMBL Mode is
entered, the printer will generate a character string of “GOODBYE.<CR><LF>” to the standard
output.
SEND SEMBL SHIFT COMMAND
Send th direct command SBPL to th printer with the SEMBL Mode. The printer will immediately
shift from SEMBL to Online mode enabling the process of SBPL text.
NOTE
SBPL command is not allowed with execution that applies to the line number.
Do not describe the SBPL text after the SBPL command.
When shifting is made from SEMBL to Online Mode, clear the received buffer
once. Otherwise the SEMBL text is sent continuously and cannot be secured.
Send the SEMBL text after confirming the mode migration.
SELECT OTHER THAN SEMBL FROM LCD
Once the printer is shifted from the SEMBL Mode to another mode, it is BO from the SEMBL
Mode. In other words, it is not only shifting to the Online Mode, but also meaning that when the
printer enters into each mode, the related SEMBL Mode has come to an end.
1. Press the LINE key to take the printer offline.
2. Press the ENTER key to display the Mode Select screen.
3. Select the SEMBL Mode icon and press the ENTER key.
4. For the Online Mode, the printer automatically goes online. For all other modes,
enter the password to shift. Once the password is canceled, return to the SEMBL
Mode is possible.
POWER ON/OFF
Power off the printer and then restore the power to restart in the Noline Mode providing that the
SEMBL Auto Run setting is NO within the Advanced Mode.
OTHER SEMBL MODE EXIT CONDITIONS
The printer is able to exit from the SEMBL Mode unconditionally when YES is selected at the
CANCEL PRINT JOB and ENTER is pressed - the printer will shift to the Online Mode. This does
not apply to the POWER ON/OFF condition.
SATO GT4xxe SEMBL User GuidePN 9001148APage 36
Page 41
BASIC OPERATION OF SEMBL MODE
SEMBL allows the data processing function to operate as a BASIC Interpreter. Therefore,
registration to the extended memory cartridge from the BASIC program download and the BASIC
debug operation are carried out in the interactive mode.
Below is an example of how to carry out ths operation in the interactive mode with the printer in
SEMBL mode using the Hyperterminal application for Windows.
FILE PREPARATION TO SEND
Hyperterminal cannot edit the optional transmission text on the application. Hence, to run a
relatively heavy operation program, it is recommended that BASIC text transmission be created
by a separated editor and then prepare it as a file in advance. Example:
Operation Program File
10 REM Program 1
20 DECLARE STRING s$
30 S$ = “SATO PRINTER”
40 OPEN #1: NAME “SPL”
50 PRINT #1: CHR$(27);”A”
60 PRINT #1: CHR$(27);”X22,”;S$;
70 PRINT #1: CHR$(27);”Z”;
80 END
A direct command and a single basic program can be sent by inputting them on the terminal
screen of the Hyperterminal according to the prompt (“>”) returned by the printer.
HYPERTHERMAL SETTINGS
Hyperthermal can connect with the communication either with serial line or Windows SOCKET.
The following example explains the process of connecting to COM1:
•Connection MethodDirectly to COM1
•EmulationAuto Detect
•Telnet Terminal IDANSI
•Buffer Line Number500
•ASCII SettingWhen sending data, local echo OFF, add ON to
the line feed character at the end of the line.
The following is the property screen for setting file SBI.ht based on the above criteria for
Hyperterminal in the Windows 98 platform.
Use the ECHOBACK ON (default) on the SEMBL side for this scenario.
SATO GT4xxe SEMBL User GuidePN 9001148APage 37
Page 42
SATO GT4xxe SEMBL User GuidePN 9001148APage 38
Screen Sequence for Setting Hyperterminal
Page 43
HYPERTERMINAL OPERATION
Send the previously prepared BASIC text file through the transfer menu .send text file. . This is
done by programming the registration through the transmission of the Operation Program file,
checking the operation from the RUN command direct input, and saving the registration program
from the STORE command direct input.
Once pressing the CTRL key and C simultaneously, CTRL-C control code (03
16) will be sent to
the printer. By pasting on edit menu/copy on the host side, the text area that is selected on the
terminal screen can be copied/pasted.
RPUTY FILE TRANSMISSION
Files that use RpUty can be transferred without depending on Hyperterminal. However, in ordere
to throw away the text sent from the printer, status check of the SEMBL can only be done by LCD
display with ECHO ON.
REPEATING EXECUTION
There are two ways that this may be perfromed: forming a repeating loop in the BASIC operation
program or combining SEMBL auto run with the SBPL command. The following displays the
SBPL data send:
Registered BASIC
……
…
SATO GT4xxe SEMBL User GuidePN 9001148APage 39
Page 44
REMARKS FOR SEMBL OPERATION
SEMBL always generates a prompt to print the output data and the status information data of
operational standard output. The standard ouput of SEMBL is allocated in the data port.
Therefore, it combines the status notification data of ENQ and SOH responses and sends to the
data port connection a signal that the host’s status monitor might not be properly working.
To carry out the host’s status monitoring while operating in SEMBL, the sub-port is only allowed
to be used for status monitoring. Thusly, the sub-port can no longer be used for external device
connection.
Example 1
Example 2
?
?
?
?
?
SATO GT4xxe SEMBL User GuidePN 9001148APage 40
?
?
?
?
?
?
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.