Cursor Position Commands

This section describes all commands that affect the location of the print position. Consider the print position as a movable pointer that allows you to print anywhere on the print ticket.


Horizontal Tab - $09 rel

Advances the horizontal print position to the next column as specified by the Set Horizontal Tab Position command.

Format:

Hex        $09

ASCII      HT

Decimal    9

Notes:
  • If no tab position has been set, default columns of 8 characters will be used.
  • If this command is received at the end of a line, the current line buffer will be printed and the tab will be applied to the next line
  • 1 column width is equal to the width of the current font
Range:

None

Default:

8 Columns

Related:

None

Example:
write("Hello\x09World!")    # \x09 is the raw 0x09 character
print()
>>> Hello   World?

Line Feed - $0A rel phx

Prints the data in the print buffer and feeds one line based on the current line spacing.

Format:

Hex        $0A

ASCII      LF

Decimal    10

Notes:
  • Sets the print position to the beginning of the line.
Range:

None

Default:

None

Related:

Carriage Return

Example:
write("Hello World!\x0A")
print()
>>> Hello World?
>>>

Form Feed - $0C rel

Prints the data in the print buffer, cuts the paper and presents the ticket.

Format:

Hex        $0C

ASCII      FF

Decimal    12

Notes:
  • Sets the print position to the beginning of the line.
Range:

None

Default:

None

Related:

Total Cut

Example:
write("Hello World!\x0C")
print()
>>> Hello World?
# Paper is cut and presented, buffer is now empty and awaiting more data
>>>

Carriage Return - $0D rel phx

If CR command is enabled, this command will function exactly like the command $0A does, otherwise, the command is ignored.

Format:

Hex        $0D

ASCII      CR

Decimal    13

Notes:
  • Sets the print position to the beginning of the line
  • CR can be enabled or disabled with Reliance Tools
Range:

None

Default:

None

Related:

Line Feed


Cancel Current Line- $18 rel

Deletes/Cancels the current line

Format:

Hex        $18

ASCII      CAN

Decimal    24

Notes:
  • Sets the print position to the beginning of the line
Range:

None

Example:
write('Hello World')              # Put some text in the buffer
write('\x18')                     # Send cancel command
write('Thank you!')               # Write some other data
write('\x1b\x69')                 # Force-print the buffer
print()
>>>Thank you!

Absolute Print Position - $1B $24 rel

Moves the print position to [(nL + (nH × 256)) × (horizontal or vertical motion unit)] from the left edge of the print area. Uses Two Byte Number Definitions. See Terminology Section

absolutepp

Format:

Hex      $1B $24 nL  nH

ASCII    ESC $   nL  nH

Decimal  27  36  nL  nH

Range:

None

Default:

nL = 0, nH = 0

Notes:
  • Settings that exceed the printable area are ignored.
  • If settings exceed the print area width, the absolute print position is set, but no text will be able to fit in the print area width and any text will be treated as a line feed.
  • When standard mode is selected, the horizontal (perpendicular to paper feed) motion unit is used.
  • When this command is executed, the printer is no longer in a “New Line” state. See Terminology Section
  • The horizontal and vertical motion units are specified by Motion Units. Changing the horizontal or vertical motion unit does not affect the current absolute print position.
  • Absolute print position is effective until it is changed, a new line event occurs, Initialize is executed, the printer is reset, or the power is turned off.
  • Even if underline mode is turned on, areas skipped with this command are not underlined.
Related:

Motion Units

Relative Print Position

Example:
write('\x1d\x57\x2c\x01')   # Set print area width of 300
write('\x1b\x24\x64\x00')   # Set absolute print position to 100
write('\x1b\x4d\x01')       # Select character font
# Write text to see multiple lines
write('Print area width of 300 and absolute print position of 100.
 Only the first line should have this absolute print position.')
print()
>>>
       Print area wid
th of 300 and absolut
e print position of 1
00. Only the first li
ne should have this a
bsolute print positio
n.

Relative Print Position - $1B $5C rel

Relative Print Position

Format:

Hex      $1B $5C  nL nH

ASCII    ESC \    nL nH

Decimal  27  92   nL nH

Notes:
  • Moves the print position to [(nL + (nH × 256)) × (horizontal or vertical motion unit)] from the current position. Uses Two Byte Number Definitions.
  • A positive number specifies movement to the right, and a negative number specifies movement to the left.
  • Negative numbers are represented by the complement of 65536. For example, when moving in the left direction N motion units, use:
    • nL + nH × 256 = 65536-N
  • Settings that exceed the printable area are ignored.
  • If settings exceed the print area width, the relative print position is set, but no text will be able to fit in the print area width and any text will be treated as a line feed.
  • When ​standard mode​ is selected, the horizontal (perpendicular to paper feed) motion unit is used.
  • When this command is executed, the printer is no longer in a New Line State
  • The horizontal and vertical motion units are specified Motion Units Tab Changing the horizontal or vertical motion unit does not affect the current relative print position.
  • Even if underline mode is turned on, areas skipped with this command are not underlined.
Range:

0 nL, nH 255, -32768 (nL + (nH × 256)) 32767

Default:

nL = 0, nH = 0

Related:

Motion Units Tab

Absolute Print Position

Example:

None