Teach (record and play-back), Record and playback example – Yaskawa SMC–4000 User Manual
Page 363
353
SMC–4000 User Manual
Teach (Record and Play-Back)
Several applications require a machine motion trajectory. Use SMC–4000 automatic array to capture
position data. Captured data may be played back in contour mode. Use the following array commands:
Record and Playback Example
DM C[n]
Dimension array
RA C[ ]
Specify array for automatic record (up to 4 for SMC–4000)
RD _TPX
Specify data for capturing (such as _TPX or _TPZ)
RC n,m
Specify capture time interval where n is 2n msec, m is number of records to be
captured
RC? or _RC
Returns a 1 if recording
Instruction
Interpretation
#RECORD
Begin Program
DM XPOS[501]
Dimension array with 501 elements
RA XPOS[]
Specify automatic record
RD _TPX
Specify X position to be captured
MOX
Turn X motor off
RC2
Begin recording; 4 msec interval
#A;JP#A,_RC=1
Continue until done recording
#COMPUTE
Compute DX
DM DX[500]
Dimension Array for DX
C=0
Initialize counter
#L
Label
D=C+1
DELTA=XPOS[D]-XP
OS[C]
Compute the difference
DX[C]=DELTA
Store difference in array
C=C+1
Increment index
JP #L,C<500
Repeat until done
#PLAYBCK
Begin Playback
CMX
Specify contour mode
DT2
Specify time increment
I=0
Initialize array counter
#B
Loop counter
CD XPOS[I];WC
Specify contour data I=I+1 Increment array counter JP #B,I<500 Loop until
done
DT 0;CD0
End contour mode
EN
End program