- 28 -Main routine of the BASIC main program (After modification)Customize the portion enclosed with the dotted rectangle in accordance with the command you want toconvert to.The above example executes the following two conversions:(1) When a ^FO (Field Origin) command is wrongly sent as ^F0 (ZERO), this value is corrected to ‘0.’IF LEFT$(SDATA2$(0), 6) = "^F00,0" THEN SDATA2$(0) = "^FO0,0"(2) When the incoming command is ^CI5, this is changed to ^CI0.IF LEFT$(SDATA2$(0), 4) = "^CI5" THEN SDATA2$(0) = "^CI0"(3) When ^XZ is received, the extra data command is inserted.IF LEFT$(SDATA2$(0), 3) = "^XZ" THEN SDATA2$(0) = "^FO350,700^A0N,100,50^FD- TEST!!! -^FS^XZ"6.3 MODIFICATION TO THE SETTING TOOLSelect BASIC Application for the “GETCMDZB: Get data from” on the Initial values & table settingscreen.For details, refer to the Z-MODE Setting Tool Manual.*MAINREM ********** To switch the source for commands analysis to SDATA2$(0) comment out then next 4 linesREM NOTE: Remember to set the Source for the GETCMDZB to basic application in the initial file setting !!!!!!!!REM SDATA1$(0) = ""REM WHILE SDATA1$(0) = ""REM CNT% = GETCMDZB( STARTCODE$ , STARTCODE2$ ) '070413 ModREM WENDREM ***** To activate the use of SDATA2$(0) as the source for command analysis remove the comment from the next 4linesSDATA2$(0) = ""WHILE SDATA2$(0) = ""CNT% = GETCMDZ( STARTCODE$ , STARTCODE2$ )'Transfer the command into SDATA1$(0) and SDATA2$(0)WENDREM '*** Check and change the Zebra command stored in SDATA2$(0) ***REM ' Each change in the original data required should be inserted hereIF LEFT$(SDATA2$(0), 6) = "^F00,0" THEN SDATA2$(0) = "^FO0,0"'Example : Check for the error 0 instead of O in the field originIF LEFT$(SDATA2$(0), 4) = "^CI5" THEN SDATA2$(0) = "^CI0"'Example : Incoming command is ^CI5 change this to ^CI0 for processingIF 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 commandREM the above example could be used to insert any command (like RFID) or logo into an existing system withoutchanging the original data streamREM ***** To activate the use of SDATA2$(0) as the source for command analysis remove the comment from the next 3linesSDATA1$(0) = ""CNT% = GETCMDZB( STARTCODE$ , STARTCODE2$ )'Check the data in SDATA2$(0) and transfer it to SDATA1$(0)IF SDATA1$(0) = "" THEN *MAIN 'If no data in SDATA1$(0) return to get next commandREM '*********** End of change area. It is recommended only to change the above lines and only to the incoming datastreamZCONVCMD( CMDBUF$ , LONGCMD% )IF CMDBUF$ = "" GOTO *MAIN*MAIN_010GOSUB *CMD_CHECK*MAIN_ENDIF CMD_XFFLG% = 2 THEN GOSUB *SET_CMD : GOTO *MAIN_010GOTO *MAIN