|Download Help (Windows Only)|
Running a simulation or controller in real time means that the simulation time must equal the wall-clock time at each point that the simulation or controller interacts with the real world. Generally, these physical interaction points correspond to the sampling points of the input and output hardware. Therefore, at each sampling time, the simulation time must equal the wall-clock time.
To meet the real-time deadline, you can configure the LabVIEW Control Design and Simulation Module to execute deterministically by placing a strict upper bound on the execution time of the Control & Simulation Loop. NI also recommends you configure the Control & Simulation Loop to use a fixed step-size ordinary differential equation (ODE) solver. These ODE solvers are deterministic, which ensures that block diagram code running at each time step meets the deadlines imposed by the timing of the hardware inputs and outputs.
The Control Design and Simulation Module includes the following deterministic ODE solvers:
Variable step-size ODE solvers are not appropriate for real-time applications because these solvers adjust the step size based on the estimated error of the solution. This adjustment requires additional computational resources, which can interfere with the timing requirements of a real-time application.