Omron CS1W-MCH71 MOTION CONTROL UNIT - 09-2004 Manual page 560

Motion control unit
Hide thumbs Also See for CS1W-MCH71 MOTION CONTROL UNIT - 09-2004:
Table of Contents

Advertisement

Program Example
1,2,3...
Program
• The target position is to be specified within the range of 0 to 360 degrees.
Passing the position of 360 (0) degrees clears the present position to 0.
1. Enter a target position into the position data using IOWR instruction.
2. Execute positioning by turning ON the general input for positioning.
3. 1 is output to the general output once positioning is completed.
4. 0 is output to the general output when the general input for positioning is
turned OFF.
5. The process through 1 to 4 is repeated until the general input for repeat is
turned ON.
120°
Positioning with shorter distance
Main program
01) PROG P011 Q00000001;
02) WHILE #IW0B00 <> 1;
03) WAIT #IW0B01 == 1;
04) #PL0020 = #SL0206;
05) #PL0022 = #PL0000 - #PL0020;
06) GOSUB P502;
07) IF #PL0022 < -180;
08) #PL0002 = #PL0022 + 360;
09) #PL0022 = 360;
10) ENDIF;
11) IF #PL0022 < 180;
12) #PL0002 = #PL0022;
13) #PL0022 = 360;
14) ENDIF;
15) IF #PL0022 < 360;
16) #PL0002 = #PL0022 - 360;
17) ENDIF;
18) INC MOVEL [J01]#PL0002 F300000;
19) NOPS;
20) #OW0BA0 = 1;
21) WAIT #IW0B01 == 0;
22) #OW0BA0 = 0;
23) WEND;
24) END;
Subprogram
01) PROG P502 Q00000000;
02) WHILE #PL0022 >= 360;
03) #PL0022 = #PL0022 - 360;
04) WEND;
05) RETURN;
360°
60°
180°
Section 10-1
537

Advertisement

Table of Contents

Troubleshooting

loading

This manual is also suitable for:

Sysmac cs-series

Table of Contents