Using ResourceManager with NI-VISA?
See original GitHub issueI’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:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Note also that the RM expect the path to the DLL not to a folder.
That solved it - Thank you!