Execution Order of Callbacks Functions (Control Design and Simulation Module)
- Updated2023-03-14
- 1 minute(s) read
The shared library corresponding to an external, or third-party, model must export Callbacks functions as appropriate for the structure of the model. The LabVIEW Control Design and Simulation Module executes the Callbacks functions in the following order:

* The Control Design and Simulation Module executes the EMI_CB_CalculateDiscreteStates function only on discrete time steps. Use the EMI_SetDiscretePeriod and the EMI_SetDiscreteSkew functions to determine the discrete time steps.
In the previous illustration, the functions shaded in gray are functions you might export if you want to detect zero crossings. Export the EMI_CB_CalculateZeroCrossingSignals and the EMI_CB_CalculateResetStates functions if you use the internal zero-crossing detection system of the Control Design and Simulation Module. Export the EMI_CB_CheckStepAcceptance and the EMI_CB_CalculateResetStates functions if you implement a custom algorithm for detecting zero crossings.