The text of a manual · part 9 of 15
EasyCoder E4 Direct Protocol 2.01 Programmer's Guide: Chapter 7: Reading the Printer's Status
Pages 61 to 64 of 113, from EasyCoder E4 Direct Protocol 2.01 Programmer's Guide
The original document is the PDF (2.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec E4
Page 61
Chapter 7
Reading the Printer's Status 1. Introduction
Provided that two-way communication is working between the printer and the host computer, the printer's status with regard to various functions can be returned to the host. This implies that the serial channel "uart1:" must be selected standard OUT channel (Default, see SETSTDIO command in chapter 6.2). The PRINT command returns information about the printer's status via the standard OUT channel to the host, where it will usually be printed on the screen. A complementary command specifies the type of information to be returned. The shorthand version of PRINT is a question mark (?). PRINT | ?
2. Date and Time
3. Memory
The current date and time according to the printer's clock/calendar can be read as follows: ? DATE$ or
? DATE$("F")
? TIME$ or
? TIME$("F")
Various parts of the printer's memory can be tested by reading the result of a FUNCTEST$ command: ? FUNCTEST$ ("<RAM>|<CARD1>|<CARD2>")
<RAM> returns the result of the power-up RAM test. <CARD1>|<CARD2> checks an inserted memory card and returns either “CARD NOT PRESENT”, “CARD OK”, or “CARD FAIL”.
60
Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1
Page 62
Chapter 7
4. Printhead
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 Checks printhead. Returns -1 if OK, else 0 and sets up the printer for the measured mean printhead resistance. <type of check> = -7 Returns mean resistance of printhead in ohms Important! Always either run a ? HEAD (-1) instruction after replacing the printhead or print a test label to set the printer for the resistance of the new printhead! ? SYSVAR (<parameter>)
<parameter> = 21 <parameter> = 22
5. System Counters returns printhead density in dots per mm 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 <parameter> = 15 number of errors detected since last startup 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 detected by a polling program taking advantage of SYSVAR(24).
Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1
61
Page 63
Chapter 7 Reading the Printer's Status
6. Sensors
The printer has a number of sensors and setup parameters that can be read and their status or value returned to the host: ? SYSVAR (<parameter>)
<parameter> = 8 <parameter> = 18 <parameter> = 19 <parameter> = 20 <parameter> = 23
7. Printer's Status returns LSS theshold value (see 6.18) returns selected verbosity level (see 6.13) returns selected type of error message (see 6.14) returns printer's paper type setup 0= Direct thermal printing; 1= Thermal transfer printing returns status of the ribbon end sensor (0=No ribbon; 1=Ribbon)
The printer's status with regard to various errors and other conditions can be read and returned to the host using the PRSTAT command: ? (PRSTAT AND <parameter>)
<parameter> = 1 <parameter> = 2 <parameter> = 4 <parameter> = 8 printhead lifted label not removed printer out of paper printer out of transfer ribbon
Parameters can be combined, e.g. <3> checks for both “printhead lifted” and “label not removed” conditions. The printer will return 1 (= yes) or 0 (= no).
8. Firmware and Hardware Versions
62
The version of EasyCoder E4 software, the type of printer family and the type of CPU board can be read using a VERSION$ command: ? VERSION$[(type of info)]
<type of info> = 0 <type of info> = 1 <type of info> = 2 the version of EasyCoder E4 firmware E4 = EasyCoder E4 1-E4700 = CPU board 700
Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1
Page 64
Chapter 7
9. Label Length
Reading the Printer's Status
The presently set label length, as specified by the printer's setup, is returned by the following instruction: ? SYSVAR (<parameter>)
<parameter> = 2 returns label length in dots
The actual label length, as measured and set by a TESTFEED command , is returned by the following instruction: ? SYSVAR (<parameter>)
<parameter> = 100 returns label length in dots Note that the SYSVAR (2) value must be equal to or exceed the SYSVAR (100) value, or the labels will be truncated.
10. Gap Length
The presently set label gap length, as set by a TESTFEED command, is returned by the following instruction: ? SYSVAR (<parameter>)
<parameter> = 101 returns label gap length in dots
11. Media Light Transmission
The light transmission of the media in the LSS is returned by the following instruction as a value in the range 0–31, where 0 is maximum reflection/transmission and 31 is no reflection/transmision. It can be used to assess the translucency of labels and backing paper and also has the side-effect of waiting until the motor stops. ? SYSVAR (<parameter>)
<parameter> = 1 returns the light transmission value
Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1
63