please dont rip this site


MACRO DEFINITION A macro is a collection of printer commands, control codes and/or data created by the user that is downloaded and stored in the printer's memory. Once stored in the printer, a macro can be invoked by a single command. Macros can eliminate the need to download the same information repeatedly, thus saving transmission time. The number of macros that can be stored in the printer's memory is limited only by the amount of available memory (except in LJ II or earlier where 32 macros is the limit). Practical uses of macros include forms, letterhead, logos and lengthy printer commands.


  1. Designate a unique identification number (Ec&f#Y). Any number from 0 to 32767 can be used and each macro ID number should be different. If a new macro is loaded that uses the same ID as a previously loaded macro, the previous macro will be deleted from user memory.
  2. Send the start of the macro command (Ec&f0X). This indicates the following command and data are to be stored as a macro.
  3. Send the escape sequences, control codes, HPGL/2 commands and text to perform thedesired operation.
  4. Send the Stop Macro command (Ec&f1X) to identify the end of the macro data.
  5. Designate the macro as permanent (Ec&f10X) or temporary (Ec&f9X). A macro stored as permanent will not be deleted by a printer reset. A macro stored as temporary will be deleted with a printer reset.

MACRO INVOCATION 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 (Ec&f2X), (Ec&f3X), (Ec&f4X). This performs the macro in the specified mode: 2 = Execute 3 = Call 4 = Overlay

When a macro is executed, it begins performing its commands using the current modified print environment (see below for explanation of modified print environment). 1Changes made to feature settings during macro execution are recorded in the modified print environment; these changes are retained upon completion of the macro execution.
When a macro is called, it begins performing its commands using the current modified print environment. Changes made to feature settings are recorded in the modified print environment; however these changes are not retained upon completion of the macro call. The modified print environment that existed prior to the macro call is restored.
When a macro is enabled for overlay, its execution is the final operation each time a page is printed. Before the macro is executed, the current modified print environment is saved and replaced with the overlay environment. The overlay environment is a combination of user default and the current modified print environments. Changes made to feature settings during the macro overlay are recorded in the modified print environment; however these changes are not retained upon completion of the macro overlay. The modified print environment that existed prior the macro overlay is restored.


A factory default is a feature setting programmed into the printer at the factory. The group of all the printer's settings set to their factory setting is referred to as the Factory Default Environment.
A user default is a setting selected from the printer's control panel. User default settings are stored in the User Default Environment and are retained even if the printer is turned off.
The current printer feature settings constitute the modified print environment. Whenever a feature setting is altered using escape sequences, the new setting is recorded in the Modified Print Environment. The Modified Print Environment is saved during a macro call or overlay and restored upon its completion.

DELETING MACROS There are several mechanisms provided by PCL macro control for explicit deletion of macros from user memory. These include commands to delete all macros, all temporary macros, or an individual macro by reference to its macro ID number. See the Macro Control Command. Both temporary and permanent macros are deleted from memory whenever the printer's power is turned off.

MACRO CONTROL COMMAND The macro control command provides mechanisms for definition, invocation, and deletion of macros.
# = 0 Start macro definition (last ID specified)
# = 1 Stop macro definition
# = 2 Execute macro (last ID specified)
# = 3 Call Macro (last ID specified)
# = 4 Enable macro (last ID specified)
# = 5 Disable automatic overlay (last ID specified)
# = 6 Delete all macros
# = 7 Delete all temporary macros
# = 8 Delete macro (last ID specified)
# = 9 Make macro temporary (last ID specified)
# = 10 Make macro permanent (last ID specified)


* A macro may call or execute another macro, which in turn may call or execute another macro, two levels of nesting are allowed. When macros larger than 64K are stored in FLASM memory (SIMMs or DIMMs) the available levels may be reduced.

* Other than call and execute, no macro control operations may occur within a macro.

* A printer reset (EcE or UEL) is not allowed in a macro.

* The macro enabled for automatic overlay is invoked on each page, until the macro is disabled or deleted, a reset occurs (through software or control panel), or the page length, page size or orientation is changed.

* HP-GL/2 commands are only supported in a macro in the LaserJet 4 family and above.

* PCL macro control commands are not allowed while in HP-GL/2 context.

Copyright Hewlett-Packard Co. 1993 The information contained herein is subject to change without notice. Hewlett-Packard shall not be liable for incidental or consequential damages in connection with the use of this material.

See also:

file: /Techref/language/pcl/lj1690.htm, 6KB, , updated: 2005/5/10 13:05, local time: 2018/1/17 20:12,

 ©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE! / 

<A HREF=""> Macros</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2018 contributors:
o List host: MIT, Site host, Top posters @20180117
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.

Welcome to!