このコンテンツは設定された言語で表示できません。

このコンテンツは表示可能な別の言語で表示されています。 お使いのブラウザに翻訳機能がある場合はご利用ください。

Can I Execute My Model At 1MHz Rate In VeriStand?

Updated Feb 11, 2022

Reported In

Software

  • VeriStand

Issue Details

We are exploring a possibility of running a PXI HIL system with our Math Models on 1 MHz Rate. The Math Models are compiled from Matlab/Simulink and describe fully a behavior of a whole simulated system. Unfortunately, current maximum rate estimation is not higher than 100-150Hz when executing the models on PXIe-8880 controller. Estimation was performed using the Configuration Benchmarking Tool for NI VeriStand.

Solution

It is not possible to run the Primary Control Loop (PCL) of the VeriStand Engine at 1 MHz, and model loops are run at the same rate as the PLC or at a slower decimated rate. This limitation is due to various operation that must be completed each iteration of the PCL and the inherent overhead present for the VeriStand engine to iterate the loops and keep track of timing. Trying to set a PCL too fast will result in the VeriStand Engine's loops finishing late and will impact the determinism of the system. There is a possibility of achieving rates of 1MHz or higher for simulation models in HIL systems by utilizing FPGA devices. The FPGA code for the model could be developed in LabVIEW FPGA, or it is possible to export Simulink models into HDL code that can then be used in a LabVIEW FPGA VI. Refer to the Related Links section for more information.

There are various methods of utilizing custom-developed FPGA code and making inputs and outputs available for configuration and execution in the VeriStand Engine. For example, the FPGA Add-On custom device gives users a simple method for executing custom FPGA code in VeriStand using FPGA devices. It supports both single-point and waveform data channels. Note that a developing custom device for VeriStand is an advanced topic and requires a deep knowledge of Real-Time, FPGA systems and VeriStand Engine.

NI Engine Simulation Toolkit for NI VeriStand is the example of implementing simulation model on FPGA.

Additional Information

If you are going to run your model in real-time, where one second of real life time corresponds to one second of simulation time, then VeriStand should finish all models calculation before next time period will be started, since VeriStand executes one time step of a model each iteration of its Primary Control Loop.

It's generally not feasible to run VeriStand much faster than 10-15 kHz even using the current high performance PXIe Controllers generation. The maximum rate depends on complexity of the model, hence the more complex model, the more performance is required from a PXI controller.