﻿ 20-sim webhelp > Language Reference > Introduction > State and Time Events

# State and Time Events

Navigation:  Language Reference > Introduction >

# State and Time Events

Normally an integration algorithm uses a fixed time step or a variable step, depending only on the model dynamics. In some cases, the algorithm is forced to perform calculations at a specific time.

## Time Events

The most simple form of forced calculation is calculation at a specific time. This is called a time event. The following functions cause time events.

 function description timeevent Forces the integration algorithm perform a calculation at a specific time. frequencyevent Forces the integration algorithm perform a calculation at a specific frequency. These functions introduce a discrete system in a model. A discrete system forces the integration algorithm to perform calculations every sampletime.

## State Events

Sometimes the integration algorithm must iterate to find the next calculation step. This is called a state event. The following functions cause state events.

 function description event Forces the integration algorithm to find the exact point where the input crosses zero. eventup Forces the integration algorithm to find the exact point where the input crosses zero from a negative to a positive value. eventdown Forces the integration algorithm to find the exact point where the input crosses zero from a positive to a negative value. limint Forces the integration algorithm to find the exact point where the output become larger or smaller than the minimum and maximum parameters. resint Forces the integration algorithm to find the exact point where the input becomes zero.

To find the exact point where simulation should be performed iteration is used. The accuracy of the iteration can be set by the event delta parameter in the Run Properties window.