![Megatron MTH-2500 Скачать руководство пользователя страница 20](http://html1.mh-extra.com/html/megatron/mth-2500/mth-2500_manual_1765294020.webp)
·
ESC ' m
L
m
H
n
L1
n
H1
.. n
Lm
n
Hm
(1B 27 Hex=27 39 Dec)
Printing graphic curves.
This command allows for easy printing of curves along the paper
(vertically). The m value (transmitted on 2 bytes) represents the number of
curves (points) to be printed for the current graphic line, and must be
included between 1 and the maximum number of printable points per line
(384).
The n
1
.. n
m
values represent the position of these m curves (or points); the
number of points (n
1
.. n
m
) must be equal to m.
Each point must be included between 1 and the maximum number of
printable points per line (384), otherwise it will not be printed. As horizontal
lines printing progresses, the vertical curves will show on the paper.
The vertical lengthening (ESC 'w' n) act on the graphic curves.
Example:
Basic software to print 4 curves and a central axis.
·
y = 192 + e
-0,1x
·
y = 192 - e
-0,1x
·
y = 192 - e
-0,1x
* sin (x/10)
·
y = 192 + e
-0,1x
* sin (x/10)
·
y = 192
MTH-2500, 2700 & 3500 v3.4
20
10 OPEN "COM1:9600, N, 8, 1, CS60000, DS, CD" AS #1
20 FOR X=0 TO 200
30 PRINT #1, CHR$(27); CHR$(39); CHR$(5); CHR$(0);
40 Y=INT(192*EXP(-.01*X)): YY=INT(Y*SIN(X/10))
50 PRINT #1, CHR$((192-YY) mod 256);CHR$((192-YY) div 256);
60 PRINT #1, CHR$((192-Y) mod 256);CHR$((192-Y) div 256);
70 PRINT #1, CHR$(192);CHR$(0);
80 PRINT #1, CHR$((192+Y) mod 256);CHR$((192+Y) div 256);
90 PRINT #1, CHR$((192+YY) mod 256);CHR$((192+YY) div 256);
100 NEXT X
110 CLOSE #1
120 END
Software in Basic