Printing with the RS232 Port
5
10
20
30
40
50
60
REM RS232 Example
E$=CHR$(27)
OPEN “COM1:9600,N,8,1,CS,DS” AS #1
PRINT #1,E$;”A”;
PRINT #1,E$;”H400”;E$;”V100”;E$;”WL1OKI”;
PRINT #1,E$;”Q1”;
PRINT #1,E$;”Z”;
Identifies the program as a RS232 port
print label. The “REM” prevents this data
from being sent to the printer and displays
it only on the screen.
Sets the “E$” string as an <ESC> character
Opens the COM1 port for output and sets
the parameters as 9600 baud, No parity, 8
Data bits, 1 Stop bit and instructs the port
to ignore the CTS and DSR control signals.
Sends an “<ESC>A” command code to
print port #1 opened by statement 20
above.
Sends the data “OKI” to be placed 400 dots
horizontally and 100 dots vertically on the
label and printed in the “WL” font.
Instructs the printer to print one label.
Tells the printer that the last command has
been sent. The printer can now create and
print the job.
THE PRINT AREA
The maximum print area is 50 inches long. Most of your label application will fit into this area, therefore, it is
important to understand how to work with label that do not use the entire print area. The goal is to help you
avoid printing where no label exists, which may lead to print head damage, not to mention the frustration when
you cannot see the printed output.
The diagram below illustrates the print area for a sample 2 inch wide by 3 inch long label places within this area.
As can be seen, your label will be oriented against the inside left edge of the printer as viewed from the front
(label exit) of the printer. The normal reference point is located at the H1,V1 position of the print area in the
normal print orientation (no rotation).
4
Summary of Contents for OKIPOS X400
Page 16: ...Printer Output 14...