Using Basic - SATO M-5900RV Operator And Technical Reference Manual

Direct thermal printer
Hide thumbs Also See for M-5900RV:
Table of Contents

Advertisement

4.4 Using Basic

It may be useful to test your printer using a BASIC program on a PC. You may
also write your actual production programs in BASIC. Whatever the reason, if
you will be working in BASIC, some of the following hints may help you get
started:
1. Set the WIDTH of the output device to 255 characters to avoid
2. If you are using the printer’s RS232 interface, it is necessary to set the COM
3. You may want to minimize keystrokes and program size by assigning the
Printing with the Parallel Port
5 REM Parallel Example:
10 E$=CHR$(27)
20 WIDTH "LPT1:",255
30 LPRINT E$; "A";
PN 9001081
Rev. C
automatically sending <CR>and <L.> characters after every line. The
command string should be continuous and uninterrupted by <CR> and /or
<L.> commands. The examples given in this manual are printed on
separate lines because they will not fit on one line and do not contain any
<CR> and /or <L.> characters. If these characters are needed, they are
explicitly noted by the inclusion of <CR>and <L.> notations.
port on the PC such that CTS and DSR signals will be ignored. Send your
OPEN “COM” statement in the following way:
OPEN "COM1:9600, E,8,1,CS,DS" AS#1
This sets the RS232 communication parameters of the host PC’s COM1 port
for 9600 baud, Even parity, 8 Data bits, 1 Stop bit and directing the port to
ignore the CTS and DSR control signals.
<ESC> character to a string variable since this character is used quite often.
The following two examples in BASIC show a typical example using these
hints. Both of these examples use the Standard Protocol codes.
SATO M-5900RV Operator and Technical Reference Manual
Section 4. Programming Reference
Identifies the program as a
parallel port print label. The
"REM" prevents this data
from being sent to the printer
and displays it only on the
screen.
Sets the "E$" string as an
<ESC> character.
Sets the width of the output to
255 characters.
Sends an "<ESC>A"
command code to the LPT
parallel port.
Page 4-3

Advertisement

Table of Contents
loading

Table of Contents