Command Summary - Automatic Data Capture
Command
Description
RA n[ ],m[ ],o[ ],p[ ]
Selects up to eight arrays for data capture. The arrays must be defined with the DM
command.
RD type1,type2,type3,type4
Selects the type of data to be recorded, where type1, type2, type3, and type 4 represent the
various types of data (see table below). The order of data type is important and corresponds
with the order of n,m,o,p arrays in the RA command.
RC n,m
The RC command begins data collection. Sets data capture time interval where n is an integer
between 1 and 8 and designates 2
n
msec between data. m is optional and specifies the
number of elements to be captured. If m is not defined, the number of elements defaults to
the smallest array defined by DM. When m is a negative number, the recording is done
continuously in a circular manner. _RD is the recording pointer and indicates the address of
the next array element. n=0 stops recording.
RC?
Returns a 0 or 1 where, 0 denotes not recording, 1 specifies recording in progress
Data Types for Recording:
Data type
Description
TIME
Controller time as reported by the TIME command
_AFn
Analog input (n=X,Y,Z,W,E,F,G,H, for AN inputs 1-8)
_DEX
2
nd
encoder position (dual encoder)
_NOX
Status bits
_OP
Output
_RLX
Latched position
_RPX
Commanded position
_SCX
Stop code
_TEX
Position error
_TI
Inputs
_TPX
Encoder position
_TSX
Switches (only bit 0-4 valid)
_TTX
Torque (reports digital value
±
32544)
Note
: X may be replaced by Y,Z or W for capturing data on other axes.
Operand Summary - Automatic Data Capture
_RC
Returns a 0 or 1 where, 0 denotes not recording, 1 specifies recording in progress
_RD
Returns address of next array element.
Example - Recording into An Array
During a position move, store the X and Y positions and position error every 2 msec.
#RECORD
Begin program
DM XPOS[300],YPOS[300]
Define X,Y position arrays
DM XERR[300],YERR[300]
Define X,Y error arrays
RA XPOS[],XERR[],YPOS[],YERR[]
Select arrays for capture
RD _TPX,_TEX,_TPY,_TEY
Select data types
PR 10000,20000
Specify move distance
RC1
Start recording now, at rate of 2 msec
BG XY
Begin motion
#A;JP #A,_RC=1
Loop until done
MG “DONE”
Print message
EN
End program
#PLAY
Play back
N=0
Initial Counter
JP# DONE,N>300
Exit if done
N=
Print Counter
X POS[N]=
Print X position
Y POS[N]=
Print Y position
XERR[N]=
Print X error
YERR[N]=
Print Y error
N=N+1
Increment Counter
#DONE
Done
EN
End Program
Chapter 7 Application Programming ▫ 128
DMC-42x0 User Manual
Summary of Contents for DMC-42 0 Series
Page 195: ...ICM 2900 PCB Layout Appendices 191 DMC 42x0 User Manual...
Page 205: ...CB 50 100 Drawings Appendices 201 DMC 42x0 User Manual...
Page 206: ...Appendices 202 DMC 42x0 User Manual...
Page 207: ...Appendices 203 DMC 42x0 User Manual...
Page 208: ...Appendices 204 DMC 42x0 User Manual...
Page 209: ...Appendices 205 DMC 42x0 User Manual...
Page 210: ...Appendices 206 DMC 42x0 User Manual...
Page 211: ...Appendices 207 DMC 42x0 User Manual...
Page 214: ...CB 50 80 Drawing Appendices 210 DMC 42x0 User Manual...