279
Part 2 Programs
(2) Main program
Screw-tightening program No. 1
Application program
Extension
condition
Input
condition
Command
Output
condition
Comment
AND, OR I/O, flag Command
Operand
1
Operand
2
Output
port, flag
Comment
1 EXPG 2 Start program 2.
2 HOME 11 Align home.
3 VEL 100 Speed: 100 mm/sec
4 ACC 0.3 Acceleration: 0.3 G
5 TAG 1 Jump destination at restart
6 WTON 11 Screw-tightening start pushbutton
7 LET 1 1 Set screw counter.
8 TAG 2
Jump destination after tightening one
screw
9 MOVL *1 Move.
10 BTON 305 Z-axis air cylinder down
11 BTON 306 Start screw tightening.
12 WTON 12 Screw tightening complete.
13 BTOF 305 306 Cylinder up, screw tightening stopped.
14 WTON 13 Check Z-axis air cylinder top position.
15 ADD 1 1 Increment screw counter by 1.
16 CPEQ 1 7 900 Compare after tightening six screws.
17 N900 GOTO 2
Go to next screw-tightening cycle after
tightening one screw.
18 N17 GOTO 1 Restart screw tightening.
19 ABPG 2 Stop program 2.
20 BTOF 307 Stop parts feeder.
21 EXIT End of program 1
Position program
No. X Y
1 30 30
2 60 30
3 90 30
4 30 60
5 60 60
6 90 60
(3) Sub program
Parts feeder program No. 2
Application program
Extension
condition
Input
condition
Command
Output
condition
Comment
AND, OR I/O, flag Command
Operand
1
Operand
2
Output
port, flag
Comment
1 TAG 1 Jump destination for repeating
2 WTOF 14 Screws short.
3 BTON 307 Start parts feeder.
4 WTON 14 Screws fully loaded.
5 BTOF 307 Stop parts feeder.
6 TIMW 5 5 seconds on restart timer
7 GOTO 1 Repeat.