Toshiba STE 58762 instruction manual - 2-26 -

Page 40

STE 58762

As shown in Fig. 2, the multitask operation is realized, changing over a plural number of individual programs by time sharing, as if the programs were executed in parallel. The order of program execution is shown in the following table.

Order

Program to be executed

 

1

A1

Program 1 start

2

B1

Program 2 start

3

C1

Program 3 start

4

A2

 

5

B2

 

6

C2

1-cycle end of program 3

7

A3

 

8

B3

1-cycle end of program 2

9

C1

Program 3 start

10

A4

1-cycle end of program 1

11

B1

Program 2 start

12

C2

 

13

A1

Program 1 start

:

:

 

Next, the start of multitask is described.

A program that can be treated as multitask is the program block containing no arguments. The program block means an area between the PROGRAM command and END command, which consists of the SCOL language statements. The subroutine without argument can be dealt with as a task. The argument cannot be kept in the task.

To deal with a program as task, use the TASK command. The TASK command executes a program specified in the argument as a task. Unless the program starts by the TASK command, the program is not performed as a task.

The program block (statements between the PROGRAM command and the END command) described at the head of the program file is an exception. Even if the TASK command is not used, the program is performed as a task.

To execute the program 2 as a task in the Fig. 2, the TASK (“PROG2”) is required to be executed in the program 1. (The program 1 is described at the head of the file, and the program starts as a task without TASK command.)

To execute the program 3 as a task, a new task (“PROG 3”) is required to be executed in the task (in the program 1 or 2 in this case) which has been already started.

If the task and program which have been started are reset or the task operation is released by the SCOL language, the task is kept active.

2-26

Image 40
Contents Industrial Robot SR Series Robot Language Manual STE- i - Preface - ii -- iii - Variables and Constants ・・・・・・・・・・・・・・・・ Table of Contents AN Outline of Robot LanguageRemarks and COMMENTS・・・・・・・・・・・・・・・・・ Explanation of Robot Commands Things not to do When Programming ・・・・・・・・・Things to Watch OUT for When Writing a PROGRAM・・ Program Examples Programming Hints and WarningsList of Commands ・・・・・・・・・・・・・・・・・ HOW to Read Symbols ・・・・・・・・・・・・・・・Appendix a Appendix B List of Reserved Words ・・・・・・・・・・・・・Robot Movement Chapter AN Outline of Robot Language- 1-1 - - 1-2 - Robot movement- 1-3 - Robot Language- 1-4 - Types of Commands - 1-5 -- 1-6 - - 1-7 - Program Configuration Chapter Writing Programs in Robot LanguageFiles ProgramPositional Data - 2-2 -Character SET - 2-3 -- 2-4 - IdentifiersS H I B a R O B O T Scalar Data Variables and Constants- 2-5 - - 2-6 - Vector Data - 2-7 -- 2-8 - - 2-9 - STE System Variables - 2-10 -System Constants - 2-11 -Mathematical Functions - 2-12 -Computational Expressions - 2-13 -- 2-14 - AND, or- 2-15 - - 2-16 - - 2-17 - - 2-18 - Logical ExpressionsIf J1 then Goto BRANCH1 Else Goto BRANCH2 - 2-19 - LabelsLOOP1 Move P1 Goto LOOP1 Move P1 This Command Moves the Robot to P1 Remarks and Comments- 2-20 - Remark this Program WAS Written by MEProgram Declaration Programs- 2-21 - STE Subprograms - 2-22 - - 2-23 - Program Subexample M1, M2, M3 Program Main Remark *** Sample Print K ENDLibrary - 2-24 -STE Multitask Processing - 2-25 -- 2-26 - - 2-27 - Global Variable Definition - 2-28 -Global END ProgramDIM D10 AS INT - 2-29 -DIM F5 AS Point