beautypg.com

Argox PA-20 Basic Programming Manual User Manual

Page 49

background image

PT-Basic Programming Manual Ver. 1.00

48/143

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.