0

If I connect to any one of my GPIB instruments using pyvisa and then I try to close my python interpreter, my computer crashes (then automatically restarts). I only have this issue after connecting to a GPIB instrument with pyvisa, otherwise I can control my GPIB instruments and use my interpreter without any issues.

Here are the python tools I'm using:

python 2.7 python xy 2.7.5.1 spyder 2.2.4

Has anyone else encountered this problem? And what do you think I can do to fix it?

Thanks for your help.

Crawdad_Buckwheat
  • 313
  • 1
  • 4
  • 16
  • Im guessing its down to how the shell interacts with the driver, you could try adding a callback on exit to ensure the connection gets closed properly – James Kent Sep 02 '14 at 19:24
  • 1
    You should mention what operating system and what GPIB driver you're you're using since a computer crash indicates a bug in the driver or OS. – Ross Ridge Sep 02 '14 at 20:31
  • I'm using 64 bit windows 7, NI Visa 5.4 and pyvisa 1.5. I'm still stuck on this. I've tried the close() function to "close" the visa resource as well as the del command to delete the visa object from memory but my computer still crashes when I close the interpreter. Is there another way to break contact with a visa resource using pyvisa? Or maybe there is some weird quirk with my OS or GPIB driver? – Crawdad_Buckwheat Sep 02 '14 at 21:55

1 Answers1

0

Yeah! I did it! I am using a keithley KUSB-488a Gpib to usb cable to connect to my instrument. As soon as I updated the GPIB/KUSB 488a drivers from version 9.1 to version 9.2 my computer stopped mysteriously crashing when I close my python interpreter after communicating with the instrument.

Moral of the story:

Whenever controlling Keithley or Agilent hardware with python make sure you have the latest drivers for all hardware and connectors or you will be in for a world of hurt. :)

Crawdad_Buckwheat
  • 313
  • 1
  • 4
  • 16