Archived:How Do I Use the 951x Series Motion Modules in a Hybrid Configuration on my CompactRIO?

Updated Oct 13, 2021

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Hardware

  • cRIO-9074

Software

  • LabVIEW

Driver

  • NI-RIO

Issue Details

I am using a CompactRIO (cRIO) and want to use my 951x motor drive interface modules in Scan Engine mode along with my user programmed FPGA code. What steps are necessary to run the 951x modules on a chassis in hybrid mode?
 

Solution

When using a user programmed FPGA VI and the scan engine at the same time, the cRIO can be run in a setup commonly referred to as hybrid mode. While in hybrid mode, the scan engine will use two of the available DMA FIFOs and the scan engine modules will take up a portion of the FPGA space resulting in a longer compile time. 

Complete the following steps to run the 951x in a Hybrid configuration with your cRIO:
  1. Create a new project, then add the target cRIO to it.
  2. Set the cRIO to Automatically Discover Modules and select the Scan Interface from the properties menu.
  3. Add the FPGA target by right-clicking the chassis and selecting New >> FPGA Target.
  4. When prompted to deploy select Deploy Now.
  5. Drag and drop the FPGA modules to the FPGA target. The 951x Modules are not to be moved under the FPGA target.

Figure 1. Drag and drop the FPGA modules to the FPGA target
 
After completing these steps, you will be able to run your cRIO in hybrid mode, using the 951x modules under the scan engine and additional C Series modules under the FPGA target with user defined FPGA code. Upon adding an FPGA target and setting your cRIO to hybrid mode, you will need to compile and run the FPGA bitfile before interacting with your SoftMotion axes. Complete the following additional steps to communicate with the 951x modules. If you are already using a custom FPGA VI, skip step 1.
  1. Add a VI under the FPGA target. Save the VI and compile a bitfile.
  2. After compilation is finished, run the FPGA code. You will need to always run the FPGA bitfile before communicating with your 951x modules.
  3. Next add the SoftMotion Axis by selecting New >> NI SoftMotion Axis. The axis should automatically bind to the 951x module.
  4. Right-click on the SoftMotion Axis and select Deploy. Note that the bitfile must be running during this operation, and remain running until the Scan Engine stops (i.e., when it is put into configuration mode). Otherwise SoftMotion will be unable to communicate to the module.
  5. If the Scan Engine was not transitioned to Active Mode when deploying the axis, right-click on the controller and select Utilities >> Scan Engine Mode >> Switch to Active.
  6. With the cRIO scan engine active, you can use the Interactive Test Panel or SoftMotion VIs to interact with any 951x modules that are bound to a SoftMotion Axis.
The FPGA code must be running before the 9514 module is deployed to the target to avoid errors during deployment. This is because the module cannot be detected by LabVIEW Real Time without a programmed FPGA VI. If a real time VI will not deploy correctly, run the FPGA VI using the Run arrow. 

If you experience errors while deploying the bitfile or to interact with the 951x module using a deployed VI rather than the Interactive Test Panel from the project, you will need to use an initialization sequence to ensure the FPGA code is running and the scan engine is in active mode. The initialization sequence must be the first RT code to execute on the target in order to initialize the motion hardware properly. See this link for example initialization sequences.