![Galil Motion Control DMC-1600 Series Скачать руководство пользователя страница 151](http://html1.mh-extra.com/html/galil-motion-control/dmc-1600-series/dmc-1600-series_user-manual_3256992151.webp)
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
Deallocating Array Space
Array space may be deallocated using the DA command followed by the array name. DA*[0]
deallocates all the arrays.
Input of Data (Numeric and String)
Input of Data
The command, IN, is used to prompt the user to input numeric or string data. Using the IN
command, the user may specify a message prompt by placing a message in quotations. When the
controller executes an IN command, the controller will wait for the input of data. The input data is
assigned to the specified variable or array element.
An Example for Inputting Numeric Data
#A
IN "Enter Length", LENX
EN
DMC-1600
Chapter 7 Application Programming
•
143