question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using ResourceManager with NI-VISA?

See original GitHub issue

I’ve downloaded and installed NI-VISA 2022 Q3 (latest as of time of this post). pyvisa seems to default to a DLL file located within the Windows folder. Anyway, the actual VISA drivers that come with the NI package are installed by default in C:\Program Files\IVI Foundation\VISA\Win64\NIvisa, at least to best of my understanding (there is a file inside the folder called NiVisaCom.dll).

So anyway, I’m trying this constructor: rm = pyvisa.ResourceManager(r"C:\Program Files\IVI Foundation\VISA\Win64\NIvisa") And get this error: Exception has occurred: LibraryError Error while accessing C:\Program Files\IVI Foundation\VISA\Win64\NIvisa: Could not find module ‘C:\Program Files\IVI Foundation\VISA\Win64\NIvisa’ (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

File “G:\My Drive\NES\Code\IEEE488.py”, line 3, in <module> rm = pyvisa.ResourceManager(r"C:\Program Files\IVI Foundation\VISA\Win64\NIvisa")

My Python info is as follows: Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32

I’m not sure what that win32 at the end means to be honest. I’m running Win11 Pro 64bit.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MatthieuDartiailhcommented, Aug 26, 2022

Note also that the RM expect the path to the DLL not to a folder.

0reactions
tstern9commented, Aug 26, 2022

That solved it - Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Resource Manager - NI - National Instruments
What exactly is a Resource Manager? ... NI-VISA ... You can use the viFindRsrc() operation to give the Resource Manager a search string, ......
Read more >
The Resource Manager - NI-VISA - Documentation & Help
The VISA Resource Manager has a similar function. It scans the system to find all the devices connected to it through the various...
Read more >
VB .NET 2019 and NI-VISA Example Needed - EEVblog
NET using NI-VISA to communicate with a Siglent device. ... I am having difficultty with the NI-VISA ResourceManager class.
Read more >
Can't get visa.RessourceManager() working neither with ('@ni ...
I am unable to get any instruments using the RessourceManager() ... made clear that on needs a backend for PyVisa like NI-Visa or...
Read more >
Resource Manager — PyVISA 1.7 documentation
Resource_name: This is the expanded version of the given resource string. The format should be similar to the VISA-defined canonical resource name. Alias: ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found