Chapter 7 - Script Examples; Balloon Script - Omron CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 Reference Manual

Script language
Table of Contents

Advertisement

OMRON
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.
Revision 2.0
CHAPTER 7 – Script Example
Page 133

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents