
4.1 User Program Types and Execution Timing
4.1.3 Sequence Programs
4-24
4.1.3
Sequence Programs
A sequence program is written in a text-based motion language.
There are two types of sequence programs.
Sequence Program Execution
A sequence program is executed by registering it in the M-EXECUTOR execution definitions.
The sequence programs are executed in ascending order.
The following figure shows an execution example.
If the execution type is set to an H-scan sequence program or L-scan sequence program, then
the program will be executed as soon as the definition is saved. If the execution type is set to a
startup sequence program, then the program will be executed the next time when the power
supply is turned ON.
Type
Designation
Method
Features
Number of Programs
Main programs
SPM
(
=1 to 512)
Main programs are called from
the M-EXECUTOR program
execution definitions.
You can create up to 512 motion
programs, including the following
programs:
•
Motion main programs
•
Motion subprograms
•
Sequence main programs
•
Sequence subprograms
Subprograms
SPS
(
=1 to 512)
Subprograms are called from
a main program.
The same numbers are used to manage the sequence programs and motion programs.
Use a unique number for each program.
•
Motion program numbers are given in the form MPM
or MPS
.
•
Sequence program numbers are given in the form SPM
or SPS
.
Important
END
END
RET
END
SPM003
SPS101
SPM001
SPM002
SSEE
SPS101
IF MW000<32767;
MW000=MW000+1;
ELSE;
MW000;
IEND;
M-EXECUTOR Program Execution Definitions
Sequence Programs
Subprogram