HP (Hewlett-Packard) PCL Photo Scanner User Manual


 
EN Macro Creation 12-3
Macro Creation
Designate a unique identification (ID) number prior to the definition
of a macro using the Macro ID command. This number is assigned to
the macro. If a macro is already associated with this ID number, the
previously existing macro is deleted from user memory during the
definition of the new macro. Subsequent macro operations are
accomplished using the macro ID number.
A macro is created in the printer in several steps. First, the start
macro command is sent to the printer to indicate the start of a macro
definition. Next, the printer commands, control codes, and data that
constitute the macro are sent to the printer, in the intended order of
their execution. Finally, the End Macro command is sent to the printer
to indicate the end of the macro definition
To invoke a macro, send the Macro ID command with the ID number
of the macro, then send the Macro Control command with a value
field of 2, 3, or 4 (
E
C
&f2X,
E
C
&f3X, or
E
C
&f4X). This performs the
macro in the specified mode: Execute (value field=2), Call (value
field=3), or Overlay (value field=4). Refer to the following section
“Macro Invocation” for a description of these modes.
Table 12-1
Assign ID
Number
Macro ID command (
E
C
&f14Y) assigns a
unique identification number (14) to the macro.
Start Macro
Definition
Macro Control command,
E
C
&f0X, indicates the
following commands and data are to be stored
as a macro.
Macro data
z
z
z
Macro data
Escape sequences, control codes, HP-GL/2
commands and text required to perform the
desired operation.
Stop
MacroDefinition
Macro Control command,
E
C
&f1X, identifies the
end of the macro data (definition).