Paxar Gold 6037EX manual Command calls status

Models: Gold 6037EX

1 230
Download 230 pages 30.9 Kb
Page 63
Image 63

Example

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

void main(void)

 

{

// Print data structure

PRINTINIT pConfig;

unsigned short usStatus = 0;

// Battery level

short sStatus = 0;

// Command calls status

sStatus = pclInit(NULL);

// Start Print subsystem

if (sStatus != 0)

 

printf("Init Failed\nError: %d", usStatus);

else

 

{

// Check battery

usStatus = pclGetBatteryLevel();

if (usStatus <= 711)

 

printf(“Charge your battery”);

 

else

 

{

// Get sensor state

usStatus = pclGetBlackMarkSensor();

switch (usStatus)

// Display result

{

 

case 1: printf("Supplies are aligned"); break;

case 0: printf(“Supplies misaligned or system error”); break;

default: printf("Error-- press any key when reset."); _getch();

pclClearError();

}

 

}

 

}

// Close Print subsystem

pclClose();

}

Function Reference 4-27

Page 63
Image 63
Paxar Gold 6037EX manual Command calls status