module

Tsc::Command::Status

This module implements Status Polling and Immediate Commands.

Constants

CANCEL = "\e!."
CODE_PAGE_COUNTRY_CODE = "\e~!I"
DISABLE_IMMEDIATE = "\e!D"
DUMP = "\e~!D"
ENABLE_IMMEDIATE = "\e~!E"
FEED = "\e!F"
FILES = "\e~!F"
FREE_MEMORY = "\e~!A"
LINE_MODE_DISABLE = "\eZ"
LINE_MODE_ENABLE = "\eY"
MILEAGE = "\e~!@"
MODEL = "\e~!T"
PAUSE = "\e!P"
RESET = "\e!R"
RESTART = "\e!C"
RESTART_ONLY_AUTO = "\e!Q"
RTC = "\e~!C"
STATUS = "\e!?"
STATUS_DETAILED = "\e!S"
UNPAUSE = "\e!O"

Instance methods

cancel

Cancels all printing files.

This is an immediate command.

Since:

  • This command has been supported since V7.00 EZ and later firmware.
printer.cancel
Source
disable_immediate

Disables all immediate commands.

This is an immediate command.

Since:

  • This command has been supported since V6.61 EZ and later firmware.
printer.disable_immediate
Source
dump

Enters the printer into dump mode. In dump mode, the printer outputs code directly without interpretation.

printer.dump
Source
enable_immediate

Enables immediate commands.

Since:

  • This command has been supported since V6.61 EZ and later firmware.
printer.enable_immediate
Source
feed

Feeds a label. This function is the same as pressing the FEED button.

This is an immediate command.

Since:

  • This command has been supported since V7.00 EZ and later firmware.
printer.feed
Source
free_memory

Retrieves the free memory of the printer.

printer.free_memory # => {dram: 256, flash: 2560}
Source
has_rtc?

Determines whether a Real Time Clock is installed in the printer.

printer.has_rtc? # => true
Source
mileage

Retrieves the mileage of the printer.

printer.mileage # => 89
Source
model

Retrieves the model name and number of the printer.

printer.model # => "TTP245C"
Source
pause

Pauses the printer.

This is an immediate command.

Since:

  • This command has been supported since V6.93 EZ and later firmware.
printer.pause
Source
reset

Resets the printer. Files downloaded in memory will be deleted. This command cannot be sent in dump mode.

This is an immediate command.

printer.reset
Source
restart

Restarts the printer and does not run AUTO.BAS.

This is an immediate command.

Note:

  • When the printer receives this command, the printer will restart itself whether AUTO.BAS exists or not.

Since:

  • This command has been supported since V5.23 EZ and later firmware.
printer.restart
Source
restart_only_auto

Restarts the printer only if AUTO.BAS exists.

This is an immediate command.

Note:

  • If there is no AUTO.BAS file loaded on the printer, the printer will not restart itself.

Since:

  • This command has been supported since V6.72 EZ and later firmware.
printer.restart_only_auto
Source
status

Obtains the printer status at any time, even in the event of printer error.

This is an immediate command.

printer.status # => :normal
printer.status # => :ribbon_empty_head_open
Source
status_detailed

Obtains detailed status information of the printer, even in the event of printer error.

Since:

  • This command has been supported since V6.29 EZ and later firmware.
printer.status_detailed # => { message: :waiting_to_press_print_key, warning: :receive_buffer_full, printer_error: :print_head_error, media_error: :paper_empty }
Source
unpause

Cancels the pause status of printer.

This is an immediate command.

Since:

  • This command has been supported since V6.93 EZ and later firmware.
printer.unpause
Source