3 sequence program, 1 ) how to run a sequence program – Yaskawa MP2300S Basic Module User Manual

Page 160

Advertising
background image

5.2 User Programs

5.2.3 Sequence Program

5-27

Outline of Motion Control Systems

5.2.3 Sequence Program

A sequence program is a program described with motion language of text format.
The following table shows two types of sequence programs.

„

The program numbers of sequence programs are managed in the same manner as the motion program num-
bers. Assign a different number for each program number.

• Motion program MPM

†††

: Program number of MPS

†††

• Sequence program SPM

†††

: Program number of SPS

†††

( 1 ) How to Run a Sequence Program

A sequence program is executed by registering it in the M-EXECUTOR program execution definition.
Sequence programs are executed in ascending numeric order.
The following figure shows an execution example.

When the execution type is set to “Sequence Program (H scan)” or “Sequence Program (L scan)”, the program is
executed at the time the definition is saved. When the execution type is set to Sequence Program (Start), the program
is executed when the power supply is turned ON again next time.

Category

Designation

Method

Features

Number of Programs

Main program

SPM†††
(†††=1 to 256)

Calling from the M-EXECUTOR
program execution definition

Up to 256 programs of the following types can
be created:

• Main motion program
• Sub motion program
• Main sequence program
• Sub sequence program

Sub program

SPS†††
(†††=1 to 256)

Calling from the main program

END

END

RET

END

SPM003

SPS101

SPM001

Sequence program

M-EXECUTOR program execution definition

SPM002

SSEE

SPS101

Subroutine

IF MW000<32767;
MW000=MW000+1;
ELSE;
MW000;
IEND;

Advertising