Open mb711 opened 5 years ago
Hi @mb711,
I am currently without access to my GPIB equipment and this will require some playing around. Off the cuff I would say you don't need gpib_ctypes since you are using native VISA. (Nevertheless, I will have to test this configuration ASAP...)
Please change the order of commands so that make_default_gpib()
gets a chance to run before VISA is initialized.
from gpib_ctypes import make_default_gpib
make_default_gpib()
import visa
rm = visa.ResourceManager("C:\\Windows\\System32\\visa32.dll")
instr = rm.open_resource("GPIB0::5::INSTR")
Does this change anything?
@mb711, did you have a chance to try the above suggestion? Any results with that?
This seems to be a douvle-close bug similar to https://github.com/pyvisa/pyvisa-py/pull/171. What confuses me is that you seem to be using the NI backend and I am not sure what that has got to do with gpib-ctypes...
I am going to close the issue for now. @mb711, if the problem persists please feel free to reopen it and let me know if the above suggestions make any difference.
Hi, I have the similar problem. Here is my source code.
Error:
I also try the solution you said, but it also show the error for me. How can I do next? Thanks
@francis60k, thank you for the report. I am going to look into it.
Hi,
I'm using python to talk to instruments over GPIB. My full script runs successfully, but I always get an error thrown in the python window at the very end of the run. I truncated my code to just the root of the issue, shown below. The error is also shown. Due to the error type, I've tried closing all my instruments and types, but no success. The error thrown is the same with and without the bottom portion of the code.
Also, I wasn't able to successfully talk to the instruments without the make_default_gpib() command. Calling this solved my issues, so it seems to be required for me.
Error:
Any help is greatly appreciated.