The resulting file should be sent to the printer using the COPY command, eg:

A>COPY NLQ.DAT PRN

I

prior to printing document files. Of course, this command can also be included in a batch file.

PROGRAMMING USING BASIC

As discussed earlier, a version of BASIC is usually supplied with PC- compatible machines. With this BASIC, characters are sent to the printer using the LPRINT command, and contml codes are defined using the CHR$() function.

Sample program

The following lines of BASIC give examples of how the printer may be driven from within your own programs:

1000 ' Set control codea

 

 

 

 

 

1010

E$=CHRS(27)

'Escape

code

1020

D$=E$+"xO"

'Draft

quality

1030

L$=E$+"xl"

'Letter

quality

1040

F$=E$+"k"

'Select

font

1050

C$=F$+CHR$(O)+L$

'Select

Courier

1060

HS=CHRS(P)

'Horizontal

tab

1070

P$=E$+"P"

'Pica

pitch

1080

' Start

printing

 

 

 

 

 

1090

WIDTH "LPT1:",255

 

 

 

 

 

1100

LPRIRT E$:"D";CHR$(3):CHR$(27);CHR$(O);

1110 LPRIRT C$;"Font settings:"

 

 

 

1120

LPRIRT H$;D$;"Draft

characters,";L$;

1130 LPRIRT H$;F$;CHR$(O);"Courier

 

charactera,"

1140 LPRINT H$;F$;CHR$(l);"Sanserif

 

characters,";

1150

LPRIRT H$;F$;CHR$(2);"Letter-Gothic."

1160

LPRIRT H$;F$;CHR$(3);"0rator

 

charactera.";

1170

LPRIRT H$;F$;CHR$(4);"Script

 

characters,"

1180

LPRIRT H$;F$;CHR$(5);"0CR-B

 

charactera.";

1190

LPRIRT H$;F$;CHR$(6):"TW-Light

 

characters."

1200

LPRIRT H$;F$;CHR$(7);"Cinema

 

charactera"

1210

'

 

 

 

 

 

 

1220

LPRIRT

 

 

 

 

 

 

1230 LPRIRT C$:"Print pitches are:"

 

1240 LPRIRT. H$;P$;"Pica pitch (10 CPI),":

1250

LPRIRT H$;E$;"M";"Elite

pitch

(12 CPI)."

1260 LPRIRT H$;P$;

 

 

 

 

 

1270

LPRIRT

CRRS(15);

'Select

condensed print

1280 LPRIRT "Condenaed pica pitch (17 CPI).";

1290 LPRIRT H$;E$;"M": "Condensed elite pitch (20 CPI).";

1300 LPRIRT CHR$(18) 'Cancel condensed print

90

Page 96
Image 96
Star Micronics XR-1500, XR-1000 user manual Programming Using Basic, Sample program

XR-1000, XR-1500 specifications

Star Micronics has established itself as a leading provider of premium printing solutions, an assertion further bolstered by its innovative models, the XR-1000 and XR-1500. These thermal receipt printers are designed to meet the diverse needs of retail, hospitality, and various business environments, combining robust features, state-of-the-art technologies, and user-friendly characteristics.

The Star Micronics XR-1000 is engineered for high-performance printing, boasting a print speed of up to 200 mm per second. It ensures swift transaction processing, which is essential in high-volume retail settings. The XR-1500, an advanced counterpart, raises the bar with a higher print resolution, delivering crisp and clear receipts that enhance customer experience. Both models utilize direct thermal printing technology, eliminating the need for ink or toner and significantly reducing operational costs.

One of the standout features common to both models is their compact design, making them suitable for environments with limited space. Their lightweight structure also allows for easy relocation, which is beneficial for businesses with dynamic layouts. Furthermore, the printers are equipped with easy paper loading mechanisms that maximize efficiency and minimize downtime.

Connectivity options are another highlight of the XR-1000 and XR-1500. Both models support a variety of interfaces, including USB, Bluetooth, and Ethernet, allowing seamless integration with existing systems. This flexibility ensures that businesses can adapt to evolving technological requirements without significant overhauls.

Moreover, the XR-1000 and XR-1500 printers are compatible with various point-of-sale (POS) systems and software applications, providing reliable performance across different platforms. Their resilience is notable as well, featuring durable casing and components designed to withstand the rigors of daily use.

The models also incorporate advanced power-saving features, crucial for businesses looking to reduce energy costs without sacrificing performance. Their intuitive LED indicators provide real-time feedback, allowing users to quickly assess the status of the printer.

In summary, the Star Micronics XR-1000 and XR-1500 deliver a high-quality printing experience, characterized by speed, reliability, and flexibility. With their advanced technologies and thoughtful design, these printers stand out as optimal choices for businesses seeking efficiency and quality in their printing solutions. Whether in a bustling retail environment or a busy restaurant, it is clear that these printers offer the solutions that modern businesses need.