17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PRSTAT<br />

Chapter 2 Program Instructions<br />

Field of Application Function returning the printer's current status or, optionally, the<br />

current position of the insertion point.<br />

Syntax PRSTAT[()]<br />

1 Returns the X-position for the insertion point at DIR 1&3.<br />

2 Returns the Y-position for the insertion point at DIR 2&4.<br />

Remarks The printer's status can be indicated by a numeric expression, which is the<br />

sum of the values given by the following conditions:<br />

OK ...................................................................... 0<br />

Printhead lifted ..................................................... 1<br />

Label not removed ................................................ 2 See note 1.<br />

Printer out of paper ............................................... 4<br />

Printer out of transfer ribbon ................................. 8 See note 2.<br />

Printhead voltage too high .................................. 16<br />

Printer is feeding ................................................ 32<br />

Note 1: Always returns 0 in printers not fitted with a label-taken sensor.<br />

Note 2: Always returns 0 when direct thermal printing is selected.<br />

If two error conditions occur at the same time, e.g. the printhead is lifted and<br />

the printer is out of paper, the sum will be (1+4) = 5. Every combination of<br />

errors will result in a unique sum. You can use it to branch to a subroutine<br />

which notifies the operator, interrupts the program or whatever you like.<br />

If the PRSTAT function is appended by a numeric expression (= 1 or 2), the<br />

current position of the insertion point in regard of either the X or the Y position<br />

can be returned, depending on the selected print direction. This is useful for<br />

e.g. measuring the length of a text or a bar code.<br />

Examples This examples shows how two error conditions are checked:<br />

10 A% = PRSTAT<br />

10 IF A% AND 1 THEN GOSUB 1000<br />

20 IF A% AND 4 THEN GOSUB 1010<br />

30<br />

.....<br />

END<br />

1000 PRINT "Printhead is lifted":RETURN<br />

1010<br />

RUN<br />

PRINT "Printer out of paper":RETURN<br />

This example illustrates how you can check the length of a text:<br />

10 PRPOS 100,100: FONT "Swiss 721 BT"<br />

20 PRTXT "ABCDEFGHIJKLM"<br />

30 PRINT PRSTAT(1)<br />

RUN<br />

519<br />

yields:<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 183

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!