![background image](http://html1.mh-extra.com/html/omron/cs1w-mch71/cs1w-mch71_operation-manual_742367631.webp)
586
Program Example
Section 10-1
Explanation of the
program
Main program
01) A program No. and axes to be used are specified.
02) With WHILE command, the process through 02) to 23) is repeated until
the general input (IW0B00) becomes 1.
03) With WAIT command, the program advance will be held until the general
input (IW0B01) becomes 1.
04) The present position is written to the position data (PL0020).
05) The travel distance is calculated with the target position (PL0000) and the
present position (PL0020), and the result will be entered into the position
data (PL0022).
06) The subprogram (P502) is called and executed.
07) to 17) The rotation direction and the travel distance are calculated and
entered into the position data (PL0002).
18) Positioning is performed based on the calculated position data.
19) The program advance will be held until positioning is completed.
20) 1 is output to the general output (OW0BA0).
21) The program advance will be held until the general input (IW0B01)
becomes 0.
22) 0 is output to the general output (OW0BA0).
23) This is the end of WHILE command from 02).
24) The program is completed.
Subprogram
01) A program No. and axes to be used are specified.
02) to 04) When data exceeding 360 degrees is entered into the position data
by mistake, the target position is corrected to the value within the
range 0 to 360 degrees and the main program is resumed. (When
an appropriate target position is entered in the position data, the
subprogram does not do anything and the main program is
resumed.)
05) The program is completed and the main program is resumed.
10-1-11 Feeder Feeding
Explanation of the
operation
• Sets the workpiece coordinate system to 0 when started from the CPU
Unit.
• The workpiece length is set to 1000.
Note
Set the following axis parameters before using feeder feeding. These settings
enable axes to continue infinite feeding in a set direction.
• Set the axis feed mode to an infinite axis (P5AA07 = 00000010 Hex)
• Set the reference unit per machine rotation in P5AA04 to a value that is N
times the actual length of the workpiece. Use a value less than N times
the actual length of the workpiece as the reference position. In the sample
program, P5AA04 is set to 100,000, which is 100
×
the workpiece length
(1,000).
• Set P5AA05 to N times the actual value to when setting a motor gear
ratio. In the sample program, P5AA05 is set to 100 times the actual gear
ratio.
Содержание 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 ...