We can read or write to the USRP RIO I/Os in a similar way as we do for any other NI RIO target. Please note that the custom use of these USRP RIO AUX IOs is only possible when using LabVIEW FPGA-based Instrument Design Libraries for the USRP RIO devices. The USRP host driver APIs do not provide access to these IOs.
Following are the basic steps to expose these I/Os in your LabVIEW project:
- Create NI-USRP Simple Streaming project that enables FPGA-based programming of USRP RIO devices.
- In your LabVIEW NI-USRP Simple Streaming Project, you can find the GPIO lines under the FPGA target in Resources>>AUX I/O folder as shown below.
If the AUX I/O folder is not automatically visible under the LabVIEW project, right-click the
FPGA target>>New>>FPGA IOs and select
AUX I/O from the available resources to include them in the project.
To use these GPIO resources, follow these steps:
- Pick the AUX I/O resource (from the LabVIEW project) you want to use and place (drag and drop) it on the block diagram.
- To read from the AUX I/O, the FPGA I/O node parameter's direction have to be set as shown below.
- When you want to write the digital value, the direction should be set as shown below.
- You can change the access mode of the USRP-RIO I/Os by right-clicking the FPGA I/O node and choosing the option Change to Write or Change to Read as shown below.
- To apply these changes to USRP-RIO, you must recompile the FPGA file. After completing the FPGA compilation, you can control these parameters on your host code.
Additional Information:
- The USRP RIO AUX I/Os are directly connected to the Kintex 7 FPGA and have the same current source/sink limitations.
- The AUX I/O 0 is also used by the USRP driver inside triggering APIs and should be avoided.
- For transmitting or receiving the digital IQ data using Aux IOs, you will need to develop a parallel or serial protocol on your own. On the other hand, you can also use the MXIe link if IQ data has to be transferred to the host PC or 1/10GbE or Aroura (SFP) Links for data communication to an external host. Please consult the documents indexed in the related links