Deallocating Array Space - Galil Motion Control DMC-1000 User Manual

Table of Contents

Advertisement

_TSX
_SCX
_NOX
_TTX
Note: X may be replaced by Y,Z or W for capturing data on other axes, or A,B,C,D,E,F,G,H for
DMC-1080.
_RC
_RD
During a position move, store the X and Y positions and position error every 2 msec.
Instruction
#RECORD
DM XPOS[300],YPOS[300]
DM XERR[300],YERR[300]
RA XPOS[],XERR[],YPOS[],YERR[]
RD _TPX,_TEX,_TPY,_TEY
PR 10000,20000
RC1
BG XY
#A;JP #A,RC=1
MG "DONE"
EN
#PLAY
N=0
JP# DONE,N>300
N=
X POS[N]=
Y POS[N]=
XERR[N]=
YERR[N]=
N=N+1
#DONE
Array space may be deallocated using the DA command followed by the array name. DA*[0]
deallocates all the arrays.
108 • Chapter 7 Application Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Switches (only bit 0-4 valid)
Stop code
Status bits
Torque (reports digital value +/-8097)
Operand Summary - Automatic Data Capture
Returns a 0 or 1 where, 0 denotes not recording, 1 specifies recording in progress
Returns address of next array element.
Example - Recording into An Array
Interpretation
Begin program
Define X,Y position arrays
Define X,Y error arrays
Select arrays for capture
Select data types
Specify move distance
Start recording now, at rate of 2 msec
Begin motion
Loop until done
Print message
End program
Play back
Initial Counter
Exit if done
Print Counter
Print X position
Print Y position
Print X error
Print Y error
Increment Counter
Done

Deallocating Array Space

DMC-1000

Advertisement

Table of Contents
loading

Table of Contents