Paxar Gold 6037EX User Manual

Size:
2.78 Mb
Download

Field

Description

 

 

uchEnableUPCE1

Enable/disable the ability to scan

 

UPCE1 bar codes.

 

Default: SCN_DISABLE

uchEnableEAN8

Enable/disable the ability to scan EAN8

 

bar codes.

 

Default: SCN_ENABLE

uchEnableEAN13

Enable/disable the ability to scan

 

EAN13 bar codes.

 

Default: SCN_ENABLE

uchEnableBookEAN

Enable/disable the ability to scan

 

Bookland EAN bar codes.

 

Default: SCN_DISABLE

uchEnableSupps

Enable/disable the ability to scan

 

supplemental characters (+2, +5)

 

according to code format conventions

 

(UPCA+2, UPCE0+2, etc.). You can

 

also specify to scan bar codes with or

 

without supplemental characters.

 

Values are:

 

0

Disable (can scan with or without

 

 

supplementals, but supplementals

 

 

are ignored)

 

1

Enable (cannot scan

 

 

supplementals)

 

2

Scan with or without

 

 

supplementals, but do not ignore

 

 

the supplementals.

 

Default: SCN_DISABLE

Data Structure Reference 5-17

Field

Description

 

 

uchEnableSuppRedun

The number of times to scan bar codes

 

without supplementals before

 

transmission. Five or more is

 

recommended when scanning a mix of

 

UPC/EAN bar codes with and without

 

supplementals. You must set

 

uchEnableSupps is set to2 when setting

 

this parameter. Single digit numbers

 

must have a leading zero. Values are 2-

 

20.

 

 

Default: 7

uchXmitUPCAChkDgt

Enable/disable the requirement to

 

transmit UPCA bar codes with the check

 

digit.

 

 

Default: SCN_ENABLE

uchXmitUPCEChkDgt

Enable/disable the requirement to

 

transmit UPCE0 bar codes with the

 

check digit.

 

Default: SCN_ENABLE

uchXmitUPCE1ChkDgt

Enable/disable the requirement to

 

transmit UPCE1 bar codes with the

 

check digit.

 

Default: SCN_ENABLE

uchUPCAPreamble

Specifies how to transmit lead-in

 

characters for UPCA bar codes. Values

 

are:

 

 

0

Do not transmit

 

1

Transmit system character

 

2

Transmit system character and

 

 

country code

 

Default: 1

5-18Programmer’s Manual

Field

Description

 

 

 

 

uchUPCEPreamble

Specifies how to transmit lead-in

 

characters for UPCE0 bar codes.

 

Values are:

 

0

Do not transmit

 

1

Transmit system character

 

2

Transmit system character and

 

 

country code

 

Default: 1

uchUPCE1Preamble

Specifies how to transmit lead-in

 

characters for UPCE1 bar codes.

 

Values are:

 

0

Do not transmit

 

1

Transmit system character

 

2

Transmit system character and

 

 

country code

 

Default: 1

uchCvtUPCEtoUPCA

Enable/disable the requirement to

 

convert UPCE0 bar codes to UPCA bar

 

codes before transmission. After

 

conversion, the bar code is affected by

 

UPCA programming selections.

 

Default: SCN_DISABLE

uchCvtUPCE1toUPCA

Enable/disable the requirement to

 

convert UPCE1 bar codes to UPCA bar

 

codes before transmission. After

 

conversion, the bar code is affected by

 

UPCA programming selections.

 

Default: SCN_DISABLE

uchEAN8ZeroExtend

Enable/disable the addition of five

 

leading zeros to scanned EAN8 bar

 

codes to make them compatible with

 

EAN13 bar codes. Values are 1

 

(enable) or 2 (disable).

 

Default: SCN_DISABLE

 

 

Data Structure Reference 5-19

Field

Description

 

 

uchCvtEAN8toEAN13

Enable/disable the ability to convert

 

EAN8 zero-extendedbar codes to

 

EAN13 format. You must enable

 

uchEAN8ZeroExtend when enabling this

 

parameter.

 

Default: SCN_ENABLE

uchSecurityLevel

The scan security level for UPC/EAN

 

bar codes. See “Scan Security Levels”

 

for descriptions of each level. Values

 

are 0-3.

 

Default: 0

uchEnableCouponCode

Enable/disable the ability to scan UPCA,

 

UPCA+2, UPCA+5, and UPC/EAN128

 

bar codes. You must set

 

uchEnableSupps to2 when enabling this

 

parameter.

 

Default: SCN_DISABLE

Scan Security Levels

The security level specifies how aggressive the scanner works during a scan. With a low bar code quality, the scanner must work more aggressively, and vice versa. Choose the minimum security level you need, according to the following guidelines:

Level Description

0Provides security sufficient for bar codes that meet specifications.

1Provides security sufficient for bad scans that are limited to characters 1, 2, 7, and 8.

2Provides security sufficient for bad scans that are not limited to characters 1, 2, 7, and 8.

3Provides security for continued bad scans after you increase security to level 2.

You may need to adjust the security as needed during scanning.

5-20Programmer’s Manual

P R O G R A M M I N G T E C H N I Q U E S 6

Many applications have common features, such as requiring the operator to press the trigger to initiate processing.

