Omron SYSMAC CJ Operation Manual page 354

Sysmac cj-series programmable controller motion control unit
Hide thumbs Also See for SYSMAC CJ:
Table of Contents

Advertisement

Practical examples
5-2-8-1 Example
342
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=in_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
Section 5-2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj1w-mch72

Table of Contents