You are on page 1of 15

CNC Programming / Robotic

Integration

Project Lead The Way


Computer Integrated
Manufacturing
CNC and TTL Programming

NC Codes
Sample NC Part and Program
Handshaking Codes
Sample Mill Handshaking
Flow of Robot program
Sample Robot Handshaking Program
TTL I/O Wire Connections
NC Codes
Block Number (N)
Preparatory Codes (G)
Miscellaneous Codes (M)
Primary X Motion (X)
Primary Y Motion (Y)
Primary Z Motion (Z)
Preparatory Codes
G90 - Absolute Coordinates
G91 - Relative Coordinates
G00 - Rapid Traverse (non-cutting move)
G01 - Straight Line Interpolation (cutting move
G02 - Circle Interpolation (clockwise)
G03 - Circle Interpolation (c-clockwise)
G04 - Dwell (wait) Pause between motions on all axis.
Time in seconds - G04F2 - pause for 2 sec.
G05 - Pause - waits for user intervention.
M Codes - Miscellaneous
M00 - Pause
M01 - Optional stop
M02 - End of Program
M03 - Spindle on
M05 - Spindle off
M06 - Tool Change
M08 / M09 - Accessory # 1 on / off
M10 / M11 - Accessory # 2 on / off
Sample NC Program Block
N00 G90 G01 X.5 Y.5 Z0 F1
FEED RATE (IN/MIN)
Z COORDINATE
Y COORDINATE
X COORDINATE
PREP CODE - SL INTERPOL
PREP CODE - ABSOLUTE
BLOCK SEQUENCE #
SAMPLE PART
ABSOLUTE COORD.
A 0.5 0.5
B 0.5 1.5
C 0.875 1
D 1.25 1.5
E 1.25 0.5
F 1.75 1.5
H 1.75 0.5
I 1.75 1
SAMPLE PROGRAM
N00 G90 ; ABSOLUTE COORDINTAES
N01 M06T1 ; LOAD TOOL 1
N02 M03 S3000 ; TURN SPINDLE ON TO 3000 RPM
N03 G00 Z .1; RAPID TO .1 ABOVE PART
N04 G00 X.5Y.5 ; RAPID TO POINT A
N05 G01 Z-.0625F9 ; PLUNGE 1/16 AT 9 IN/MIN.
N06 G01 X.5Y1.5; STRAIGHT LINE INTERP TO B
N07 G01 X.875Y1; STRAIGNT LINE INTERP TO C
N08 G01 X1.25Y1.5; STRAIGHT LINE INTERP TO D
N09 G01 X1.25Y.5; STRAIGHT LINE INTERP TO E
N10 G01 Z.1; RETRACT CUTTING TOOL
Sample Program Continued
N11 G00 X1.75Y1.5; RAPID TO POINT F
N12 G01 Z-.0625F9; PLUNG AT 9 IN/MIN.
N13 G01 X1.75Y.5; STRAING LINE INTERP TO H
N14 G03 X1.75Y1.5I1.75J1; CCW CIRCLE INTERP.
N15 G01Z.1; RETRACT CUTTING TOOL
N16 M05; TURN OFF SPINDLE
N17 M06T00; UNLOAD CUTTING TOOL
N18 G00X4Y3Z3; MOVE TABLE TO UNLOADING POSITION
N19 M02; END OF PROGRAM

SIMULATE
Handshaking Codes
G25 - Wait until TTL output #1 (Robot) goes on
G26 - Waits until TTL output #1(Robot) goes off
G35 - Wait until TTL output #2 (Robot) goes on
G36 - Waits until TTL output #2(Robot) goes off
M25 - Sets Robot input #1 to off (Starts Robot)
M26 - Sets Robot input #1 to on
M35 - Sets Robot input #2 to off (Starts Robot)
M36 - Sets Robot input #2 to on
Handshaking With The Mill

M10; OPEN VISE


M26; TURN ROBOT INPUT ON (RESTRICTS ROBOT MOVEMENT)
G00; MOVE TO LOAD/UNLOAD POSITION
M25; TURN ROBOT INPUT OFF (START ROBOT - LOAD/UNLOAD)
G04 F2; PAUSE FOR 2 SECONDS
M26; RESET ROBOT INPUT TO ON
G25; WAIT FOR ROBOT OUT #1 TO TURN ON THEN ONTINUE
M11; TURN AUX. #2 OFF (CLOSE VISE)
****** RUN MILL PROGRAM ********************
M47; REWIND PROGRAM
FLOW OF ROBOT PROGRAM
WAIT FOR MILL INPUT

LOAD VISE CYCLE

OUTPUT TO MILL - CUT PART

WAIT FOR MILL


INPUT

UNLOAD VISE CYCLE


Handshaking With The Robot
WAIT
GO TO POSITION - SAFE POSITION
IF INPUT 1 OFF JUMP TO START (FROM MILL)
JUMP TO WAIT
START
LOAD MILL VISE
GO TO POSITION - SAFE POSITION
TURN OUTPUT 1 ON (START MILL PROGRAM)
WAIT 10 - WAIT FOR 1 SECOND
TURN OUTPUT 1 OFF (LIMIT MILL TO 1 CYCLE)
WAIT FOR MILL LOOP - UNLOAD VISE
JUMP TO START
TTL I/O Cable Connection
Pin # Wire Color Robot Controller Connection
1 Purple Output 1 NC

5 Blue Output 1 Common

4 Orange Input 1

9 Green Input Common


Gravity Feeder Connection
Connect one wire to Input #2
Connect second wire to Input Ground

You might also like