3.1 Basic Functionality3.1.1 Programs3-153 CPU Module Functionality Sequence ProgramsA sequence program is written in a text-based motion language.There are two types of sequence programs. Sequence Program ExecutionA 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, thenthe program will be executed as soon as the definition is saved. If the execution type is set to astartup sequence program, then the program will be executed the next time when the powersupply is turned ON.Type DesignationMethod Features Number of ProgramsMain programsSPM(=1 to512)Main programs are called fromthe M-EXECUTOR programexecution definitions.You can create up to 512 motion pro-grams, including the following programs:• Motion main programs• Motion subprograms• Sequence main programs• Sequence subprogramsSubprogramsSPS(=1 to512)Subprograms are called froma 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.ImportantENDENDRETENDSPM003SPS101SPM001SPM002SSEESPS101IF MW000<32767;MW000=MW000+1;ELSE;MW000;IEND;M-EXECUTOR Program Execution DefinitionsSequence programsSubprogram