
B–62073E–2/03
A.MACRO PROGRAM EXAMPLE
149
00200 N40 IF [ #142 NE 14 ]GOTO 50 ;
00210 #147 = 2 ;
00220 GOTO 90 ;
00230 N50 IF [ #142 NE 2 ]GOTO 60 ;
00240 #147 = #147 – 1 ;
00250 GOTO 90 ;
00260 N60 IF [ #142 NE 1 ]GOTO 70 ;
00270 #147 = #147 + 1 ;
00280 GOTO 90 ;
00290 N70 IF [ #142 NE 15 ]GOTO 80 ; To N80 if software key is not ”Execution”
00300 M98 P54 ; Mode check, message display
00310 GOTO 100 ;
00320 N80 IF [ #142 NE 8 ]GOTO 100 ; Was input pressed?
00330 N90 #147 = #147 + 3 ;
00340 #147 = #147 – FIX [ #147 / 3 ]
*
3 ;
00350 IF [ #144 EQ #0 ]GOTO 100 ; Was there numerical value key inputted?
00360 # [ 500 + #147 ]= #144 ; Data reading to common variable #500–
00370 #1 = #147 + 2 ;
00380 G243 X14 Y#1 Z1 F4.0 D# [ #147 + 500 ] ;
00390 N100 M98 P0051 ;
00400 N110 IF [ #142 NE 16 ]GOTO 200 ; To menu if end key was pressed
00410 #8500 = 1 ;
00420 M99 ;
00430 N200 IF [ #142 EQ 0 ]GOTO 210 ; Was there key input?
00440 M99 P10 ;
00450 N210 M99 P20 ;
00010 O0051 ; Cursor and data display
00020 #1 = #147 + 2 ;
00030 N100 G230 Y#1 L6 ;
00040 #100 = 0 ;
00050 WHILE [ #100 LT 3 ]DO 1 ;
00060 G243 X14 Y[ #100 + 2 ]Z1 F4.0 D#[ 500 + #100 ];
00070 #100 = #100 + 1 ;
00080 END 1 ;
00090 M99 ;
00010 O0052 ; Data character display
00020 G243 X0 Y0 A1 B0 (
*
3F3F 315F 405A 3A6F
*
) ; True circle cutting
00030 X1 Y2 (I) ;
00040 (
*
0028 0020 483E 0020 0020 3742 0020 0029 003D
*
) ; Radius
00050 X1 Y3 (F) ;
00060 (
*
0028 405A 3A6F 422E 4559 0029 003D
*
) ; Cutting rate
00070 X1 Y4 (D) ;
00080 (
*
0028 4A64 4035 4856 3966 0029 003D
*
) ; Compensation number
00090 #143 = 200 ;
00100 M98 P0011 ;
00110 M99 ;
00010 O0053 ; Graphic drawing
00020 G244 P0 ; Drawing line type specification (continuous line)
00030 G240 P2 ; Color specification (green)
00040 G242 X80 Y20 ; Drawing start point setting
00050 G301 X125 Y65 ; Linear drawing
00060 G302 X170 Y20 I0 J–45 ; Circular drawing
00070 G302 X170 Y20 I–90 J0 ; Circular drawing
00080 G302 X125 Y–25 I–45 J0 ; Circular drawing
00090 G301 X80 Y20 ; Linear drawing
00100 G244 P2 ; Drawing line type specification (1–dot chain line)
00120 G242 X80 Y20 ; Drawing start point setting
00130 G240 P7 ; Color specification (white)
00140 G301 Y–100 ; Linear drawing
00150 G242 X–10 Y20 ; Drawing start point setting
00160 G301 Y–100 ; Linear drawing
00170 G244 P1 ; Drawing type line specification (broken line)
00180 G242 X80 Y–95 ; Drawing start point setting
00190 G240 P6 ; Color specification (pale blue)
00200 G301 X–10 ; Linear drawing
00210 G240 P7 ; Color specification (white)
Cursor pointer is 2 if software key 3 is pressed
If cursor “±” pointer–1
If cursor “°” pointer+1
Cursor position calculation
Data length
Displays data while changing
display position