Chapter 10 391
Using Operator Interfaces
Common Tasks In Creating Operator Interfaces
Lab 10-3: Creating a High Impact Warning
This exercise includes several UserFunctions that are nested. The first
UserFunction is the alarm itself, which displays a red square and beeps.
The second
UserFunction calls the alarm repeatedly creating a blinking
light effect and a pulsing sound, until the operator turns the alarm off.
Begin by programming the alarm function.
1. Select
Device ⇒ UserFunction. Change the name to alarm.
2. Select
Display ⇒ Beep and place it in the upper-left of the
UserFunction. Adjust the settings so there is a loud beep that lasts a
second. Change the
Duration (sec) field to 1. Change the Volume
(0-100)
field to 100.
Note These instructions assume your computer has the hardware to support a
beep. Some Windows 95, Windows 98, Windows 2000, and Windows NT
4.0 systems have modified the
Default System configuration for the
Default System Beep.
Note You do not need to connect the Beep object to anything. It activates when
the function executes.
3. Click
Display ⇒ Indicator ⇒ Color Alarm and place it in the
UserFunction. Open the Color Alarm object menu, click
Properties, and set as follows: under Open View, deselect Show
Title Bar
. Under Layout, click Rectangular. Under
Limits/High Test, delete any text beside High Text. Click OK.
4. Click
Data ⇒ Constant ⇒ Real64, change it to 1, and connect it to
the
Color Alarm input pin. (This will always set the Alarm to its high
range with the default color of red.)
To keep the display on screen for one second to synchronize with the
Beep object, use a
Delay object set to 1 second.