Epson SE450 manual Resetting the Printer, Command Parameters, Character Evaluation

Page 12

Programming Overview

PRINT #1, “HELLO WORLD”

In a nutshell, that’s all there is to controlling the LabelWriter printer. Any formatting or special effect that you may need for your output can be specified simply and easily by sending the appropriate command characters and the data to be printed.

The next few sections cover the ins, outs, and general information that you should know before programming the LabelWriter printer.

Resetting the Printer

Each print job should begin with a printer reset command. This ensures that the printer always begins in a known state. The command characters used to reset the LabelWriter printer are ESC (decimal value 27) followed by * (decimal value 42).

Command Parameters

When sending a command, all of the command characters and parameters that make up a command must be sent, without intervening characters. This is especially important when using the barcode and graphics commands. Sending fewer characters than specified for the command will either cause the command to fail or result in subsequent data being lost.

Character Evaluation

Most of the parameters that are sent to the LabelWriter printer are evaluated based on their decimal value. It is very important to have a good understanding of what this means.

The ASCII character that is represented by a ‘3’ does not have a decimal value of 3 (the character '3' has a decimal value of 51, as listed in the character code table).

Some people find it easy to think of the ASCII table as a table of 8-bit BYTE values, and these byte values represent the characters shown in the table. Since a SPACE character has a value of 32 decimal, a byte value of 32 decimal needs to be sent to represent a space in character output.

Some commands accept parameters by either their decimal value or the representative character. For example, the set print orientation command (GS V) interprets both a NULL (ASCII decimal value of 0) and the ‘0’ character as meaning the same thing. This ensures backwards compatibility with the original LabelWriter SE printer and should not be assumed to be true for all commands in general.

16-Bit Character Parameters

The maximum value a single 8-bit character can represent is 255. Some commands, though, can take values that are greater than 255.

The set horizontal starting position command (ESC X), for example, specifies a distance (in dots) that the next text object will print from the left margin. Because a dot is only 1/8th of a millimeter, a value of 255 would place the object only a little over 31 mm from the left margin.

6

Image 12
Contents Technical Reference Copyright Contents Page Character Codes Configuration Menu Printer Specifications This page intentionally left blank for double-sided printing Introduction This page intentionally left blank for double-sided printing Configuring the Host Computer for RS-232 Serial Interface RS-232 SettingsRS-232 Signal Levels RS-232 CablingProgramming Overview Programming the LabelWriter PrinterResetting the Printer Command ParametersCharacter Evaluation Bit Character ParametersConversions Font Specifications ObjectsPrint Modes Raster Mode OrientationLandscape Mode Text ObjectsBarcode Objects Graphic Objects Line ObjectsCommand Reference Alphabetical Command ListESC L Commands by Function Position ControlFont Control GS DC2 GS DC3 GS RS GS USBarcodes MiscellaneousPrintable Characters Commands Raster Compatibility20h FFh Printable Characters DC4 Cancel Double Wide Mode CR Carriage ReturnESC a Return Printer Status ESC a Return Hardware StatusESC B Set Dot Tab ESC c Set Print Temperature to Low ESC d Set Print Temperature to MediumESC D Set Bytes per Line ESC e Set Print Temperature to Default ESC E Form FeedESC g Set Print Temperature to High ESC F 1 n Feed n LinesESC h Set Print Speed to Fast ESC i Set Printing Speed to BarcodeESC L Set Feed Length ESC M Set Font to 12 cpiESC P Set Font to 16 cpi ESC Q Set Top Margin ESC S Set Font to 20 cpiESC T Set Font to 7 cpi ESC U Set Font to 10 cpi ESC V Return Firmware Revision ESC W Wrap DataESC X Set Horizontal Starting Position ESC Y Set Vertical Starting PositionESC * Reset to Defaults ESC @ Reset to Power-up ConditionESC y Set 203 x 203 dpi ESC z Set 136 x 203 dpiETB Raster Mode Compressed Graphics FF Form Feed GS a Starting Position of Bar Code GS DC2 Set Font to Double HeightGS DC3 Cancel Double Height GS d Feed n Text LinesGS h Set Barcode Height GS k Print BarcodeData Matrix Barcode UPC-ASupported Square Data Matrix Symbol Sizes Supported Rectangular Data Matrix Symbol Sizes Commands Command Reference GS l Draw Line in Landscape Mode Least significant byte of the line length in dots GS L Set Feed Length GS RS Set Inverse Print Mode GS q Print UPC/EAN ChecksumGS S Return Printer Status ReturnsGS T Select Line Wrap/Truncate Modes GS t Set Characters per Line in LandscapeGS US Cancel Inverse Print Mode GS u Set Characters per Line in PortraitGS V Set Print Orientation GS W Set Bar Code Element WidthGS ~ Enter Debug Mode GS w Set Barcode Module WidthGS * Landscape Mode Graphics SO Set Font to Double Wide Mode HT Horizontal TabLF Line Feed SYN Raster Mode Graphics Caret Feature Activating the Caret FeatureUsing the Caret Feature Command Reference Character Codes CharCharacter Codes CharName \ back slash DEL Name Decimal Hex Binary Caret Feature Character Codes 251 1111 252 253 254 255 This page intentionally left blank for double-sided printing Configuration Menu Configuration Menu Printer Specifications Hardware SpecificationsInterface Specifications Print Head SpecificationsPrinter Specifications USB Settings Serial Interface SpecificationsThis page intentionally left blank for double-sided printing