LabVIEW Control Design and Simulation Module

EMI_CB_CalculateTimestep (EMI Function)

  • Updated2023-03-14
  • 1 minute(s) read

EMI_CB_CalculateTimestep (EMI Function)

Owning Class: Callbacks

Requires: Control Design and Simulation Module

Prototype

double EMI_CB_CalculateTimestep(emiRef model);

Description

Proposes the step size for the next time step. The LabVIEW Control Design and Simulation Module calls this function at the end of each time step when you use a variable step-size ordinary differential equation (ODE) solver. The ODE solver uses the smallest proposed time step. If you program this function to return a value of zero, no time step is proposed.

Examples

Inputs

Name Description
model Specifies a reference to the external model. Use this reference as an input to other EMI functions. Do not modify model directly.

Return Value

Returns the step size, in seconds, to propose for the next time step. A return value of zero indicates that no time step is proposed.

Examples

/* propose 1.0 as the step size for the next time step */
double EMI_CB_CalculateTimestep(emiRef model) {
   return 1.0;
}

Log in to get a better experience