Find Docs

Galil Motion Control - tut2 (Page 7)

Wodocs >> Electronics : Motion Control >> Galil Motion Control tut2 Page 7
Galil Motion Control - tut2
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, performs the
moves according to the requirements.
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
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
TECHNICAL REFERENCE
MOTION PROGRAMMING
ARRAYS
Arrays are ordered structures in memory where data
can be stored and retrieved. They are useful for storing
sequences of position points or output signals.
An array is characterized by a name and a size. Each
element in the array is identified by its index. For exam-
ple, the array XPOS may have a size of 100 units. As a
SET X-Y SPEED, ACCEL
AND DECEL
N=0
READ XPOS[N], YPOS[N]
COMMAND X-Y MOTION
WAIT FOR END OF MOTION
WAIT FOR REQUIRED TIME
N=N+1
LOOP
END
YES
NO
N<4
Flowchart for Array Program
ARRAYS
Example--Array
consequence, each point is identified as XPOS [N] where
N varies between 0 and 99.
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.
86
·
Galil Motion Control, Inc.
·
www.galilmc.com

<< Previous       1 2 3 4 5 6 7 8 9 10 11 12 13       Next >>



Other Documents:
tut3, tut4, tut6, amp 19540 manual, cadman, manc 18x 6, optcom, MSDS JEECHEM SHAMPOO CONCENTRATE 1, msds ALOE VERA GEL DECOLORIZED 40 X, msds ALOE VERA OIL EXTRACT Mineral Oil Base, msds ANHYDROUS LANOLIN USP, msds CARROT OIL, msds COTTONSEED OIL, msds JEECHEM 100 CG POWDER, msds JEECHEM 1450, msds JEECHEM 186, msds JEECHEM BUBBLE BATH GSE, msds JEECHEM CA 40, msds JEECHEM CA 9, msds JEECHEM CASTOR OIL PP, msds JEECHEM CER, msds JEECHEM NP 12, msds JEECHEM NP 30, msds JEECHEM NP 6, msds JEECHEM SHAMPOO BWC, msds JEECHEM SHAMPOO COMBE BLEND, msds JEECHEM SHAMPOO CONCENTRATE 2, msds JEECHEM SHAMPOO CONCENTRATE 4, msds JEECHEM SHAMPOO CONCENTRATE 4 CL, msds JEECHEM SHAMPOO CONCENTRATE 5, msds JEECHEM SHAMPOO CONCENTRATE 5 CL, msds JEECHEM SHAMPOO CONCENTRATE 7 CL, msds JEECHEM SHAMPOO ST ARR, msds JEECHEM SML, msds JEECHEM SMS, msds JEECHEM STO, msds JEECHEM STS, msds JEECOL CA 20, msds JEELAN ALCOHOL SP, msds JEELAN ALCOHOL, msds JEELAN L 60, msds JEELATE ALES 2, msds JEELATE ALS 30, msds JEELATE DLS, msds JEEMATE 1000 DPS, msds JEEMATE 1000 ML, msds JEEMATE 200 ML, msds JEEMATE 300 DPS, msds JEEMATE 300 OC, msds JEEMATE 400 DO,


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)