Executing Programs - Multitasking - Galil Motion Control DMC-14 5 Series Manual

Table of Contents

Advertisement

REM HALF CIRCLE MOTION
VP 0,3000
REM TOP LINE
CR 1500,90,-180
REM HALF CIRCLE MOTION
VE
REM END VECTOR SEQUENCE
BGS
REM BEGIN SEQUENCE MOTION
EN
REM END OF PROGRAM
The REM statements will be removed when the program is downloaded to the controller.

Executing Programs - Multitasking

The DMC-14XX can run up to two independent programs simultaneously. These programs are called
threads and are numbered 0 and 1, where 0 is the main thread. Multitasking is useful for executing
independent operations such as PLC functions that occur independently of motion.
The main thread differs from the others in the following ways:
1. Only the main thread, thread 0, may use the input command, IN.
2. When input interrupts are implemented for limit switches, position errors or command errors, the
subroutines are executed as thread 0.
To begin execution of the various programs, use the following instruction:
XQ #A, n
Where n indicates the thread number. To halt the execution of any thread, use the instruction
HX n
where n is the thread number.
Note that both the XQ and HX commands can be performed by an executing program.
The example below produces a waveform on Output 1 independent of a move.
Instruction
#TASK1
AT0
CB1
#LOOP1
AT 10
SB1
AT -40
CB1
JP #LOOP1
#TASK2
XQ #TASK1,1
#LOOP2
PR 1000
DMC-14x5/6
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Interpretation
Task1 label
Initialize reference time
Clear Output 1
Loop1 label
Wait 10 msec from reference time
Set Output 1
Wait 40 msec from reference time, then initialize reference
Clear Output 1
Repeat Loop1
Task2 label
Execute Task1
Loop2 label
Define relative distance
Chapter 7 Application Programming
95
i

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-14 6 seriesDmc-1415Dmc-1416Dmc-1425

Table of Contents