User manual

APOS Premium Printer Series User Manual Page 107 /136 Reference: FDE 3107312 Issue A
6.16 Macro Commands
These commands are used to select and perform a user-defined sequence of printer operations.
S
ELECT OR CANCEL MACRO DEFINITION
Starts or ends macro definition. Macro definition begins when this command is received during normal
operation and ends when this command is received during macro definition.
The macro definition is cleared, during definition of the macro when the Execute Macro (GS ^) command
is received.
Normal printing occurs while the macro is defined. When the power is turned on the macro is not defined.
The defined contents of the macro are not cleared by the Initialize Printer (ESC @), thus, the Initialize
Printer (ESC @) command may be used as part of the macro definition.
If the printer receives a second Select or Cancel Macro Definition (GS :) command immediately after
previously receiving a Select or Cancel Macro Definition (GS :) the printer remains in the macro undefined
state.
ASCII
GS :
Hexadecimal 1D 3A
Decimal
29 58
Formulas
The contents of the macro can be defined up to 2048 bytes.
Exceptions : If the macro definition exceeds 2048 bytes, excess data is not stored.
E
XECUTE MACRO
Executes a macro. After waiting for a specified period the printer waits for the Paper Feed Button to be
pressed. After the button is pressed, the printer executes the macro once.
The printer repeats this operation the number of specified times.
When the macro is executed by pressing the Paper Feed Button (m = 1), paper cannot be fed by using the
Paper Feed Button.
ASCII
GS ^ r t m
Hexadecimal 1D 5E r t m
Decimal
29 94 r t m
Value of r
The number of times to execute the macro.
Value of t
The waiting time for executing the macro.
Formulas
The waiting time is t x 100 ms for every macro execution.
m specifies macro executing mode when the LSB (Least significant bit) m = 0
The macro executes r times continuously at the interval specified by t when the LSB (Least significant bit)
of m = 1.