Avery Dennison 6035 Programmer Manual Rev.CA 6/01 User Manual

Page 72

Advertising
background image

Function Reference 4-31

{

if (!pclBatteryOkToPrint())

// Check battery

printf("Battery too low");

else

{

// Write format

strcpy(cFormat, "{F,1,A,R,E,400,200, \"1C39\"|");

strcat(cFormat, "B,1,12,F,320,29,4,12,20,8,L,0|");

strcat(cFormat, "R,1, \"666666666666");

strcat(cFormat, "\"|}");

sStatus = pclWrite(cFormat, strlen(cFormat));

if (sStatus != 0)

printf("Format Write error - %d", sStatus);

else

{

// Start batch

sStatus = pclWrite("{B,1,N,1|E,0,0,1,1,0,1|}", 24);

if (sStatus != 0)

printf("Batch Write error - %d", sStatus);

else

{

while ((sStatus = pclStatus()) == 1) // Wait until done

;

sStatus = pclGetOnDemandSensor(); // Check sensor

switch (sStatus)

// Display result

{

case 0: printf("\nNot blocked");

break;

case 1: printf("\nBlocked");

break;

default: printf("Error-- press any key w hen reset.");

_getch();

pclClearError();

}

}

}

}

}

pclClose();

// Close Print subsystem

}

Advertising