199
SECTION 9
Sample Programs
This section provides sample motion control programs written in G language. Refer to 9-10 Executing MC Programs from the
Ladder Program for details on executing these programs from the PC’s ladder program.
9-1 Positioning with PTP Control 200. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-2 Positioning with Linear Interpolation 201. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3 Positioning with Linear and Circular Interpolation 202. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-4 Indirect Addressing with Registers 203. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-5 Using the Workpiece Origin Offset 204. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-6 Changing the Interpolation Acceleration Time 205. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-7 Calculating Position Data 206. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-8 Stopping a Program with a General Input 208. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-9 Stopping the Program and Substituting Position Data 209. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-10 Executing MC Programs from the Ladder Program 210. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .