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 #123 background imageLoading...
Page #123 background image
Balloon Script SECTION 7 Script Example
122
ENDIF
ENDIF
IF burner AND fuel > 0.0 AND rate > 0.0 THEN
lift = lift + rate/5.0
ELSE
IF alt > 140.0 THEN
lift = lift - 0.2
ENDIF
ENDIF
IF lift < -10.0 THEN
lift = -10.0
ENDIF
alt = alt + lift
IF alt <= 140.0 THEN
IF distance>630.0 AND distance<660.0 AND lift>=-
3.0 THEN
winner = TRUE
burner = FALSE
ENDIF
IF lift < -3.0 then
crash = TRUE
burner = FALSE
ENDIF
lift = 0.0
ENDIF
speed = (alt-140.0 )/100.0
IF speed < 0.0 then
speed = 0.0
ENDIF
distance = distance + speed
The following paragraphs describe the above script on a line by line basis.
IF burner AND alt > 400.0 THEN
burner = FALSE
ENDIF
If the fuel burner is on, based on Boolean point 'burner' set to 'TRUE', and the
altitude of the balloon, based on point 'alt', exceeds 400, then the fuel burner is
turned off. Point 'alt' is measured in pixels between 140 and 1000, so the
value of 400 is the height in pixels.
IF burner THEN
fuel = fuel - rate
IF fuel < 0.0 THEN
fuel = 0.0
burner = FALSE
ENDIF
ENDIF
If the fuel burner is on, the amount of fuel remaining decreases by the rate of
ascent. The rate of ascent, point 'rate' can be modified by moving the slider. If
point 'fuel' currently has a value of less than 0, then there is no fuel left and the
fuel burner is turned off.
IF burner AND fuel > 0.0 AND rate > 0.0 THEN
lift = lift + rate/5.0
ELSE

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