Find Docs

Galil Motion Control - catalog (Page 94)

Wodocs >> Electronics : Motion Control >> Galil Motion Control catalog Page 94
Galil Motion Control - catalog
M O T I O N C O N T R O L P R O G R A M M I N G
RECORD DATA
Motion Control Programming
107
To store data in the array, we use an instruction such as:
XPOS [5] = _TPX
which reads the current position of the X axis and stores
the value in the array. The value of the position may be
later retrieved with instructions of the form:
X = XPOS [5]
which transfers the position value to the variable X.
The use of arrays is illustrated by the following example.
The controller is required to move an XY table to four
positions characterized by their coordinates. The values of
the required points are stored in the arrays XPOS and YPOS.
Once the controller reaches the specified point, it must wait
a certain amount of time before resuming the motion. The
waiting time in milliseconds is stored in the array WAIT.
The program is described in two parts. The first part,
#STORE, defines the arrays. The second part, RUN, per-
forms the moves according to the requirements.
Instruction
Interpretation
#STORE
Label
DM XPOS [4], YPOS [4], WAIT [4]
Define arrays
XPOS [0] = 100
Set values
XPOS [1] = 320
XPOS [2] = 450
XPOS [3] = 500
YPOS [0] = -100
YPOS [1] = 20
YPOS [2] = 153
YPOS [3] = 200
WAIT [0] = 50
WAIT [1] = 100
WAIT [2] = 60
WAIT [3] = 120
EN
End program
Instruction
Interpretation
#RUN
Label
AC 200000,200000
Accelerations
DC 200000,200000
Decelerations
SP 50000,50000
Speeds
N = 0
Initial count
#LOOP
PA XPOS [N], YPOS [N]
Specify final position
BGXY
Start motion
AMXY
Wait for completion
WT WAIT [N]
Wait specified time interval
N = N+1
Increment index
JP#LOOP, N<4
Repeat 4 times
EN
End program
One of the main uses of the array is for recording motion
as described in the following section.
Record Data Mode
Controllers can record motion data at a fixed rate and store
the data in an array. This data can be later used to duplicate
the motion or to analyze it.
The recording process includes several steps. First the
array where the data are stored must be specified, and later
the type of data, such as position, position error, etc.,
must be defined before the actual recording is accom-
plished at a specified rate. The process is illustrated by the
following example.
Write a program that records the position error of the Y
axis every 16 msec, a total of 100 times, and stores the results
in the array YERROR.
The actual recording is done with the instruction RC that
has two parameters: the first parameter, n, defines the record-
ing time interval as 2n msec. In the given example, n = 4
results in 16 msec intervals. The second parameter sets the
number of the recorded points.

<< Previous       1 .. 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101       Next >>



Other Documents:
2004catalog, ampmotororder, blm n 23, catcps, catmotors, ctool, ioc 7007, pcicompar, programming, softorder, system, utilities, wsdk, activelife, camalot, mojavaton, smmov, Filter Equiv, note 1410, note 1411, note 1412, eseries brochure, ethernet dmc 21x 2, ethernet emerge, ethernet flight, ethernet horizons, pr 03 30 00, pr 10 1 98, pr 10 20 99, pr 11 30 00, pr 1 13 00, pr 2 18 98, pr 3 11 98, pr 3 2 98, pr 6 15 99, pr 7 1 99, pr 8 29 00, pr 9 13 99, pr 9 9 98, db 28040 qsi, bestvalue, jacob video, icmworksheet, note 1220, note 1222, note 2311, note 2312, note 2319, note 2321, note 2326,


WODocs | |
All rights reserved. wodocs.com© 2009
WODocs


New Docs

Documents Category:
Arts (Design, Movies, Music, Radio, Television)
Automotive (Cars, Marine, Motorcycle, ATV, Snowmobiles)
Business (Biotechnology and Pharmaceuticals, Chemicals, Construction and Maintenance, Materials, Real Estate, Services)
Electronics (Computers, Motion Control, Power Supply)
Games (Board, Family, Party, Card, Construction, RC Toys)
Health (Animalm, Beauty, Healthcare, Medicine, Pharmacy, Surgery, Weight Loss)
Home (Accessories, Cooking, Decor and Design, Electrical, Family, Pets)
News (Newspapers, Sports, Television)
Recreation (Collecting, Hiking, Scouting, Survival, Travel)
Reference (Education, Libraries and Archives, Museums)
Science (Agriculture, Astronomy, Biology, Chemistry)
Shopping (Antiques and Collectibles, Clothing, Flowers, Food, Home and Garden)
Sports (Bicycle, Snowboard, Skiing, Other)