58
UBI EasyCoder 301 Direct Protocol – Programmer's Guide Ed. 1
Chapter 7 Reading the Printer's Status
Chapter 7
Reading the Printer's Status
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 (De-
fault, see
SETSTDIO
command in chapter 6.2).
The
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
is a question mark (
?
).
PRINT | ?
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>|<ROM1>|<ROM2>|<CARD1>|<CARD2>")
<RAM>
returns the result of the power-up RAM test.
<ROM1>|<ROM2> tests the ROM package and returns “ROM
OK” or “ROM FAIL”.
<CARD1>|<CARD2> checks an inserted memory card, performs
either a RAM or a ROM test depending on
type of card and returns “CARD NOT
PRESENT”, “CARD OK”, or “CARD
FAIL”.
1. Introduction
2. Date and Time
3. Memory