EasyManuals Logo
Home>Omron>Computer Hardware>SYSMAC CP Series

Omron SYSMAC CP Series Instruction & Reference Manual

Omron SYSMAC CP Series
467 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #92 background imageLoading...
Page #92 background image
2 Instructions
2-56
CP1E CPU Unit Instructions Reference Manual(W483)
FOR/NEXT
Applicable Program Areas
Operands
N: Number of loops
The number of loops must be 0000 to FFFF (0 to 65,535 decimal).
Operand Specifications
Flags
Function
Instruction Mnemonic Variations
Function
code
Function
---
FOR --- 512
The instructions between FOR(512) and
NEXT(513) are repeated a specified number of
times.
NEXT --- 513
Symbol
FOR NEXT
Area Step program areas Subroutines Interrupt tasks
Usage --- OK OK
Operand Description Data type Size
N Number of loops UINT 1
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
N OKOKOKOKOKOKOK OK OK OK --- --- ---
Name Label Operation
Error Flag P_ER ON if more than 15 loops are nested.
OFF in all other cases.
Equals Flag P_EQ OFF
Negative Flag P_N OFF
The instructions between FOR(512) and NEXT(513)
are executed N times and then program execution con-
tinues with the instruction after NEXT(513). The
BREAK(514) instruction can be used to cancel the
loop.
If N is set to 0, the instructions between FOR(512) and
NEXT(513) are processed as NOP(000) instructions.
Loops can be used to process tables of data with a
minimum amount of programming.
FOR(512)
N
N: Number of loops
NEXT(513)
Repeated N times
Repeated program section
NEXT
FOR
N

Table of Contents

Other manuals for Omron SYSMAC CP Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC CP Series and is the answer not in the manual?

Omron SYSMAC CP Series Specifications

General IconGeneral
BrandOmron
ModelSYSMAC CP Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals