Find Docs

Galil Motion Control - tut2 (Page 6)

Wodocs >> Electronics : Motion Control >> Galil Motion Control tut2 Page 6
Galil Motion Control - tut2
MOTION PROGRAMMING
TECHNICAL REFERENCE
DATA INPUT
& OUTPUT, MULTITASKING
Complex applications often require several independent
tasks be executed at the same time. The DMC allows simul-
taneous execution of up to eight independent application
programs. This is an ideal feature for executing independent
operations or PLC tasks in the background.
Each separate task is defined as task 0 through 7. Any
task can be executed or halted from another task. For exam-
ple: XQ#POS1,0 begins Task 0; HX0 halts Task 0. All
DMC commands, including event triggers and conditionals,
can be used in each task. However, input interrupts and
input prompts are available only in Task 0.
Many applications require data to be input from an oper-
ator or controller messages to be displayed. For easy oper-
ator interface, the DMC has commands that display mes-
sages and prompt the operator for data.
Sending a message.
Messages can be sent to the host computer using the
message command MG.
MG "The final value is", RESULT {F5.2} sends the
message "The final value is 00000.00" to the host com-
puter. The value for the variable RESULT is displayed
with a format of 5 digits to the left of the decimal and 2
to the right.
Prompt for data.
Operators are prompted to input data with the input
statement IN which contains a text message.
IN "Input speed",SPX
The above statement sends the prompt "Input speed"
to the PC screen. The entered value is assigned to the
variable SPX.
DATA INPUT
& OUTPUT
MULTITASKING
This program prompts the operator for the cut length. A
position move is then commanded. The encoder resolution
is 4000 counts/inch.
INSTRUCTION
INTERPRETATION
#BEGIN
Label
AC 800000
Specify acceleration
DC 800000
Specify deceleration
SP 5000
Specify speed
LENGTH = 3.4
Initial length in inches
#CUT
Cut routine
IN "Enter length", LENGTH Prompt to enter length
PR LENGTH*4000
Specify position in counts
BG X
Begin motion
AM X
After motion complete
SB1
Set bit 1, turn on cutter
WT 100;CB1
Wait 100 msec, turn off cutter
JP #CUT
Repeat cut process
EN
End program
Example--Data Input & Output
The example below shows how four independent programs
can be executed simultaneously from the DMC memory.
The main task #MAIN starts all the other tasks, #PLC1,
#PLC2, #MOVE, after Input 1 goes high. It halts all tasks
when Input 1 goes low. #PLC1 sets Output 2 only when
Input 2 and Input 3 are high. #PLC2 generates a waveform
on Output 1 which is high for 10 msec and low for 40 msec.
#MOVE repetitively moves the X axis 100 counts.
INSTRUCTION
INTERPRETATION
#MAIN
Main Program --Task 0
AI1
After Input 1 high
XQ#PLC1,1
Execute Task 1
XQ#PLC2,2
Execute Task 2
XQ#MOVE,3
Execute Task 3
AI-1
After Input 1 low
HX
Halt all tasks
EN
End program
#PLC1
#PCL1 -- Task 1
OB2,@IN[2]&@IN[3] Set Output 2 if Input 2 and 3 high
JP#PLC1
Loop
EN
End Task 1
#PLC2
#PLC2 -- Task 2
AT0
Set reference time
#LOOP
Loop label
SB1;AT10
Set Output 1; wait 10 msec
CB1;AT-50
Clear Output 1; at 50 msec; reset timer
JP#LOOP
Loop
EN
End Task 2
#MOVE
#MOVE -- Task 3
PR100;BGX;AMX
Move 100 counts
WT20;JP#MOVE
Wait 20 msec and repeat
EN
End Task 3
Example--Multitasking, Background PLC
www.galilmc.com
·
Galil Motion Control, Inc.
·
85

<< 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)