主要内容

Time Action Node

R2026b

Output control token based on time condition

Since R2026b

  • time action node icon

Description

A time action node outputs a control token after a specified duration or at a specific simulation time. When the simulation clock reaches the specified time, the node outputs a control token. Use time action nodes to control when activity nodes start or complete.

You can configure the time action node to use one of two Event Type options:

  • Absolute — The node triggers when the simulation clock reaches a specified time. The canvas displays at T.

    If the node has an input control flow, the input token acts as an additional trigger condition. The node requires both the specified simulation time to be reached and the input token to arrive before it triggers.

  • Relative — The node triggers when a specified duration elapses after the input control token arrives. The canvas displays after T.

Create a Time Action Node

You can create a time action node by dragging the Time Action Node icon from the palette on the left or from the Modeling tab on the toolstrip to any location on the canvas.

Examples

expand all

Use time action nodes in an activity diagram to model timed delays in a sensor system startup sequence. This example demonstrates both absolute and relative time action nodes.

Open Model

Open the activity diagram model.

open_system("SensorStartupSequence");

Sensor startup sequence activity diagram with time action node.

The activity diagram models a sensor startup sequence using these phases:

  • System Boot — An absolute time action node triggers the Power On action at simulation time t=2. The absolute time action node activates when the simulation clock reaches the specified time.

  • Warm-Up Phase — After the Power On action completes, a relative time action node introduces a three second warm-up delay before triggering the Warm Up Sensors action.

  • Calibration Phase — After the Warm Up Sensors action completes, another relative time action node introduces a five second calibration delay before triggering the Calibrate action.

Simulate the Model

Simulate the model to observe the timed startup sequence.

sim("SensorStartupSequence");

To help view the flow of tokens, you can slow down the animation speed by changing the Animation speed setting on the Debug tab.

Parameters

expand all

Time Action

Name of the time action node. By default, the activity diagram editor names the first time action node placed on the canvas TimeAction. As you add more time action nodes, the editor attaches increasing numeric suffixes to the name TimeAction.

Example: TimeAction1

Data Types: char | string

Time mode of the time action node, specified as Absolute or Relative.

  • Absolute — The node activates when the simulation clock reaches the specified time value.

  • Relative — The node activates when the specified duration elapses after the input control token arrives. This option requires an input control flow.

Data Types: char | string

Time value for the time delay, specified as a positive double in simulation time units. The time expression appears below the node on the canvas.

Example: 5.0

Data Types: double

This list contains stereotypes from imported profiles. To assign a stereotype to a node, select the stereotype in the list.

You can also use <new/edit> option to manage profiles using Profile Editor.

Version History

Introduced in R2026b