Chapter 5: Programming commands 113
A776-PG00001 C 12/09 A776 (B780) Programming Guide
Formulas
The distance from the current position is set to (nL + nH × 256) × vertical or horizontal motion unit] inches. The amount
of movement is calculated only for the paper roll.
When pitch n is specied to the movement downward:
nL + nH × 256 = n
When pitch n is specied to the movement upward (the negative direction), use the complement of 65536.
When pitch n is specied to the movement upward:
nL + nH × 256 – 65536 – N
Exceptions
This command is used only in page mode, otherwise it is ignored.
Any setting that exceeds the specied printing area is ignored.
Macros
These commands are used to select and perform a user-dened sequence of printer operations.
Select or cancel macro denition
ASCII GS :
Hexadecimal 1D 3A
Decimal 29 58
Starts or ends macro denition. Macro denition begins when this command is received during normal operation and
ends when this command is received during macro denition. The macro denition is cleared, during denition of the
macro when the execute macro (1D 5E) command is received.
Normal printing occurs while the macro is dened. When the power is turned on the macro is not dened.
The dened contents of the macro are not cleared by the initialize printer (1B 40), thus, the initialize printer
(1B 40) command may be used as part of the macro denition.
If the printer receives a second select or cancel macro denition (1D 3A) command immediately after previously
receiving a select or cancel macro denition (1D 3A) the printer remains in the macro undened state.
Formulas
The contents of the macro can be dened up to 2048 bytes.
Exceptions
If the macro denition exceeds 2048 bytes, excess data is not stored.
Execute macro
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.
Executes a macro. After waiting for a specied 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 specied
times.
When the macro is executed by pressing the paper feed button (m = 1), paper cannot be fed by using the paper feed
button.
Continued . . .