
B–61803E–1/10
A. MACRO PROGRAM EXAMPLE
APPENDIX
189
0040 G243 X [ ] Y [ ] P [#143+#100]
#143 is a common variable, which is used for Sequence No.
offset.
#100 is used as a counter, which counts 0 to 4.
Here set the head Sequence No. of the character string written
in Program No. O0033, using #143, and loop it with #100 to
make it correspond to soft key 1 to 5.
O0020
0220 N003 #100=#100+6
#100=#100–[FIX [#100/6]]
*
6
This calculation is made to find the cursor position.
Add 6 in advance so that cursor position does not become
negative on the 220th line. ”6” means that the cursor moves
at 6 places.
”FIX” on the 230th line is a function which omits the figure
below the decimal place of the answer for the quotient. Find
the remainder divided by 6.
O0030
0090 G243 X0 Y2 A1 B0 K200
Write 200 blanks, using K200.
If a triple character is specified with A3, the blank of a triple
character is written by the specified number.
0190 X0 Y4 (
*
3441 2438 493D......
*
)
When internal codes, such as Chinese characters are used for
the screen display, enclose them with ”(*”and ”*)”.
For chinese characters, space for 2 letters are used.
0480 G243 X__Y__ F8.3
F8.3 specifies the digits when numerical data is displayed:
total 8 digits and 3 digits below the decimal place.
0570 X6 Y6 (5.2)
#100=1234.567
When the display is made in 2 digits below the decimal place,
using F5.2 format, the figure is half-adjusted to ”1234.57”.
0600 #8509=0033
Use the character string registeration program variable #8509
that designates program No. including sequence
No.specified by G243 P(Sequence No.
).
Here, use Program No. 0033 character string.
O0032
G243·····B1(···)
For blink display, display instructions are given only once
but repeated.
O0040
0101 #101=G121.4
G121.4 (emergency stop) condition is read to common
variable #100.