NCT Group 99M Microscope & Magnifier User Manual


 
15 Special Transformations
117
Fig. 15.3-1
Example:
subprogram
O0101
N1 G90 G0 X180 Y120 F120
N2 G1 X240
N3 Y160
N4 G3 X180 Y120 R80
N5 M99
main program
O0100
N1 G90 (absolute coordinate specification)
N2 M98 P101 (call of subprogram)
N3 G51.1 X140 (mirror image applied to an axis parallel to axis Y on
coordinate X=140)
N4 M98 P101 (call of subprogram)
N5 G51.1 Y100 (mirror image applied to an axis parallel to axis X on
coordinate Y=100)
N6 M98 P101 (call of subprogram)
N7 G50.1 X0 (canceling mirror image on the axis parallel to Y)
N8 M98 P101 (call of subprogram)
N9 G50.1 Y0 (canceling mirror image on the axis parallel to X)
15.4 Rules of Programming Special Transformations
Rotation and scaling instructions, G68 and G51 can be issued in any order.
It should be borne in mind, however, that - when rotation is followed by scaling - the rotation
command will have an effect on the coordinates of the center of scaling. If, on the other hand, scaling
is followed by rotation, the scaling command will have an effect on the coordinates of the center of
rotation.
Furthermore, the on and off commands of the two procedures have to be "nested", they must not
overlap each other:
rotation-scaling
N1 G90 G17 G0 X0 Y0
N2 G68 X80 Y40 R60
N3 G51 X130 Y70 P0.5
N4 X180 Y40
N5 G1 Y100 F200
N6 X80
N7 Y40
N8 X180
N9 G50
N10 G69 G0 X0 Y0
scaling-rotation
N1 G90 G17 G0 X0 Y0
N2 G51 X130 Y70 P0.5
N3 G68 X80 Y40 R60
N4 X180 Y40
N5 G1 Y100 F200
N6 X80
N7 Y40
N8 X180
N9 G69
N10 G50 G0 X0 Y0