Macro Id; Start Macro Definition - Brother HL-Series Technical Reference Manual

Hide thumbs Also See for HL-Series:
Table of Contents

Advertisement

Revision C 16/01/96
Macros
The purpose of a macro
A macro is a sequence of commands that you wish to execute. You can specify the command sequence and
download it to the printer after which you can execute it with a single command. For example, you might wish to
draw a raster image at the top of each page you print. Rather than sending the same sequence of commands every
time you print a new page, it is more efficient to define a macro to draw the image and store the macro in the
printer's memory. Having done this, you can draw the picture on each page simply by running the macro, that is,
with a single command.
Like downloaded fonts, macros take up printer memory. To alleviate this, some macros are available on cartridges
that can be plugged into the printer's cartridge slots. A cartridge-based macro must have a unique ID number or
else you will not be able to access it. If a downloaded macro has the same ID number as a cartridge macro, all
references to the ID number will be interpreted as references to the downloaded macro. To access the cartridge
macro you would first have to delete the downloaded macro.
Another method of storing Macros is uniquely available on the HL-10h/1260 printer. This is the use of PCMCIA
format memory cards type I or type III in the card slot of the printer. Macros can be saved to this card as required
and then executed from the card. A delete facility is also included to allow the removal of macros when no longer
required. The rules for identifying and calling Macros from this card are exactly the same as for cartridge stored
Macros detailed above.
One macro can call another, however, only two levels of nesting are permitted.
A printer reset will delete macros from the printer's memory unless they have been explicitly designated as
permanent.
The PCL picture frame commands, the printer reset command and HP-GL/2 graphic language commands cannot
be invoked from within a macro.
Defining a macro
To define a macro you must first assign an ID number to it, then send to the printer a Start Macro Definition
command, the macro definition itself (consisting of a sequence of PCL commands) and finally an End Macro
Definition command.

Macro ID

Esc&f#Y
• This command assigns an identity number to a macro that is to be downloaded, or references an existing macro
in the printer's memory.
• # is the ID number of a macro. The ID number must be in the range 0-32767.
• If you specify the ID number of an existing macro and then download a new macro definition to the printer, the
new macro will overwrite the existing macro.

Start macro definition

Esc&f0X
• This command signifies that the following commands constitute a macro definition.
(27)(38)(102)#(89)
(27)(38)(102)(48)(89)
Chapter 2 "PCL" - 89
<1Bh><26h><66h>#<59h>
<1Bh><26h><66h><30h><59h>

Advertisement

Table of Contents
loading

Table of Contents