14.01.2015 Views

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction to Multi-Tasking<br />

What is Multi-Tasking Multi-tasking is the ability of the Gem6K to run more than one<br />

program at the same time. This allows users to manage independent activities, aside from just<br />

motion.<br />

Why use Multi-Tasking<br />

• Multiple independent tasks can act on the same process or same axis.<br />

• A supervisory program can control <strong>and</strong> coordinate multiple processes.<br />

What is a Task A system task is a program execution environment, not a program. Each<br />

task runs independently. Each task can be used to run independent programs. Any task may<br />

run any program. Multiple tasks could even be running the same program simultaneously.<br />

Each task may either be:<br />

• Running a program<br />

• Monitoring ON, ERROR, or INSELP conditions<br />

• Inactive (not running a program or monitoring conditions)<br />

Using Multi-Tasking to Run Programs<br />

Use the Wizard<br />

Motion Planner provides<br />

a Multi-Tasking wizard,<br />

accessed from the<br />

Editor. The wizard leads<br />

you, step by step,<br />

through the process of<br />

setting up for multitasking.<br />

Multi-tasking is initiated by the Task Supervisor. The supervisor is the Gem6K’s main<br />

program execution environment — it runs the STARTP program <strong>and</strong> contains the comm<strong>and</strong><br />

buffer <strong>and</strong> parser. If the multi-tasking feature is not being used, the supervisor is the lone<br />

program execution environment of the Gem6K, as shown in Figure 1. When multi-tasking is in<br />

operation, the supervisor is referred to as “Task 0”.<br />

Resources<br />

I/O<br />

Inputs<br />

Outputs<br />

Limits<br />

Triggers<br />

Serial Ports<br />

PORT1 (RS-232)<br />

PORT2 (RS-232/485)<br />

Ethernet<br />

Axis<br />

GEM6K<br />

Supervisor<br />

Run Start-up Program<br />

Execute Programs<br />

Monitor Conditions<br />

Comm<strong>and</strong> Buffer & Parser<br />

Program Memory<br />

move1<br />

math<br />

inout<br />

fill<br />

move2<br />

seal<br />

gohome<br />

move3<br />

main<br />

Variables<br />

VAR<br />

VARB<br />

VARI<br />

VARS<br />

Figure 1: Gem6K Supervisor, with no Multi-Tasking<br />

The Gem6K can have a maximum of 10 tasks, in addition to the Task Supervisor (Task 0).<br />

Each task acts as an individual program execution environment. The boxes shown under<br />

Resources in Fig. 1, <strong>and</strong> the following Figures, represent the resources that the supervisor <strong>and</strong><br />

tasks monitor <strong>and</strong> manipulate (see list below). These resources can be shared with other tasks.<br />

• I/O..................................Inputs <strong>and</strong> Outputs (onboard I/O <strong>and</strong> expansion I/O bricks)<br />

• Communication ports ....“RS-232”, “RS-232/485”, <strong>and</strong> “ETHERNET”<br />

202 Gem6K Series Programmer’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!