59
UBI EasyCoder 301 Direct Protocol – Programmer's Guide Ed. 1
Chapter 7 Reading the Printer's Status
The thermal printhead can be tested in three different ways:
•
FUNCTEST$ ("HEAD")
•
? HEAD (type of check)
•
? SYSVAR (<parameter>
)
? FUNCTEST$ ("HEAD")
The returns from the FUNCTEST$ ("HEAD") command are:
HEAD OK, SIZE:nnn DOTS
(nnn is the number of dots)
HEAD LIFTED
(lower the printhead and try again)
FAULTY PRINTHEAD
(an error is detected)
? HEAD(<type of check>)
<type of check> = -1 Printhead. Returns -1 if OK, else 0
<type of check> = -7 Mean resistance of printhead in ohms
? SYSVAR (<parameter>)
<parameter> = 21
returns printhead density in dots per mm
<parameter> = 22
returns the number of dots in the printhead
There are a number of counters in the printer's system, that can be
read and returned to the host:
? SYSVAR (<parameter>)
<parameter> = 14
number of errors detected since last startup
<parameter> = 15
number of errors detected since last SYSVAR
(15)
<parameter> = 24
power-up status since last SYSVAR(24)
(0 = No; 1=Yes)
Note!
SYSVAR (24) is important, since essential functions, like counters
and error messages will be lost at power up and other functions will
be reset to their default values. Save all such data in the host and
retransmit them to the printer as soon as a power-up has been de-
tected by a polling program taking advantage of SYSVAR(24).
4. Printhead
5. System
Counters