Uploading And Downloading Arrays To On Board Memory; Automatic Data Capture Into Arrays - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

Using a Variable to Address Array Elements
An array element number can also be a variable. This allows array entries to be assigned sequentially
using a counter.
The above example records 10 position values at a rate of one value per 10 msec. The values are
stored in an array named POS. The variable 'count' is used to increment the array element counter.
The above example can also be executed with the automatic data capture feature described below.

Uploading and Downloading Arrays to On Board Memory

Arrays may be uploaded and downloaded using the QU and QD commands.
where array is an array name such as A[].
Start is the first element of array (default=0)
End is the last element of array (default=last element)
Delim specifies whether the array data is seperated by a comma (delim=1) or a carriage return
(delim=0).
The file is terminated using <control>Z, <control>Q, <control>D or \.

Automatic Data Capture into Arrays

The CDS-3310 provides a special feature for automatic capture of data such as position, position error,
inputs or torque. This is useful for teaching motion trajectories or observing system performance. Up
to eight types of data can be captured and stored in eight arrays. The capture rate or time interval may
be specified. Recording can be done as a one time event or as a circular continuous recording.
40 • Chapter 7 Application Programming
DM speed[10]
speed[1]=7650.2
speed[1]=
posXA[10]=_TPA
con[2]=@COS[POS]*2
timer[1]=TIME
Instruction
#A
count=0;DM POS[10]
#LOOP
WT 10
POS[count]=_TPA
POS[count]=
count = count +1
JP #LOOP, count <10
EN
QU array[],start,end,delim
QD array[],start,end
Dimension Speed Array
Assigns the first element of the array the value 7650.2
Returns array element value
Assigns the 10th element the position of A
nd
Assigns the 2
element of the array the cosine of POS * 2.
st
Assigns the 1
element of the array 'timer'
Interpretation
Begin Program
Initialize counter and define array
Begin loop
Wait 10 msec
Record position into array element
Report position
Increment counter
Loop until 10 elements have been stored
End Program
CDS-3310

Advertisement

Table of Contents
loading

Table of Contents