EasyManuals Logo

Omron CX-PROGRAMMER V8.1 User Manual

Omron CX-PROGRAMMER V8.1
231 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 #180 background imageLoading...
Page #180 background image
155
Statement Descriptions Section 5-5
Processing Flow Chart
Usage
Use the FOR statement when the number of iterations has been determined
beforehand. FOR is particularly useful when switching the number of ele-
ments in an array variable according to the value of a specified iteration vari-
able.
Description
When the iteration_variable is the initial_value, the expression is executed.
After execution, the value obtained from the increment_equation is added to
the iteration_variable, and if the iteration_variable < final_value_equation (see
note 1), the expression is executed. After execution, the value obtained from
the increment_equation is added to the iteration_variable, and if the
iteration_variable < final_value_equation value (see note 1), the expression is
executed. This process is repeated.
If the iteration_variable
final_value_equation (see note 2), the processing
ends.
Note (1) If the value from the increment_equation is negative, the condition is
iteration_variable > final_value_equation value.
(2) If the value from the increment_equation is negative, the condition is
iteration_variable
final_value_equation.
Precautions
A negative value can be specified in the increment_equation
FOR must be used in combination with END_FOR.
•The initial_value, final_value_equation, and final_value_equation must be
an integer data type (INT, DINT, LINT, UINT, UDINT, or ULINT).
After processing is executed with the final value, the iteration value is
incremented to the final value + 1 and iteration processing ends.
Example: In the following structured text, the value of “a” becomes TRUE.
Iteration variable = Initial
Tr ue
False
Expression
End
Iteration
Iteration variable + Increment value
Iteration
variable
Final value?

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-PROGRAMMER V8.1 and is the answer not in the manual?

Omron CX-PROGRAMMER V8.1 Specifications

General IconGeneral
BrandOmron
ModelCX-PROGRAMMER V8.1
CategorySoftware
LanguageEnglish

Related product manuals