![Okuma OSP-P200L Скачать руководство пользователя страница 333](http://html1.mh-extra.com/html/okuma/osp-p200l/osp-p200l_programming-manual_3667818333.webp)
5238-E P-320
SECTION 13 SCHEDULE PROGRAMS
5
Use common variables as counters to count the number of machined parts.
LE33013R0301500060001
Variable for part A V1
Variable for part B V2
Variable for part C V3
*1: When setting a common variable in
a schedule program, specify the
"VSET" command first, then set the
common variable.
SHAFT-1. SDF
Set variable V1 (V1 = 1).
Select A.MIN. O100.
Add "1" to V1.
Has value V1
reached "20"?
No
No
Yes
Yes
No
Yes
Set variable V2. V2=1
Select B.MIN. O200.
Add "1" to V2 (V2 = 1).
Has value V2
reached "15"?
Set variable V3 (V3 = 1).
Select C.MIN. O300.
Add "1" to V3.
Has value V3
reached "25"?
END
Schedule program
$ SHAFT-1. SDF
%
N1000 VSET V1=1
N1001 PSELECT A. MIN. O100
N1005 PSELECT B. MIN. O200
N1009 PSELECT C. MIN. O300
N1003 IF [V1 LE 20] N1001
N1011 IF [V3 LE 25] N1009
N1012 END
N1007 IF [V2 LE 15] N1005
(
∗
1)
N1002 VSET V1=V1+1
N1004 VSET V2=1
(
∗
1)
N1006 VSET V2=V2+1
(
∗
1)
N1010 VSET V3=V3+1
(
∗
1)
N1008 VSET V3=1
(
∗
1)
(
∗
1)
File name of the schedule program
Sets the initial value for the counter for Part A.
Calls and executes the program for Part A.
Note: PSELECT means "program select".
Adds "1" to the counter on completion of the program.
Sets the initial value for the counter for Part B.
Jumps to N1001 to repeat machining if "counter
value 20".
Proceeds to N1004 after machining 20 pcs. of Part A.
Calls and executes the program for Part B.
Adds "1" to the counter on completion of the program.
Sets the initial value for the counter for Part C.
Jumps to N1005 to repeat machining if "counter
value 15".
Proceeds to N1008 after machining 15 pcs. of Part B.
Calls and executes the program for Part C.
Adds "1" to the counter on completion of the program.
Jumps to N1009 to repeat machining if "counter
value 25".
Proceeds to N1012 after machining 25 pcs. of Part C.
This code must always be specified at the beginning of a program.
End code of a schedule program. This must always be
entered at the end of a schedule program.
Main Program (Machining Program)
A. MIN. O100
%
N100
G00
X
Z
STM
N150
M02
B. MIN. O200
%
N100
G00
X
Z
STM
N230
M02
C. MIN. O300
%
N300
G00
X
Z
STM
N340
M02