zpl.tools
Printer configuration

^SX - Set Alert

Configures where the printer reports an error condition: serial, parallel, email, TCP, UDP or SNMP.

^SX configures one ZebraNet alert: which printer condition to watch, where to report it, and whether to report the start of the condition, the end, or both. One command covers one condition-and-destination pair, so several conditions on several destinations need several ^SX commands.

Syntax

^SXa,b,c,d,e,f

Support

Recognised, deliberately skippedparsed: none · state: none · rendered: none

Accepted and skipped, because it configures the printer rather than the label. It cannot change the rendered output, and Labelary skips it too.

The command routes notifications to a host, and no notification path can alter the raster. The renderer does not parse this command. It reports IGNORED_COMMAND at info severity, which does not reach X-Warnings. Labelary is also silent, so the rendered label is identical in both engines. — not pinned by a test

Labelary renders this command.

Parameters

aConditionrequired · one of a set

Which error condition this alert covers. * covers all of them on a non-RFID printer; W does the same on an RFID printer.

Invalid value
enough to make the whole command be ignored. The renderer does not parse or measure this command. The printer ignores the whole command if the condition is missing or invalid.
Test coverage
No documented value is exercised by a test (A-W, *). The invalid-value rule is not pinned by a test.
A-W
A single error condition, identified by letter
*
Every error condition
bDestinationrequired · one of a set

Where the printer sends the alert. The last two arguments depend on this choice. The parallel port requires bidirectional communication.

Invalid value
enough to make the whole command be ignored. The renderer does not parse or measure this command. The printer ignores the whole command if the destination is missing or invalid.
Test coverage
No documented value is exercised by a test (A, B, C, D, E, F). The invalid-value rule is not pinned by a test.
A
Serial port
B
Parallel port
C
Email
D
TCP
E
UDP
F
SNMP
cAlert on setoptional · Y or N

Whether the printer reports a condition that becomes true.

Default
Y, or the previously set value
Invalid value
not documented, and we have not measured it. The renderer does not parse or measure this command.
Test coverage
No documented value is exercised by a test (Y, N).
Y
Alert when the condition is set
N
Do not
dAlert on clearoptional · Y or N

Whether the printer reports a condition that clears again.

Default
N, or the previously set value
Invalid value
not documented, and we have not measured it. The renderer does not parse or measure this command.
Test coverage
No documented value is exercised by a test (Y, N).
Y
Alert when the condition clears
N
Do not
eDestination detailoptional · text

An email address, an IP address or an SNMP trap address, for the destination chosen. The guide notes that an SNMP trap to 255.255.255.255 broadcasts to every manager on the network.

Default
the previously set value
Invalid value
not documented, and we have not measured it. The renderer does not parse or measure this command. The printer ignores a missing or invalid sub-option, and the guide does not state which value applies.
Test coverage
fPortoptional · integer

TCP or UDP port, for those two destinations.

Default
the previously set value
Accepted range
0 to 65535
Invalid value
not documented, and we have not measured it. The renderer does not parse or measure this command. The printer ignores a missing or invalid sub-option, and the guide does not state which value applies.
Test coverage
No test at the minimum, maximum or one step outside the range.

Behavior

The condition letters are a fixed list, the same list ^SQ uses. The guide gives them as:

  • A paper out
  • B ribbon out
  • C printhead over-temp
  • D printhead under-temp
  • E head open
  • F power supply over-temp
  • G ribbon-in warning in direct thermal mode
  • H rewind full
  • I cut error
  • J printer paused
  • K PQ job completed
  • L label ready
  • M head element out
  • N and O reserved
  • P power on
  • Q clean printhead
  • R media low
  • S ribbon low
  • T replace head
  • U battery low

V is an RFID error and W all errors on an RFID printer; * is all errors on a printer without RFID.

The destination decides how the printer reads the last two arguments. Email takes an address in e; TCP and UDP take an address in e and a port in f; an SNMP trap takes an address in e. The guide notes that 255.255.255.255 there broadcasts the notification to every SNMP manager on the network. The parallel port destination needs bidirectional communication. A missing or invalid condition or destination makes the printer ignore the whole command; the printer ignores a missing or invalid sub-option on its own.

No notification path changes the raster, so the renderer ignores this command. ~HU reads the configured alert table back, and it is equally inert.

Example

Every non-RFID error condition reported to a TCP listener, on both set and clear:

^XA
^SX*,D,Y,Y,10.1.2.123,8181
^FO50,50^A0N,30,30^FDAlert configured^FS
^XZ

Open in viewer

  • ^SQ Halt ZebraNet AlertStops or restarts the alerts `^SX` configured, and keeps their configuration.
  • ^JH Early Warning SettingsConfigures the consumable and maintenance warnings the printer reports as media, ribbon and printhead wear out.
  • ^NT Set SMTPPoints the printer at an SMTP server so it can e-mail alerts.