OMRON
CHAPTER 7 – Script Example
Revision 2.0
Page 133
CHAPTER 7
Script Example
This chapter provides an example application for a script. The script is a typical script exercising the
basic commands. It is described twice, once as a whole, and once on a line by line basis.
Balloon Script
The following script applies to a simple game.
The user must attempt to land the balloon on the plateau on the right, using the
Max/Min
slider
control throughout the flight. Clicking
Reset
clears the current game and initialises a new game.
Clicking the
on/off
pushbutton starts the game.
When the balloon is airborne, clouds move slowly horizontally and change colour slightly. Clicking
Help
at any time brings up a special help page; clicking
Close
from this help page returns the user to
the game. The blue gauge shows the amount of fuel consumed and left.
The project consists of three page scripts and one object. The three page scripts are initiated at varied
intervals: 10 milliseconds, 100 milliseconds and 1000 milliseconds.
The page script initiated at intervals of 10 milliseconds determines the position of each cloud, and the
speed at which each cloud moves. The page script initiated at intervals of 1000 milliseconds
determines how the balloon reacts to the conditions.
Summary of Contents for CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Page 2: ...CX Supervisor Script Language Software Revision 2 0...
Page 3: ......
Page 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Page 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Page 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Page 13: ......
Page 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Page 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Page 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Page 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...