PROGRAMMING WITH BASIC

As an exampleof programmingthe printeron MicrosoftBASIC,we have listed the program for the IBM-PC. This program nms in the printer’s Standardmode, and the downloadablecondition.

1000

Set contro

1 codes

 

 

 

 

Escape

 

code

 

 

1010

E$=CHR$ ( 27)

 

 

 

 

 

 

 

 

 

1020

D$=E$+” XO“

 

 

 

 

 

 

Draft

qual

i ty

 

1030

L$=E$+”

X1“+E$+”k”

 

 

 

 

 

Letter

 

qual

i ty

 

1040

RM$=L$+CHR$ (0)

 

 

 

 

 

‘Roman

character

 

1050

H$=CHR$( 9 )

 

 

 

 

 

 

‘Horizontal

 

tab

 

1060

PI $=E$+ “P“

 

 

 

 

 

 

‘Pica

pitch

 

 

 

1070

4 Start

printing

 

 

 

 

 

 

 

 

 

 

 

 

1080

WIDTH “LPTI:” .255

 

 

 

 

 

 

 

 

 

 

 

 

1090

LPRINT

E$; ”D’’;cHR$(3);

cHR$(24)

;CHR$(0)

 

 

‘Set

HT

 

1100

LPRINT

L$;CHR$ (0);

president

fonts

are:”

 

 

 

 

 

 

1110

LPRINT

H$;D$; ”Draft

 

characters,”;

 

 

 

 

 

 

 

 

1120

LPRINT

H$:L$;cHR$(0)

 

;“Roman

characters,

 

 

 

 

 

1130

LPRINT

H$;L$;CHR$(l)

 

;“.$anserif

characters,”;

 

 

 

 

 

1140

LPRINT

H$;L$;CHR$(2) ;“Courier

characters,

 

 

 

 

 

1150

LPRINT

H$;L$;CHR$(3)

 

; “Prestige

characters,”;

 

 

 

 

 

1160

LPRINT

H$;L$;CHR$(4)

 

;“Script

characters,

 

 

 

 

1170

LPRINT

H$;L$;CHR$(7)

 

;“ Orator

characters,”;

 

 

 

 

 

 

1186

LPRINT

H$;L$;CHR$(12);

“H-Gothic

characters,

 

 

 

 

1190

LPRINT

H$:L$;cHR$(32);

‘SLQ Roman,”;

 

 

 

 

 

 

 

1200

LPRINT

H$; L$;cHR$(33):”sLQ

Twilight.

 

 

 

 

 

 

1210

LPRINT

RM$; ”Print pitches

are:”

 

 

 

 

 

 

 

 

1220

LPRINT

 

 

 

 

 

 

 

 

1230

LPRINT

H$;PI$; ”Pica

 

pitch

(10 CPI),”;

 

 

 

 

 

 

 

1240

LPRINT

H$;E$;

”M”; ”Elite

pitch

(12 CPI),”

 

 

 

 

 

1250

LPRINT

H$; E$; ”g”; ”Semi-condensed

pitch

(15

CPI),U;

 

1260

LPRINT H$;PI$;

 

 

 

 

 

 

‘Select

 

condensed

print

1270

LPRINT

CHR$(15);

 

 

 

 

 

 

1280

LPRINT

“Condensed

pica pitch

(17

CPI),”

 

 

 

 

 

 

1290

LPRINT

H$; E$; ’’MO;”Condensed

elite

pitch

(20

CPI),”;

 

1300

LPRINT

CHR$(18)

 

 

 

 

 

‘Cancel

 

condensed

print

1310

LPRINT

H$;E$; ”pl”;

 

 

 

 

 

‘Select

 

proportional

spacing

1320

LPRINT

PI$; ”Normal proportional,”;

 

 

 

 

 

 

 

 

1330

LPRINT

H$;CHR$(15) ; “Condensed proportional.”;

 

 

 

 

 

1340

LPRINT CHR$(18) ;

 

 

 

 

 

‘Cancel

 

proportional

spacing

1350

LPRINT

E$;UPO”

 

 

 

 

 

 

1360

LPRINT

H$;E$; ”W1“;”Double-height,

 

“;E$;

”wO”

 

 

 

 

1370

LPRINT

 

 

 

 

 

1380

LPRINT

H$;E$;

”W1‘;

