
18-1
18. Appendix
18-1. Sample programs
(1) Repeat a program for a preset times and then turn ON the lamp to end.
Preconditions:
Applied processing program:
Prog0100.prg,
Variable to store the program count:
GB001,
Lamp ON output terminal:
#5,
Number of the program execution:
10 times.
1
SET GB001 10
Sets the program execution time.
2
LABL0001
A label for loop action.
3
CALL Prog0100.prg
A command to execute the processing program.
4
DEC GB001
Subtract 1 from the program execution time “GB001”.
5
IF GB001 > 0 THEN JUMP
LABL0001 ELSE NOP
If the program execution time is not equal to zero “0”, go back to
“LABL0001".
If it is equal to zero “0”, then go to the next line.
6
OUT O1#005 = ON
Turn ON the lamp.
7
STOP
End of operation (… It can be omitted.)
(2) In auto operation, shift the taught position(s) by a preset parameter.
Preconditions:
Variable to store the shift parameter:
GB001,
Shift the contents in the GD001 using the SHIFT command.
1
TOOL = 1:TOOL00001
2
MOVEL P1 ,10.00 m/min
3
SHIFT-ON ROBOT = 1:GD001
Starts SHIFT action.
4
MOVEL P2 , 8.00 m/min
5
MOVEL P3 ,3.00 m/min
6
ARC-SET AMP=120 VOLT=19.0 S=0.50
7
ARC-ON ArcStart1.prg RETRY=0
8
MOVEL P4 ,0.50 m/min
9
CRATER AMP=100 VOLT=19.0 T=0.00
10
ARC-OFF ArcEnd1.prg RELEASE=0
11
MOVEL P5 , 5.00 m/min
12
SHIFT-OFF
Ends SHIFT action.
13
MOVEL P1 ,3.00 m/min
·
This sample program, once started, shifts all points between SHIFT-ON command and SHIFT-OFF
command by GD001.
·
For example, if the value of GD001 is X=100.00, Y=0.0 and Z=0.0, then points P2 to P5 will be
shifted 100 mm in X direction on the robot coordinate system.