77

which refers to an instruction that “calls,” or uses a group of nor- mal instructions. In computer programming macro-instructions (which are similar to subroutines) save programmers a lot of time and effort. Your printer’s macro can save you a lot of time and effort also.

Here is how the printer’s macro works. You define macro by telling the printer what normal control codes are to be included in the macro. Then you can use the macro any time that you want and the printer will do all the things that you included the macro definition. You can include up to 16 codes in a single macro. You can even use the macro to store a frequently used word or phrase. There are two control codes for the macro: one to define it, and one to use it. They are given in the Table 5-9.

 

Table 5-9

Macro

instruction commands

Function

Control code

Define macro

(ESC)“+“...(codes you include)

... CHR$(30)

 

Use macro

(ESC)“+“CHR$(l)

To see how this works we can build a macro that will reset the printing style to normal, no matter what style it may be to start with. The following program will define a macro to do this.

10

LPRINT

CHR$(27);"+";

'Start

macro

20

LPRINT

CHR$(27);"h";CHR$(O);

'Big character

 

off

 

 

 

30

LPRINT

CHR$(27);"!";CHR$(O>;

'Select

normal

 

pica

 

 

 

40

LPRINT

~~~$(27);"Tfl;

'Super

&

50

subscripts off

lSet l/6 inch

LPRINT

~H~$(27);'*211;

 

line spacing

 

 

60

LPRINT CHR$(27);"a";CHR$(O);

'Left-aligned

 

printing

 

 

70

LPRINT

CHR$(30)

'End macro

definition

As the comments in the program, we started to define macro in line 10. Line 20 cancels the big character printing. Line 30 sets the normal pica, and also this command cancels the propor-

Page 84
Image 84
Star Micronics NX-10 user manual ESC+CHR$l

NX-10 specifications

The Star Micronics NX-10 is a cutting-edge receipt printer designed for modern business environments. Known for its sleek design and outstanding performance, the NX-10 is ideal for retail, hospitality, and other service-oriented industries. One of its standout features is its fast printing speed, capable of producing receipts at an impressive rate of 300 mm per second. This speed ensures that customers do not have to wait long, enhancing service efficiency and customer satisfaction.

One of the key technologies integrated into the NX-10 is its advanced connectivity options. The printer supports multiple interfaces, including USB, Ethernet, and Bluetooth, allowing seamless integration with various devices such as tablets, smartphones, and POS systems. This flexibility is particularly beneficial in mobile and cloud-based applications, enabling businesses to adapt to their operational needs easily.

The NX-10 also features innovative paper-saving capabilities, including an automatic paper cutter that minimizes waste and reduces operation costs. The printer utilizes a high-quality thermal printing mechanism that ensures crisp, clear text and graphics, making it perfect for producing promotional receipts or tickets alongside regular transaction printouts.

Another notable characteristic of the Star Micronics NX-10 is its robust construction, built to withstand the demands of high-volume printing environments. The printer is designed for easy maintenance with a straightforward drop-in paper loading system that reduces downtime and increases productivity.

The intuitive design of the NX-10 includes a user-friendly interface, which makes it easy for staff to operate without extensive training. Built-in LED indicators provide useful information about printer status, ensuring users are informed at all times.

With a compact footprint, the NX-10 can be easily integrated into any workspace without taking up too much counter space. Its diverse compatibility with major operating systems, including Windows, iOS, and Android, further emphasizes its versatility, making it an ideal choice for various business scenarios.

In summary, the Star Micronics NX-10 is a state-of-the-art receipt printer combining speed, connectivity, and durability. Its advanced features and technology make it a valuable asset for businesses looking to enhance their operations and deliver exceptional customer experiences.