PROGRAMMING WITH BASIC

As an example of programming the printer on Microsoft BASIC, we have listed the program for the IBM-PC. This program runs in the downloadable condition.

1000

Set c

c

 

 

 

 

 

 

 

 

 

 

1010

E$=CHR$( 27 )

 

 

 

 

 

E

 

c

 

 

1020

D$=E$+’’xO”

 

 

 

 

 

‘ Draft

quality

 

 

1030

L$=E$+”X1“+E$+ “k”

 

 

 

 

‘Letter

quality

 

 

1040

RM$=L$+CHR$( O)

 

 

 

 

 

‘Roman

character

 

 

1050

H$=CHR$(9)

 

 

 

 

 

‘Horizontal

tab

 

1060

PI$=E$+”P”

 

 

 

 

 

‘Pica

pitch

 

 

1070

‘ Start

printing

 

 

 

 

 

 

 

 

 

 

 

1080

WIDTH “LPT1:’’.255

 

 

 

 

 

 

 

 

 

 

1090

LPRINT

E

 

 

;

 

 

 

 

 

‘Set

HT

 

1100

LPRINT

RM$;’’Resident

 

fonts

are:”

 

 

 

 

 

 

1110

LPRINT

H$;D$;’’Draft

characters,”;

 

 

 

 

 

 

1120

LPRINT

H$;L$;CHR$(0) ;“Roman

characters,”

 

 

 

 

 

1130

LPRINT

H$;L$;CHR$(l) ;“Sanserif

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

 

 

 

 

 

 

 

 

 

 

 

 

1180

LPRINT

RM$;’’Print pitches are:”

 

 

 

 

 

 

1190

LPRINT

F?$;PI$;’’Pica

pitch

(10 CPI),”;

 

 

 

 

 

1200

LPRINT

H$;E$; ’’M’’Eliteite

pitch

(12 CPI),”

 

 

 

 

 

1210

LPRINT

H$; E$; ’’g’’ Semiecondensedsed

pitch

(15

CPI),”

 

 

1220

LPRINT H$;PI$;

 

 

 

 

 

 

 

 

 

 

 

1230

LPRINT

CHR$(15);

 

 

 

 

‘Select

condensed

print

1240

LPRINT

“Condensed

pica

pitch

(17

CPI),”

 

 

 

 

 

1250

LPRINT

H$; E$; ’’M’’Condensedsed

elite

pitch

(20

CPI),”;

 

 

1260

LPRINT

CHR$(18)

 

 

 

 

 

‘Cancel

condensed

print

1270

LPRINT

H$;E$;’’P1”;

 

 

 

 

‘Select

proportional

spacing

1280

LPRINT

PI$;UNormal

proportional,”

 

 

 

 

 

 

1290

LPRINT

H$; CHR$(15) ;’’Condensed

proportional,”

 

;

 

 

1300

LPRINT

CHR$(18);

 

 

 

 

 

 

 

 

 

 

1310

LPRINT

E$;’’PO”

 

 

 

 

 

‘Cancel

proportional

spacing

1320

LPRINT

 

 

 

 

 

 

 

 

 

 

 

 

1330

LPRINT

H$; E$; ’’wl’’D oublebheightght

,“; E$;’’wO”

 

 

 

 

1340

LPRINT

H$;E$; ’’Wl’’Douhlehle

width,

“;E$;’’WO”

 

 

 

 

1350

LPRINT

H$;CHR$( 28) ;’’E’’;CHR$(2)

;“Triple

width.”;

 

 

1360

LPRINT CHR$(28) ;’’E’’;CHR$(O)

 

 

 

 

 

 

 

 

1370

LPRINT

 

 

 

 

 

 

 

 

 

 

 

 

1380

LPRINT

RM$;’’Various

line

and

character

spacings:”

 

 

1390

FOR 1=1

TO 7

 

 

 

 

 

 

 

 

 

 

 

1400

LPRINT

E$;’’A’’;CHR$(I);

 

 

 

‘Line

spacing

set

 

1410

LPRINT

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

 

 

 

‘Increase

 

character

space

1420

LPRINT H$;’’THE

SPACINGS ARE CHANGEDU

 

 

 

 

 

1430

NEXT 1

 

 

 

 

 

 

 

 

 

 

 

 

1440

FOR 1=’7 TO 1 STEP -1

 

 

 

 

 

 

 

 

 

1450

LPRINT

E$;’’A’’;CHR$(I);

 

 

 

‘Line

spacing

set

 

1460

LPRINT

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

 

 

 

‘Increase

 

character

space

1470

LPRINT H$;’’THE

SPACINGS ARE CHANGED”

 

 

 

 

 

1480

NEXT I

 

 

 

 

 

 

 

 

 

 

 

 

1490

LPRINT

E$;’’3’’;CHR$(3O)

;

 

 

‘Set

1/6”

line

spacing

Page 125
Image 125
Star Micronics NX-2415II user manual Programming with Basic

NX-2415II specifications

The Star Micronics NX-2415II is a versatile and advanced printer designed primarily for point-of-sale (POS) applications. Known for its reliability and efficient performance, it serves as an excellent solution for various retail and hospitality environments. This printer stands out due to its compact design, making it easy to fit into tight spaces while providing superior functionality.

One of the key features of the NX-2415II is its ability to handle multiple printing tasks. With high-speed printing capabilities, it can produce receipts, tickets, and labels at an impressive rate, minimizing customer wait times. Its print speed reaches up to 250mm per second, ensuring that businesses can operate efficiently during peak hours.

The NX-2415II incorporates advanced connectivity options, including USB, Ethernet, and Bluetooth, providing users with the flexibility to choose the connection method that best suits their setup. This multifunctional connectivity enables seamless integration with various POS systems and mobile devices, enhancing overall operational efficiency.

The printer uses high-quality thermal printing technology, which eliminates the need for messy ink and toner. This means lower maintenance costs and reduced hassle for users. Additionally, the NX-2415II supports various paper widths and types, allowing businesses to customize their printed materials according to their needs.

Another notable characteristic of the NX-2415II is its durability. Built with robust materials, this printer can withstand the demands of busy commercial settings, making it an ideal choice for environments that require consistent and reliable performance. Its design also includes features that prevent paper jams and enhance overall operational longevity.

For enhanced user experience, the NX-2415II comes equipped with an easy-to-read LCD display and simple control buttons. This user-friendly interface ensures that even new users can quickly navigate the printer's functions without extensive training. Furthermore, the printer’s energy-efficient design helps reduce overall power consumption, contributing to environmental sustainability.

In summary, the Star Micronics NX-2415II is a powerful and efficient printing solution for modern businesses. Its high-speed performance, versatile connectivity options, and durable construction make it an essential tool for retail and hospitality sectors looking to improve service quality and operational efficiency. Whether printing receipts, tickets, or labels, the NX-2415II meets diverse printing needs with ease and reliability.