Timers

Timers control and display time information. They can be displayed on a CustomPanel, or can operate without being displayed. Timers can include scheduled tasks which run when the timer reaches specified values.

You can create the following types of timers:

Self — starts and stops manually, and is independent of any other timer.

Simple clock — matches the time clock of the local computer.

Time Until — counts down the amount of time remaining until a future date and time.

Other Timer — links this timer to another timer. Starting or stopping the linked timer also starts or stops this timer.

Tips about Timers:

Timers are not panel components — To view or manipulate a timer in a CustomPanel, you must create the timer, and then create a panel component such as a data-backed label or button, associated with the timer.

Timers run tasks — Each timer includes a repeat rate, which defines how often DashBoard performs the list of tasks associated with the timer. For example, if the repeat rate is 500 milliseconds, the tasks are performed twice per second.

Avoid frequent repeat rates — Each time the timer repeats, it performs all the tasks on the task list. If you set the timer to repeat too frequently, such as once per video field or video frame, DashBoard may not be able to process the task requests quickly enough, and performance may lag or unpredictable results may occur.

The repeat rate should generally be twice as frequent as the minimum display unit. For example, if the display is accurate to one second, the repeat rate should be 500 milliseconds.

Starting a timer — You will need to create a button to start a timer if it is not using the computer clock. A self timer does not display a time until the timer is reset or started. It appears as a blank item.

Child timers — The repeat rate for a child timer is controlled by its parent.

Creating a Timer

When you create a timer, you specify how time values are reported, the timer type, start and stop times, and whether you want tasks to be performed at certain intervals during timer operation. Creating a timer does not automatically add it to your CustomPanel.

To create a timer:

1.On the Edit Mode toolbar, click the Timers button.

The Add/Edit Timers dialog appears.

Tip: The Add/Edit Timers dialog box lists all the timers associated with the current CustomPanel.

2.Click Add New.

3.In the Timer ID box, type a name for the timer.

4.In the Display box, do one of the following to specify the time format you want the timer to use:

Expand the Display list and double-click the format.

Type the format and then press Enter.

Tip: To view descriptions of the time formatting symbols, click miniHelpIcon.jpg beside the Display list.

5.Click one of the following buttons to specify the type of timer you want:

Manual — Creates a timer with start and stop times, for counting up or down. You can specify positive or negative values.

Tip: To create a countdown timer, set the start time later than to the stop time.

Simple Clock — Creates a timer that counts forward, matching the DashBoard computer’s clock time.

Count Time Until — Allows you to specify a future date and time as a reference. The timer value is the amount of time before the reference time arrives.

Other Timer — Enables you to copy the properties of an existing timer.

6.If you want the timer to start one or more tasks, in the Tasks area, specify the tasks to perform.

For more information about specifying tasks, see Assigning Tasks to Buttons, Labels, and Timers.

7.Click Commit Changes to create the timer and to add it to list of timers.

8.Click Done.

Adding Timer Labels and Timer Control Buttons to a CustomPanel

After you create a timer, you can add a label to display the timer data. You can also add buttons to control the timer.

To add a label that shows timer data:

1.On the Edit Mode toolbar, click the Insert a data-backed label button.

button_dataDsplyParam00035.png

 

Tip: If the button is not visible, click the Param button to reveal the buttons used for adding data-backed components.

2.Drag a box on the panel to define the label area.

The Insert into Component dialog appears.

3.Select Create New Parameter.

4.In the Name box, type a name for the timer label.

5.Select Timer Value.

6.In the Timer Value list, double-click the timer you want to add.

7.In the Display Type area, select a style for the timer label.

8.Click OK.

To add start and stop buttons for your timer:

1.Create a table containing two buttons.

For detailed instructions, see To create a group of buttons:.

Tip: The buttons don’t have to be in a table. The table aligns them neatly.

2.Configure the first button as a Start button:

a.Select button_select00036.png from the Edit Mode toolbar.

b.Double-click the first button.

The Edit Component: <button> dialog appears.

c.On the Button Attributes tab, type Start in the Name box.

d.In the Tasks area, click Add.

e.In the Task Type area, click Timer Control.

The Timer Control Editor appears.

f.In the Timer list, double-click the timer you want to control.

g.In the Action list, click Start Timer.

h.Click OK.

i.Click Apply and Close.

3.Configure the second button as a Stop button by repeating Steps 2a to 2i for the second button, but with the following changes:

In Step 2c, type Stop in the Name field.

In Step 2g, click Stop Timer in the Action drop-down menu.

If you want the timer to reset when the Stop button is clicked, select the Reset Timer check box.

Timer Control Functions

There are several timer control functions:

Start Timer — starts the associated timer.

If you also select the Reset Timer check box, the timer resets before starting.

Stop Timer — stops the associated timer.

If you also select the Reset Timer check box, the timer resets before stopping.

Reset Timer — resets the associated timer.

Set Time — sets the timer to a specific time.

Add/Remove Time — adds or removes the specified amount of time to a timer. Positive values add time, negative values remove time.

Set Start Time — sets the start time. The timer begins counting from this time.

Set Stop Time — sets the stop time. The timer stops counting at this time.

Set Pattern — sets the display pattern of the timer. You can specify a custom pattern or choose a predefined time format.

For information about how to link timers to buttons on a CustomPanel, see To add start and stop buttons for your timer:.