In this tutorial, we will configure and deploy the Dual PMSM VDQ Local Control example onto a Real Time PXI system with a PXIe-7868R FPGA card (required). For an in-depth overview of this and other examples, please refer to the Examples Section of the documentation.
The Dual PMSM VDQ Local Control example uses the eHS Solver to simulate a two-level inverter circuit that will drive a PMSM machine model on the FPGA. An open loop controller model executes on the Real Time CPU of the system to provide gating signals to the inverter through the FPGA-based SPWM signal generators.
Step 1: Confirm Target Configuration
- Open the NI Measurement and Automation Explorer (NI MAX).
- In the configuration tree, expand Remote Systems and locate your Real Time PXI target to confirm that it is properly connected.
- Click the target and make note of its IP Address and Operating System.
- Expand the Software section under the target and confirm that the NI VeriStand Engine is installed. The version of VeriStand installed on the target must match the version installed on the development machine.
- Expand Devices and Interfaces and locate the NI PXIe-7868R card under the PXIe chassis. Confirm that the card is named FPGA0.
Step 2: Open the Example
- The example is installed in <Public Documents>\National Instruments\<NI VeriStand 20xx>\Examples\OPAL-RT\Power Electronics Add-On\Dual PMSM VDQ Local Control\Project\Dual PMSM VDQ Local Control.nivsproj.
- Before making changes to the original example, consider creating a second copy of the project by copying and pasting the Dual PMSM VDQ Local Control folder and its contents to another directory (such as the Desktop).
- Open NI VeriStand.
- Click Open Legacy Project.
- Navigate to Dual PMSM VDQ Local Control.nivsproj and select it.
Step 3: Configure the Example
- In the tab for the Dual PMSM VDQ Local Control.nivssdf System Definition file, click Configure... to launch the System Explorer
- Navigate to the Controller section.
- Configure the Operating System and IP Address fields with the information obtained in Step 1.3.
- If your real time target is running the Phar Lap operating system, replace the control model file with its equivalent DLL version:
- Navigate to Controller >> Simulation Models >> Models and click the VoltPerHertzController item.
- Click Browse Simulation Model in the menu bar and select VoltPerHertzController.dll from the path below.
C:\Users\Public\Documents\National Instruments\<NI VeriStand 20xx>\Examples\OPAL-RT\Power Electronics Add-On\Dual PMSM VDQ Local Control\Local Controller
- Click Save and close the System Explorer.
Step 4: Deploy the System Definition
- In the main VeriStand window, select Operate >> Deploy.
- Double click the Dual PMSM VDQ Local Control.nivsscreen file to open the Workspace.
- Experiment with the Workspace controls to monitor the simulation results.
- In the main VeriStand window, select Operate >> Undeploy to stop the simulation.