|  |  | 
        
        
          |  |  
          |  |  
          |  | 
              
              
                | HP LaserJet Printers - Macros TABLE OF CONTENTS 
                  
                    
                      Macro 
                      Definition  Macro Creation 
                      Steps  Macro 
                      Invocation  The Print 
                      Environment  Deleting 
                      Macros  Macro Control 
                      Command  Macro Notes 
                       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 HP LaserJet series II printers 
                    or earlier in which the limit is 32 macros). Practical uses 
                    of macros include forms, letterhead, logos, and lengthy 
                    printer commands.  Macro Creation 
                  Steps 
                    
                      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 you load a 
                      new macro that uses the same ID as a previously loaded 
                      macro, the previous macro will be deleted from user 
                      memory. 
                      Send the 
                      start of the macro command (Ec&f0X). This indicates 
                      the following command and data are to be stored as a 
                      macro. 
                      Send the 
                      escape sequences, control codes, HPGL/2 commands, and text 
                      to perform the desired operation. 
                      Send the 
                      Stop Macro command (Ec&f1X) to identify the end of the 
                      macro data. 
                      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  
                   
                    
                      
                      
                        | EXECUTE 
                           | When a macro 
                          is executed, it begins performing its commands using 
                          the current modified print environment (see below for 
                          explanation of modified print environment). Changes 
                          made to feature settings during macro execution are 
                          recorded in the modified print environment; these 
                          changes are retained upon completion of the macro 
                          execution.  |  
                        | CALL 
                           | 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.  |  
                        | OVERLAY 
                           | 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.  |  The print 
                  environment 
                    
                      Factory 
                      Default Environment 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.  User 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.  Modified 
                      Print Environment The current 
                      printer feature settings constitute the modified print 
                      environment. When 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.  
                   
                    
                      
                      
                        | Ec&f#X 
                           |  |  
                        | # = 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) 
                     |  Macro notes 
                  
                    
                      A macro 
                      may call or execute another macro, which in turn may call 
                      or execute another macro. Two levels of nesting are 
                      allowed. 
                      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 HP LaserJet 
                      4 printer family and above. 
                      PCL 
                      macro control commands are not allowed while in HP-GL/2 
                      context.  
                    Copyright © Hewlett-Packard Co. 1996 This 
                    information is subject to change without notice and
 is 
                    provided "as is" with no warranty.
 Hewlett-Packard shall 
                    not be liable for any direct,
 indirect, special, 
                    incidental or consequential damages
 in connection with 
                    the use of this material.
 
 
 |  |  
          |  |  |