CDS-3310
Chapter
7 Application Programming
i
41
Command Summary - Automatic Data Capture
command description
RA n[],m[],o[],p[]
Selects up to four 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 command reference). 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
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
Instruction Interpretation
#RECORD Begin
program
DM apos[300],bpos[300]
Define A,B position arrays
DM aerr[300],berr[300]
Define A,B error arrays
RA apos [],aerr[],bpos[],berr[]
Select arrays for capture
RD _TPA,_TEA,_TPB,_TEB
Select data types
PR 10000,20000
Specify move distance
RC1
Start recording now, at rate of 2 msec
BG AB
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
apos [N]=
Print X position
bpos [N]=
Print Y position
aerr[N]=
Print X error
berr[N]=
Print Y error
n=n+1 Increment
Counter
#DONE Done
EN End
Program
Содержание CDS-3310
Страница 26: ...18 i Chapter 2 Getting Started CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 32: ...24 i Chapter 3 Connecting I O CDS 3310 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 124: ...CDS 3310 Chapter 8 Hardware Software Protection i 63 THIS PAGE LEFT PLANK INTENTIONALLY...
Страница 138: ...CDS 3310 Chapter 10 Theory of Operation i 77 THIS PAGE LEFT BLANK INTENTIONALLY...