Programmer's Guide User guide

1 | Programmer’s Guide
Thermal Printer Programmer’s Guide 32
<ESC>%-12345X@PJL JOB NAME = "JOB_SELFTEST_INIT" <LF>
@PJL PERFORM SELFTEST = 1 <LF>
@PJL EOJ <LF>
When the self tests are complete the following command is used to disable the self test
mode:
<ESC>%-12345X@PJL JOB NAME = "JOB_SELFTEST_END" <LF>
@PJL PERFORM SELFTEST = 0 <LF>
@PJL EOJ <LF>
PJL GPIO Wrap Test
To run the GPIO wrap test, either the wrap connector or the GPIO test board with wrap
jumper should be connected to the printer and the following command should be issued:
<ESC>%-12345X@PJL JOB NAME = "JOB_GPIOWRAP_TEST" <LF>
@PJL PERFORM GPIOSELFTEST <LF>
@PJL EOJ <LF>
The PJL INFO SYSTEMSTATUS read back command is used to view test results. The
value LASTLBLCNT refers to the total cycles requested and ERRORCOUNT refers to
the number failed.
PJL GPIO Read Test
Prior to performing the GPIO read test, the GPIO parameters in the database should be
set accordingly using the either front panel, the PJL variables or other means. The signal
function for all pins should be “None”. The signal type for all pins should be set to “High”.
The I/O configuration should be set with an integer representing a bitwise value where
first bit is pin 1, the second bit is pin 2, etc. One is an input pin and zero is an output pin.
Bits 8 – 15 are fixed at 1. For instance if pins 1-4 are input and pins 5-8 are output this
value is 65295 (1111111100001111).
Note: Pins are coupled 1/2, 3/4, 5/6, 7/8.
To start the test, enter the following command:
<ESC>%-12345X@PJL JOB NAME = "JOB_GPIOREAD_TEST" <LF>
@PJL PERFORM GPIOREAD <LF>
@PJL EOJ <LF>
While the test is running, check the ERRORCOUNT value from the PJL INFO
SYSTEMSTATUS read back command to view the GPIO read status. Use bitwise
operand AND of this value against 0x01 for pin1, 0x02 for pin 2, 0x04 for pin 3, etc. If the
result is true then it is considered a high signal. If the result is false, it is considered a low
signal.
Note: This is only for input pins. Output pins are a “do not care”.