This chapter describes the code you write to add such common features to your application. It includes code for the following features:

Printing Labels

Pausing While Printing

Loading Multiple Packets Together

Building Packets Dynamically

Using the Scanner

Reading Trigger Pulls

Audio/Visual Feedback

P r i n t i n g L a b e l s

An application prints labels by submitting MPCL packets to the Print subsystem. At a minimum, the application must submit format and batch packets. To submit these packets, use either pclWrite or pclOpen.

For more information, see “pclWrite” or “pclOpen” in Chapter 4. For information about MPCL packets, refer to the Packet Reference Manual.

A batch packet starts a print job, which makes an asynchronous call to the Print subsystem. After submitting a print job, the application should call pclStatus in a loop, waiting until the printer becomes free. See “Pausing While Printing” for more information.

Programming Techniques 6-1

An application can

print single labels.

print multiple labels.

reprint labels.

No matter what printing method it uses, the application must

1. Initialize the Print subsystem using pclInit.

2. Calibrate the supplies using pclCalibrate or pclCalibratePaper (if using supplies other than fax paper).

3. Call pclPaperSetup if pclCalibratePaper was called in the previous step.

4. Print using any method listed above.

5. Close the Print subsystem with pclClose.

Printing Single Labels

To print single labels, send a format and a batch (with a quantity of 1) to the printer. SAMPLE1.C in the Samples subdirectory illustrates printing single labels.

Printing Multiple Labels

An application can print multiple labels in a strip or in a loop. When setting up a method to print multiple labels, you must specify one of the following

quantity

peel mode/on-peelmode

feed mode

6-2Programmer’s Manual

Quantity

Use either or both of the following methods to control the quantity of labels printed:

Set up a print loop by placing any C/C++ loop construct around the code that prints the labels. The number of times the loop executes is the number of labels printed.

Adjust the batch packet’s quantity parameter before submitting the batch. Refer to the Packet Reference Manual for more information.

Peel Mode/Non - Peel Mode

In peel mode, the printer separates labels from the backing paper, which allows you to apply labels immediately. In nonpeel mode, the printer feeds the supply through the printer in a continuous strip. In a print loop, the printer may or may not be in peel mode. The mode you want depends on how you load the supplies in the printer. Refer to the Equipment Manual for more information.

You cannot use linerless supplies in peel mode.

Feed Mode

Feed mode determines how the printer prints the labels. There are two feed modes:

Mode

Description

 

 

Continuous

The printer prints all labels together (in one strip)

 

immediately, with no operator intervention.

On-Demand

The printer prints the labels one at a time. It does

 

not print the next label until the operator removes

 

the previous one.

You specify the feed mode in the batch packet with the batch control line’s second parameter. Refer to the Packet Reference Manual for more information.

Programming Techniques 6-3

Reprinting Labels

To reprint labels, submit the following batch with pclWrite:

{B, format, U, quantity|}

where format is the format number andquantity is the number of labels to print.

P a u s i n g W h i l e P r i n t i n g

After submitting a packet that prints labels, an application should pause until the printer becomes free. To check if the printer is busy, the application calls pclStatus. By calling pclStatus in a loop, the application pauses until the printer finishes.

The following code illustrates how to pause the application using pclStatus.

while ((iStatus = pclStatus()) == 1);

See “pclStatus” in Chapter 4 for more information.

L o a d i n g M u l t i p l e P a c k e t s T o g e t h e r

The application can load multiple packets together after it initializes the Print subsystem. You can create one or more text files containing any number of packets, and then pass those file names to pclOpen. The application must call pclOpen only once per file.

If the packet file contains a format and a batch, the call to pclOpen also prints labels.

SAMPLE4.C in the Samples sub-directoryillustrates loading multiple packets together.

6-4Programmer’s Manual

B u i l d i n g P a c k e t s D y n a m i c a l l y

An application can use fixed packets or packets that change every time they are used, such as in an application where the operator enters the quantity for the batch. When packets change every time they are used, the application must build the packet dynamically.

SAMPLE3.C in the Samples sub-directoryillustrates building packets dynamically.

U s i n g t h e S c a n n e r

An application uses the printer’s scanner to read bar codes as follows:

1. Enable the scanner with scnScannerOpen or scnOpenScannerShared.

2. If necessary, configure the scanner using the scnGetxxx and scnSetxxx functions.

3. Use any scanner function to operate the scanner. These functions are described in Chapter 4 and all begin with anscn prefix.

4. Disable the scanner with scnCloseScanner.

SAMPLE5.C in the Samples sub-directoryillustrates how to use the scanner.

R e a d i n g T r i g g e r P u l l s

Pressing any key (including pulling the trigger) sends a code to the application for it to read. The trigger emulates an F11 as an extended character code. To read a trigger pull, the application reads two characters. If the first character is a zero and the second is 0x85, the operator pulled the trigger.

SAMPLE1.C in the Samples sub-directoryillustrates reading trigger pulls.

Programming Techniques 6-5

A u d i o / V i s u a l F e e d b a c k

It is recommended that in the application, you include some sort of audio or visual feedback indicating that the trigger has been pulled.

For example, after a trigger pull, the application may have the printer beep. Without such feedback, most users keep pulling, not realizing the pull has registered.

6-6Programmer’s Manual