The DELAY function computes the value of an expression specified by val at a delayed time.


DELAY(val, dt, ic)


The delay time is specified using dt. When DELAY is evaluated as an expression in the model, the evaluated value val is pushed into a buffer along with the current time stamp. The output from the DELAY function is found by searching the buffer for the key (current time-dt) and interpolating between the closest points if an exact match in time cannot be found.


The expression whose delayed value is to be computed. This can be any valid MotionSolve expression including state dependent expressions.
The delay time that is applied to the evaluation of the expression specified in val. This can be specified as a constant value or as a MotionSolve expression. If the delay time is negative, it is reset to 0. In other words, a negative delay value is not allowed.
The value of the expression specified by val when (current time - dt) < simulation start time. The value of ic is specified as a constant or as an expression, which is purely a function of time.


     comment             = "Sample delay expression"
     id                  = "1"
     type                = "EXPRESSION"
     expr                = "DELAY(DZ(30102030),1,0)"