ADL®

Stopwatch Block

When a discrete event message enters its discrete input port, the Stopwatch Block evaluates its StopTime formula (using the Formula Builder) to determine the stop time in milliseconds. After the specified stop time, the block sends a discrete event message through its output port. The Stopwatch Block must be reset with a new incoming discrete event message to repeat its operation.

The Stopwatch Block allows you to set a custom timer interval instead of a fixed interval of 250 ms, and lets you decide when to repeat the timer, which prevents unnecessary timer events.

Setting the timer value

To set or to change the default value of the Stopwatch Block:

  1. Double-click the block on the canvas to open the Block Settings.
  2. Click the current StopTime value to open the Formula Builder.
  3. In the Formula Builder, either change the value of the existing # block or create a new formula.

Block settings

To change default block settings, double-click the block to open the Block Editor.

Setting Description
Name Name to display beneath the block on the ADL canvas
BodyColor Background color of the block
StopTime

Number of milliseconds to wait

You can also use the Formula Builder to calculate the timer value.

Description Optional text to explain how the block is used