Omron SYSMAC CJ Operation Manual page 328

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

Advertisement

How-to's
316
'1 sample each 2 servo cycles
'Information stored in TABLE(1000) to TABLE(4999)
'Because we capture 4 channels, we have 1000 samples per
channel.
'MPOS AXIS(0) is stored in TABLE(1000) to TABLE(1999)
'DPOS AXIS(1) is stored in TABLE(2000) to TABLE(2999)
'Torque reference for AXIS(1) is stored in
'TABLE(3000) to TABLE(3999)
'MSPEED AXIS(1) is stored in TABLE(4000) to TABLE(4999)
'The capture covers 1000 samples * 2ms / sample = 2seconds
SCOPE(ON,2,1000,4999,MPOS
AXIS(0),DPOS,DRIVE_MONITOR,MSPEED)
FORWARD AXIS(0) 'Move the master axis forward
TRIGGER 'Start tracing and storing of parameters
WHILE NOT MOTION_ERROR
'Cambox that will start in AXIS(0) position 1
CAMBOX(0,999,UNITS,10,0,2,1)
WAIT UNTIL MPOS AXIS(0)<1
'The capture will start when the master axis is in
'a position Between 0 and 1. Additional conditions
'are:
'- The previous capture has finished
'(SCOPE_POS=1000)
'- We have the permission (VR(activate_trigger)=ON)
IF SCOPE_POS=1000 AND VR(activate_trigger)=ON THEN
TRIGGER
PRINT "Triggered"
ENDIF
WAIT IDLE
WEND
HALT
The result is given in the figure.
Section 5-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj1w-mch72

Table of Contents