- 27 -
6. ITEMS TO BE CHANGED
Some parts of the BASIC program may need to be changed to use the Z-MODE.
This document is a guide for modifying the program.
6.1 MODIFICATION TO ZEBRA COMMANDS BY USING THE BASIC PROGRAM
In case a print result looks different from that of Zebra printer, ZPL commands sent from the upper
system can be modified with the BASIC program in the printer into ZPL commands that generates the
same result before conversion. In this case, a modification to the BASIC program and a change to the
parameter settings by using the Z-MODE setting tool are required.
- Standard conversion
Received data (ZPL) ==> GETCMDZB(ZPL to TPCL) ==> Command analysis, drawing, and printing
- Custom conversion
Received data (ZPL) ==> GETCMDZ(ZPL) ==> Basic program (ZPL to ZPL)
==> GETCMDZB(ZPL to TPCL) ==> Command analysis, drawing, and printing
6.2 MODIFICATION TO THE BASIC PROGRAM
Main routine of the BASIC main program (Before modification)
*MAIN
REM
********** To switch the source for commands analysis to SDATA2$(0) comment out then next 4 lines
REM
NOTE: Remember to set the Source for the GETCMDZB to basic application in the initial file setting !!!!!!!!
SDATA1$(0) = ""
WHILE SDATA1$(0) = ""
CNT% = GETCMDZB( STARTCODE$ , STARTCODE2$ )
'070413 Mod
WEND
REM
***** To activate the use of SDATA2$(0) as the source for command analysis remove the comment from the next 4
lines
REM
SDATA2$(0) = ""
REM
WHILE SDATA2$(0) = ""
REM
CNT% = GETCMDZ( STARTCODE$ , STARTCODE2$ )
'Transfer the command into SDATA1$(0) and SDATA2$(0)
REM
WEND
REM
'*** Check and change the Zebra command stored in SDATA2$(0) ***
REM
' Each change in the original data required should be inserted here
REM
IF LEFT$(SDATA2$(0), 6) = "^F00,0" THEN SDATA2$(0) = "^FO0,0"
'Example : Check for the error 0 instead of O in the field origin
REM
IF LEFT$(SDATA2$(0), 4) = "^CI5" THEN SDATA2$(0) = "^CI0"
'Example : Incoming command is ^CI5 change this to ^CI0 for processing
REM
IF LEFT$(SDATA2$(0), 3) = "^XZ" THEN SDATA2$(0) = "^FO350,700^A0N,100,50^FD- TEST!!! -^FS^XZ"
'Example : When ^XZ is received insert the extra data command
REM
the above example could be used to insert any command (like RFID) or logo into an existing system without
changing the original data stream
REM
***** To activate the use of SDATA2$(0) as the source for command analysis remove the comment from the next 3
lines
REM
SDATA1$(0) = ""
REM
CNT% = GETCMDZB( STARTCODE$ , STARTCODE2$ )
'Check the data in SDATA2$(0) and transfer it to SDATA1$(0)
REM
IF SDATA1$(0) = "" THEN *MAIN
'If no data in SDATA1$(0) return to get next command
REM
'*********** End of change area. It is recommended only to change the above lines and only to the incoming data
stream
ZCONVCMD( CMDBUF$ , LONGCMD% )
IF CMDBUF$ = "" GOTO *MAIN
*MAIN_010
GOSUB *CMD_CHECK
*MAIN_END
IF CMD_XFFLG% = 2 THEN GOSUB *SET_CMD : GOTO *MAIN_010
GOTO *MAIN