![background image](http://html1.mh-extra.com/html/omron/cs1w-mch71/cs1w-mch71_operation-manual_742367626.webp)
581
Program Example
Section 10-1
10-1-7 Positioning with Position Data Calculation
Explanation of the
operation
• After positioning based on the initial values of position data was per-
formed, positioning is repeated 10 times adding 1000 to the position data
of [J01] each time. After that, positioning is repeated 5 times adding 5000
to the position data of [J02] each time.
• This positioning operation should look as shown below.
Program
Main program
01) PROG P007 Q00000003;
02) STOPMODE;
03) #DL0000 = 0;
04) #PL0011 = 10000;
05) FOR W#DL0000 L5 S1;
06) #PL0010 = 1000;
07) GOSUB P0501;
08) #PL0011 = # 5000;
09) NEXT;
10) END;
Subprogram
01) PROG P501 Q00000003;
02) #DL0002 = 0;
03) FOR W#DL0002 L10 S1;
04) MOVEL [J01]#PL0010 [J02]#PL0011 F300000;
05) MOVEL [J01]0 [J02]0;
06) #PL0010 = #1000;
07) NEXT;
08) RETURN;
Explanation of the
program
Main program
01) A program No. and axes to be used are specified.
02) Stop Mode is selected.
03) The task variable for counting (DL0000) is reset. (For [J02])
04) The first travel distance of [J02] is entered into the position data (PL0011).
05) With FOR command, the process through 05) to 09) is repeated 5 times.
06) The first travel distance of [J01] is entered into the position data (PL0010).
07) The subprogram (P0501) is called and executed.
08) 5000 is added to the position data (PL0011) of [J02].
09) This is the end of FOR command from 05).
10) The program is completed.
J02
J01
10000
15000
20000
25000
30000
1000
0
3000
2000
Содержание CS1W-MCH71 -
Страница 2: ...CS1W MCH71 CJ1W MCH71 Motion Control Unit Operation Manual Revised June 2008 ...
Страница 3: ...iv ...
Страница 29: ...xxx ...
Страница 33: ...xxxiv ...
Страница 35: ...xxxvi ...
Страница 39: ...xl ...
Страница 69: ...24 Performance Section 1 7 ...
Страница 99: ...54 Connecting MECHATROLINK Devices Section 3 5 ...
Страница 283: ...238 Saving Data Section 5 4 ...
Страница 417: ...372 Command Details Section 6 3 ...