Epson SE450 manual Conversions

Page 13

Programming the LabelWriter Printer

To allow for longer distances to be specified, two 8-bit characters are used to specify the value, by combining them into one 16-bit character. Though the calculations are all performed within the printer itself, it is important to understand how the characters are handled.

The decimal value of the first character that is sent (usually noted as n1) is multiplied by

256.The decimal value of the second character sent (usually noted as n2) is then added to

this.

The following illustration is a graphical representation of how this works.

To send a value under 256 to a command that takes the n1 n2 parameters, simply send the first character with a 0 value. For values greater than 256 but less than 512, the first parameter should be sent with a value of 1. For values greater than 512 but less than 768, the first parameter should be set to 2, and so on.

Conversions

Converting from dots to inches using the n1 n2 parameters can seem a bit challenging at first, but is really no more complex than multiplication and division. The table below lists some common values and their relationship.

Inches Dots n1 n2

0.5 101 0 101

1.0 203 0 203

1.5 304 1 48

2.0 406 1 150

2.5 507 1 251

3.0 609 2 97

3.5 710 2 198

4.0 812 3 44

To convert from a value shown in the Dots column, convert the Dots value to binary, and then convert the top eight bits to base 10 for n1 and the bottom eight bits to decimal for n2.

For example:

7

Image 13
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 RS-232 Settings Configuring the Host Computer for RS-232 Serial InterfaceRS-232 Cabling RS-232 Signal LevelsProgramming the LabelWriter Printer Programming OverviewCommand Parameters Resetting the PrinterCharacter Evaluation Bit Character ParametersConversions Objects Font SpecificationsPrint Modes Orientation Raster ModeText Objects Landscape ModeBarcode Objects Line Objects Graphic ObjectsAlphabetical Command List Command ReferenceESC L Position Control Commands by FunctionGS DC2 GS DC3 GS RS GS US Font ControlMiscellaneous BarcodesPrintable Characters Raster Compatibility Commands20h FFh Printable Characters CR Carriage Return DC4 Cancel Double Wide ModeESC a Return Hardware Status ESC a Return Printer StatusESC B Set Dot Tab ESC d Set Print Temperature to Medium ESC c Set Print Temperature to LowESC D Set Bytes per Line ESC E Form Feed ESC e Set Print Temperature to DefaultESC F 1 n Feed n Lines ESC g Set Print Temperature to HighESC h Set Print Speed to Fast ESC i Set Printing Speed to BarcodeESC M Set Font to 12 cpi ESC L Set Feed LengthESC P Set Font to 16 cpi ESC S Set Font to 20 cpi ESC Q Set Top MarginESC T Set Font to 7 cpi ESC U Set Font to 10 cpi ESC W Wrap Data ESC V Return Firmware RevisionESC Y Set Vertical Starting Position ESC X Set Horizontal Starting PositionESC @ Reset to Power-up Condition ESC * Reset to DefaultsESC y Set 203 x 203 dpi ESC z Set 136 x 203 dpiETB Raster Mode Compressed Graphics FF Form Feed GS DC2 Set Font to Double Height GS a Starting Position of Bar CodeGS d Feed n Text Lines GS DC3 Cancel Double HeightGS k Print Barcode GS h Set Barcode HeightUPC-A Data Matrix BarcodeSupported 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 q Print UPC/EAN Checksum GS RS Set Inverse Print ModeReturns GS S Return Printer StatusGS t Set Characters per Line in Landscape GS T Select Line Wrap/Truncate ModesGS u Set Characters per Line in Portrait GS US Cancel Inverse Print ModeGS W Set Bar Code Element Width GS V Set Print OrientationGS w Set Barcode Module Width GS ~ Enter Debug ModeGS * Landscape Mode Graphics HT Horizontal Tab SO Set Font to Double Wide ModeLF Line Feed SYN Raster Mode Graphics Activating the Caret Feature Caret FeatureUsing the Caret Feature Command Reference Char Character CodesCharacter 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 Hardware Specifications Printer SpecificationsInterface Specifications Print Head SpecificationsPrinter Specifications Serial Interface Specifications USB SettingsThis page intentionally left blank for double-sided printing