LabVIEW Control Design and Simulation Module

EMI_GetProjectedContinuousStates (EMI Function)

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

EMI_GetProjectedContinuousStates (EMI Function)

Owning Class: Continuous States

Requires: Control Design and Simulation Module

Prototype

double* EMI_GetProjectedContinuousStates(emiRef model);

Description

Returns a pointer to the projected continuous states of an external model. You can call this function only within the EMI_CB_CalculateProjectedStates function.

When you use an ordinary differential equation (ODE) solver to solve a differential algebraic equation, you might need to project the continuous states of the model onto the integral constraint surface at each accepted major step. Use the EMI_GetProjectedContinuousStates function within the EMI_CB_CalculateProjectedStates function to modify the continuous states directly. The LabVIEW Control Design and Simulation Module calls the EMI_CB_CalculateProjectedStates function after completing any minor steps and before the next accepted major step.

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 a pointer to the projected continuous states of the model.

Examples

void EMI_CB_CalculateProjectedStates(emiRef model) {
   double* xc = EMI_GetProjectedContinuousStates(model);

   if (xc[0] > 5.0) {
   xc[0] = 5.0
   }
}

Related Topics

EMI_CB_CalculateProjectedStates

Log in to get a better experience