![background image](http://html1.mh-extra.com/html/omron/sysmac-cj-series/sysmac-cj-series_operation-manual_743585119.webp)
All BASIC commands
Section 4-2
107
/i
/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.
TABLE position
Degree
Value
1
0
0
2
20
1103
3
40
3340
4
60
6500
5
80
10263
6
100
14236
7
120
18000
8
140
21160
9
160
23396
10
180
24500
11
200
24396
12
220
23160
13
240
21000
14
260
18236
15
280
15263
16
300
12500
17
320
10340
18
340
9103
19
360
9000
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...