Practical examples
Section 5-2
342
5-2-8-1 Example
start:
GOSUB filltable
WDOG=1 'Set servos to RUN
BASE(1)
SERVO=1 'Enable position loop in axis 1
BASE(0)
SERVO=1 'Enable position loop in axis 0
'The position counter counts from 0 to 11999
'and then back to 0 again
REP_OPTION=1
REP_DIST=12000
SPEED=200
FORWARD
BASE(1)
loop:
CAMBOX(in_tbl,end_tbl,1,lnk_dst,master,opt,start)
WAIT IDLE
GOTO loop
filltable:
'The shape of the CAM is stored in TABLE(0) to
'TABLE(360)
npoints=360
in_tbl=0
end_tbl=npoints
'Distance of the master to make the CAM
lnk_dst=10000
'Master axis
master=0
'The CAM start exactly when the master reaches
'position "start"
opt=2
start=1000
k=100
'Fill the TABLE with the suitable waveform
FOR i= in_tbl TO end_tbl
TABLE(i,(k*(COS(PI*i/npoints)-1))^2)
NEXT i
RETURN
Содержание 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...