”Double

width,

“;E$;

NWO”

 

 

 

 

1390

LPRINT

H$;CHR$(28) ;“E”;cHR$(2)

;“Triple

width,”;

 

 

 

1400

LPRINT CHR$(28) ;”E”;CHR$(0)

 

 

 

 

 

 

 

 

 

1410

LPRINT

H$; E$;

’’h” ;CHR$(l);

”Doubl e-sized,

 

 

 

 

 

1420

LPRINT

H$;E$; ”h”;CHR$(2)

; “Quad-sized.

‘;

 

 

 

 

 

 

1430

LPRINT E$; ”h”;CHR$(0)

 

 

 

 

 

 

 

 

 

 

 

1440

LPRINT

:LPRINT,

 

 

 

 

 

 

 

 

 

 

 

 

1450

LPRINT

E$; ”Q’’;CHR$(47)

 

 

 

‘Set

right

margin

 

1460

LPRINT

RM$; ”Various

 

line

and

character

 

spacings:”

 

 

1470

LPRINT

E$;”al”

 

 

 

 

 

 

‘Center

 

text

 

 

 

1480

FOR 1=1

TO 7

 

 

 

 

 

 

‘Line

spacing

set

 

1490

LPRINT

E$; UA”;CHR$(I);

 

 

 

 

 

1500

LPRINT

E$;” “:CHR$(I);

 

 

 

 

‘Increase

character

space

1510

LPRINT

“THE SPACINGS

ARE CHANGED”

 

 

 

 

 

 

 

1520

NEXT I

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1530

FOR 1=7 TO 1 STEP -1

 

 

 

 

‘Line

spacing

set

 

1540

LPRINT

E$; ”AU;CHR$(I)

;

 

 

 

 

1550

LPRINT

E$;” “;CHR$(I);

 

 

 

 

‘Increase

character

space

1560

LPRINT

“THE SPACINGS

ARE CHANGED”

 

 

 

 

 

 

 

1570

NEXT I

 

 

 

 

 

 

 

 

 

 

 

 

 

 

135

Page 146
Image 146
Star Micronics XB-2420, XB-2425 user manual Programming with Basic

XB-2425, XB-2420 specifications

Star Micronics has long been a leader in the development of innovative printing solutions, and the XB-2420 and XB-2425 models are no exception. These two versatile printers are designed to meet the dynamic needs of various industries, offering a mix of performance, reliability, and advanced technology tailored for today’s businesses.

The XB-2420 and XB-2425 are thermal receipt printers that support high-speed printing, making them suitable for retail, hospitality, and other operational environments where efficiency is key. Both models are equipped with a state-of-the-art thermal printing mechanism that enables a print speed of up to 300 mm per second. This rapid output reduces waiting time for customers, contributing to a seamless transaction experience.

One of the standout features of the XB series is its compact design. Measuring just a few inches in height and width, both printers can fit into tight spaces, making them ideal for small counters or mobile workstations. The aesthetic design ensures that they blend effectively into modern retail and business settings, while their robustness guarantees long-term performance.

Connectivity options are another highlight of the XB-2420 and XB-2425. They come with standard USB interfaces, but users can also choose models with Bluetooth or Ethernet capabilities. This flexibility allows for easy integration into existing systems, whether it be in-store POS or mobile solutions, ensuring that businesses can operate efficiently without the limitations of wired connections.

Durability is a critical factor, and Star Micronics has engineered the XB series to withstand the rigors of daily use. With an IP54 rating, the printers are resistant to dust and splashes, making them suitable for both indoor and outdoor environments. Additionally, the built-in auto-cutter feature enhances operational efficiency by neatly cutting each receipt, reducing clutter and improving the overall customer experience.

Moreover, the XB-2420 and XB-2425 support advanced printing technologies such as the Star Line Mode, which allows users to create customized receipts and enhance branding through logos and graphics. With the capability to print barcodes and QR codes seamlessly, businesses can provide their customers with digital coupon opportunities, further modernizing the retail experience.

In summary, the Star Micronics XB-2420 and XB-2425 printers combine high-speed performance, compactness, flexible connectivity options, and durability in one package. These features make them essential tools for businesses looking to enhance operational efficiency and customer satisfaction, standing as a testament to Star Micronics’ commitment to innovation and excellence in the printing industry.