Paxar Gold 6037EX User Manual

Size:
2.78 Mb
Download

printf("\nPress the same key: ");

// Test the mode

while (_kbhit())

 

;

 

iInput = _getch();

 

printf("\nYou pressed %c\n", iInput);

 

}

Function Reference 4-5

k b d S e t A l p h a

Description

Changes the keypad’s data entry mode to Lower-caseAlpha mode.

Syntax

void kbdSetAlpha (void);

Parameters

None

Return Values

None

Example

#include <stdio.h> #include <conio.h> #include "mmsultra.h"

void main(void)

 

{

// Saved mode

int iSavedmode = 0;

int iInput = 0;

// Key entered

kbdSetAlpha();

// Set Lower-caseAlpha

iSavedmode = kbdGetMode();

// Save the current mode

kbdSetCaps();

// Set Upper-caseAlpha

printf("Press an alphabetic\nkey: "); // Test the mode

while (_kbhit())

 

;

 

iInput = _getch();

 

printf("\nYou pressed %c\n", iInput);

// Return to prev. mode

kbdRestoreMode(iSavedmode);

4-6Programmer’s Manual

printf("\nPress the same\nkey: "); // Test the mode while (_kbhit())

;

iInput = _getch();

printf("\nYou pressed %c\n", iInput);

}

Function Reference 4-7

k b d S e t C a p s

Description

Changes the keypad’s data entry mode to Upper-caseAlpha mode.

Syntax

void kbdSetCaps(void);

Parameters

None

Return Values

None

Example

See “kbdSetAlpha” for an example.

4-8Programmer’s Manual

k b d S e t F u n c t

Description

Changes the keypad’s data entry mode to Function Key mode.

Syntax

void kbdSetFunct(void);

Parameters

None

Return Values

None

Function Reference 4-9

kbdClrFunct(); iInput = _getch(); if (iInput == 0x3F)
{
Example
#include <stdio.h> #include <conio.h> #include "mmsultra.h"
void main(void)
{
int iInput = 0; int iNum = 0;
kbdSetNormal();
kbdSetFunct();
printf("Press 5 to print\nlabels\n"); iInput = _getch();
if (iInput == 0x00)
{

// Prompted input

// # of labels to print

// Set Normal mode

// Set Function Key mode // Get input (F5)

// Get # of labels printf("How many labels do\nyou need?");

iNum = _getch();

printf("\nPrinting %c labels...", iNum);

/* Branch to printing routine */

}

}

}

4-10Programmer’s Manual

k b d S e t N o r m a l

Description

Changes the keypad’s data entry mode to Numeric/Normal mode.

Syntax

void kbdSetNormal(void);

Parameters

None

Return Values

None

Example

#include <stdio.h> #include "mmsultra.h"

void main(void)

 

{

// Entered name

char cName[25];

char cNumber[4];

// Entered number

 

// Set Upper-caseAlpha mode

kbdSetCaps();

// Enter operator name

printf("Enter Operator Name:");

gets(cName);

// Set Normal mode

kbdSetNormal();

printf("Enter Operator #:");

// Enter operator number

gets(cNumber);

/* branch to name and number processing routine */

}

Function Reference 4-11

p c l B a t t e r y O k T o P r i n t

Description

Checks if the printer’s NiCd battery (located in the handle) is charged enough to allow printing. It is good programming practice to check the battery level before doing any printing.

Use this function immediately prior to printing, but not during printing. If you use it during printing, the return value is not accurate.

Syntax

unsigned short far pclBatteryOkToPrint(void);

Parameters

None

Return Values

0

The battery level is too low to allow printing.

Non-zero

The battery level is high enough to allow printing.

Example

See “pclGetOnDemandSensor” for an example.

4-12Programmer’s Manual

p c l C a l i b r a t e

Description

Calibrates the supplies in the printer and gives the supply information to the Print subsystem.

Operators can load supplies (as described in the Equipment Manual) before running an application, but they cannot calibrate the supplies until the application calls this function. In general, you should display a prompt (“Load your supplies,” for example) and require the operator to press a key (the trigger might be easiest) prior to calling this function.

Do not use this function when using fax paper because it has no black mark to detect.

If an application uses this function, it should not use pclCalibratePaper and pclPaperSetup.

Syntax

unsigned short far pascal pclCalibrate(

unsigned short usStockLength, unsigned short usStockWidth, unsigned short usStockType, LPFNSUPPLYTYPEPROMPT

lpfnSupplyTypePrompt, LPFNSUPPLYPROMPT lpfnSupplyPrompt);

Function Reference 4-13

Parameters

usStockLength

The supply length in hundredths of an

 

inch. Values are 55-400 or–1 to prompt

 

the user.

 

usStockWidth

The supply width in hundredths of an

 

inch. Values are 120,150,200 or–1 to

 

prompt the user.

 

usStockType

The supply type. Values are

 

MMS_LOW_ENERGY

Paper

 

MMS_MEDIUM_ENERGY

Fax

 

MMS_HIGH_ENERGY

Synthetic

 

-1

Prompt User

 

If you are using linerless supplies,

 

experiment with these values to see

 

which one achieves the best results.

lpfnSupplyTypePrompt

Enter 0.

 

lpfnSupplyPrompt

Enter 0.

 

Return Values

0

Successful.

Non-zero

An error occurred. For errors between 703-

 

793, the operator corrects the printer

 

condition. Then, the application must call

 

pclClearError to reset the Motion Control

 

subsystem. Refer to the MPCL Packet

 

Reference Manual for more information.

4-14Programmer’s Manual