Examples and tips
PROGRAMMING MANUAL
301
R
e
vi
si
o
n
1
.0
REP_OPTION=1
FE_LIMIT=1
DRIVE_CONTROL=11
SPEED=8
ACCEL=50
DECEL=50
DEFPOS(0)
SERVO=ON
CANCEL
NEXT i
WDOG=ON
BASE(1)
'Scope settings:
'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