EasyManuals Logo

Omron CX-Supervisor Reference Manual

Omron CX-Supervisor
164 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 #25 background imageLoading...
Page #25 background image
Control Statements SECTION 4 CX-Supervisor Script Language
24
The point 'fuel' is assigned the value 0 on the condition that currently, 'fuel' is
less than 0. If 'fuel' is not less than 0, then it is not assigned the new value.
References
Refer to chapter 4, Control Statements for details of the use of the IF THEN
ELSE/ELSEIF ENDIF statements.
4-3 Control Statements
4-3-1 Simple Conditional Statements
Syntax
IF condition THEN
statementblock1
ENDIF
or
IF condition THEN
statementblock1
ELSE
statementblock2
ENDIF
Remarks
Typical Examples
IF fuel < 0 THEN
fuel = 0
ENDIF
Provided Integer point 'fuel' is less than 0, then it is assigned the value 0.
IF burner THEN
fuel = fuel - rate
ENDIF
Provided Boolean point 'burner' is ''TRUE'', then Integer point 'fuel' is assigned
a new value. It is also possible to apply 'IF burner == TRUE THEN' as the first
line, with identical results.
IF distance > 630 AND distance < 660 AND lift >= -3
THEN
winner = TRUE
burner = FALSE
ENDIF
Provided that Integer point 'distance' is greater in value than 630 AND
'distance' is less in value than 660 (i.e. 'distance' is a value between 630 and
660) AND point 'lift' is greater than or equal to -3, then Boolean points 'winner'
and 'burner' are assigned new values.
Argument Description
Condition The condition is made up of points and constants, using
relational, logical or arithmetical notation as a test. The
condition can evaluate Boolean state 'TRUE' and
'FALSE', Integer or Real numbers, or a text string.
Statementblock1 One or more statements which are performed if the
condition is met.
Statementblock2 One or more statements which are performed if the
condition is not met.

Table of Contents

Other manuals for Omron CX-Supervisor

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-Supervisor and is the answer not in the manual?

Omron CX-Supervisor Specifications

General IconGeneral
BrandOmron
ModelCX-Supervisor
CategorySoftware
LanguageEnglish

Related product manuals