LabVIEW Control Design and Simulation Module

EMI_CB_CalculateDerivatives (EMI Function)

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

EMI_CB_CalculateDerivatives (EMI Function)

Owning Class: Callbacks

Requires: Control Design and Simulation Module

Prototype

void EMI_CB_CalculateDerivatives(emiRef model);

Description

Calculates the derivatives of the continuous states of an external model. You must define and export this function if the model has continuous states.

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.

Examples

void EMI_CB_CalculateDerivatives(emiRef model) {
   double* d = EMI_GetDerivatives(model);
   const double* u = EMI_GetInput(model, 0);

   /* set the derivative of the first state to the value of the first element of the first input */
   d[0] = u[0];
}

Related Topics

EMI_GetDerivatives

Log in to get a better experience