LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI link to USRP stopped working; causes freezing

Solved!
Go to solution

Hi all,


I am part of a research team working with radar waveform simulation using the USRP-2944 / X310 software defined radio. We connect the SDR to a host PC via PCIe, and we use LabView 2018 (x64) to write to the FPGA and read the data. Until recently, this has worked well with no issues; we built the code around the Simple Tx/Rx Streaming example project, so it was straightforward to get everything running.


However, at a time during which we made NO changes to the VIs or the LabView project, the connection stopped working for no discernible reason. Specifically, the LabView program hangs when trying to run the simulation. It does not fully "freeze" in the sense that Windows marks it as "Not Responding", but the pause and abort buttons cannot be interacted with, and LabView must be closed via task manager. I did some investigating using breakpoints and probes, and identified the culprit as a VI very early in the execution order that attempts to establish connection and load the bitfile onto the device (specifically getDeviceInfoFromScs.vi). This VI is not customized in any way, and is one of the VIs included in the original Simple Tx/Rx Streaming example.


Fast forward a week, and after digging through this roadblock with what feels knowledge-wise like a plastic spork, I guess my main goal in writing this post is to get some advice on where else to even look. I am relatively new to LabView and could use the guidance, as I am more of a software person still learning the ropes of hardware integration. Thank you for reading!

 

Troubleshooting attempts thus far:

  • Ran the earliest possible version of the code - i.e. the original streaming example. The same issue occurs, with the execution hanging at around the same point in the diagram.
  • Tried to run a few of the more basic VIs included in the "niusrpio_tools" library to confirm that, yes, any VI that tries to establish a link to the device has the same freezing issue.
  • Ensured that the drivers for the USRP and RIO were up to date in the device manager - they were. I also updated the firmware and FPGA image using the USRP_utils.exe program. I could not update the firmware, but I wrote a new FPGA image from the same bitfile in case it got corrupted at some point. No change in behavior, unfortunately
  • At this point, I wanted to test if it was a basic communication issue, so I used both the uhd_find_devices and uhd_usrp_probe utilities to see if they could find the device via PCIe, and both of them work! I also briefly ran one of the calibration programs included in the same utilities folder, and confirmed that not only does it work, but the Link LED turns on (unlike before).
    • This indicates that the issue could be with LabView's connection protocol rather than the physical PCIe connection.
  • We have another setup with a second USRP-2944R connected to an identical PC (albeit with older revisions of the LabView projects), and both devices work on this second PC's Tx/Rx Streaming example. Similarly, neither device works on the PC of interest. I considered simply moving the current project over to the second PC, but I am afraid of also copying whatever this error is.

Other potentially helpful clues I've stumbled upon:

  • I tried to use the NI-MAX panel to help with the troubleshooting, but it would not come up. The window with "NI Measurement & Automation Explorer" "Initializing..." appears and then stays on the screen for over an hour, but never opens the program.
  • The IT department here has been making some changes to the network over the past few months. Around the same time that this issue appeared, I suddenly stopped being able to remotely connect to this PC with my laptop. So, these could be related somehow.
    • I tried changing the firewall settings and turned them off temporarily, but no dice. I also still cannot connect remotely, but that is a topic for a different forum.
0 Kudos
Message 1 of 3
(200 Views)

Hi,

You can install a different NI-USRP driver that supports LabVIEW 2018.

NI-USRP driver 2018, 2019, 2020, 2021...

 

0 Kudos
Message 2 of 3
(138 Views)
Solution
Accepted by kwensell

Hi again,

 

I resolved this issue! Dropping by to post further symptoms I encountered, along with what ended up fixing everything.

 

Further symptoms:

  • I used the NI I/O Trace tool while running the Simple NI-USRP Streaming example and noted that the very first I/O process, nisysOpen( "localhost"), starts but never finishes. This was the source of the freezing/hanging behavior, as this makes everything in LabView non-interactable while it is waiting for the process to finish.
  • As I wrote in the "other potentially helpful clues" section of the OP, I could not get NI MAX to open, as it would get stuck on the "Loading..." splash screen. It turns out I was burying the lede quite a bit by relegating this information to the end of the post... it ended up being the most vital clue.
    • Any attempts to Force Stop the NI Configuration Manager (which seems to be the go-to fix for opening NI MAX based on other posts around this forum) would cause Windows to respond "NI Configuration Manager could not be stopped", or "this process is already stopping", or "the service did not respond to the start or control request in a timely fashion", et cetera.

Solution:
It turns out the issue was with the NI MAX utility: either a file was corrupted or it was no longer compatible with some update that my IT department pushed, I'm still not sure. Regardless, I first wanted to see if the issue could be fixed without requiring a fresh uninstall/install of LabView, so I was aiming to use the "Repair" capabilities of the NI Package Manager. However, NI MAX could not be repaired with the package manager while the Configuration Manager was running. My solution got everything fixed while working around these constraints. 

 

Here are the steps I followed (Windows 10):

 

  1. Ensure you have the latest compatible version of the -> NI Package Manager <-installed (mine was a few years outdated, so I upgraded just in case).
  2. Press Win+R and type "services.msc" into the prompt. Click OK. This opens the Windows Services Manager
  3. Locate "NI Configuration Manager" in the list. Right click it and select "Properties".
  4. In the "Startup type" dropdown menu, change the setting to "Manual", and click "Apply".
    • OPTIONAL: You may need to repeat steps 3 and 4 for other NI services to be safe, but disabling this one service was enough for my system.
  5. Reboot your PC.
  6. Open the NI Package Manager and click the "INSTALLED" tab, if it is not already selected. From this list, you can select multiple products you have installed and repair them simultaneously to the most updated versions. It will prompt you to reboot afterwards.

    I found that trying to update everything at once was causing installations to fail, so I did it in three phases with a reboot after each. This is the order that worked for me, and is admittedly non-scientific, just an educated guess:
    1. Anything labeled a Programming Environment such as "LabVIEW Runtime (64-bit)", "NI LabVIEW 2018 (64-bit) Runtime", etc., along with utilities that seem most integral to LabVIEW such as "NI Update Service", "NI License Manager", and "NI Web Server".
    2. ONLY "NI Measurement & Automation Explorer".
    3. Other utilities, like "NI I/O Trace" and "NI Device Monitor", along with drivers such as "NI-DAQmx" and "NI USRP RIO Driver 18.0". These were all already updated to their most recent version, but a repair couldn't hurt.
  7. Navigate back to the NI Configuration Manager service as in steps 2-4, and change the startup type back to "Automatic" if it hasn't already changed itself.

This fixed NI MAX, but now my USRP was not being enumerated properly, likely due to the Configuration Settings being changed/repaired. So I had to remind Windows where to find the RIO drivers for it using the Device Manager:

 

  1. Press Win + R, type "devmgmt.msc", click OK.
  2. Find where your device is listed; I think mine was listed under a new "Other Devices" category.
  3. Right click -> Properties -> Driver -> Update Driver
  4. Since I still had the USRP driver on my computer, I selected "Browse my computer for drivers" -> "Let me pick from a list of available drivers on my computer" -> NI USRP-2944R -> Next, and it installed successfully.

After one final reboot, it enumerated properly and everything is back to normal!

 

Good luck and happy LabVIEWing? USRP-ing? National Instrumenting?

 

Happy verbing.

0 Kudos
Message 3 of 3
(75 Views)