Omron trajexia CJ1W-MCH72 Operation Manual page 118

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
/i
Example
Motion is required to follow the POSITION equation:
t(x) = x*25 + 10000(1-cos(x)), where x is in degrees. This example table
provides a simple oscillation superimposed with a constant speed. To
load the table and cycle it continuously the program would be:
FOR deg=0 TO 360 STEP 20 'loop to fill in the table
rad = deg * 2 * PI/360 'convert degrees to radians
x = deg * 25 + 10000 * (1-COS(rad))
TABLE(deg/20,x) 'place value of x in table
NEXT deg
WHILE IN(2)=ON 'repeat cam motion while input 2 is on
CAM(0,18,1,200)
WAIT IDLE
WEND
Note: The subroutine camtable loads the data into the cam TABLE, as
shown in the figure and in the table below.
/i
TABLE position
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Degree
0
0
20
1103
40
3340
60
6500
80
10263
100
14236
120
18000
140
21160
160
23396
180
24500
200
24396
220
23160
240
21000
260
18236
280
15263
300
12500
320
10340
340
9103
360
9000
Section 4-2
Value
107

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents