Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I import USB control to python? I want to write read to instrument that has USB interface.

How do I import USB control to python? I am using python 2.5. I want to write read to instrument that has USB interface.

Thanks

Chanh

0 Kudos
Message 1 of 5
(5,808 Views)

Please tell us more about the instrument, you want to control. If it supports the USBTMC standard and comes with a´documented command language, you should have a look at pyvisa. However if the instrument uses undocumented vendor specific protocols, you will get problems to control it over USB.  

0 Kudos
Message 2 of 5
(5,803 Views)

Thanks for your help. I have statement "import visa" which came from NI visa. Will that work for usb? Instrument I control is Agilent DSO91304 oscilloscope and USB relay cards designed by EASYDAQ. For EasyDQA relay card command was simple:

C (43H), 102 to close relay. I hope using USB will be something like open port, write text to port and close port.

Thanks

 

0 Kudos
Message 3 of 5
(5,794 Views)

Hello Chanh Vo,

 

It sounds like you should look into pyvisa.

 

Regards,

 

Jeff L.

 

0 Kudos
Message 4 of 5
(5,782 Views)

For a start look at the three liner example for the Keithley multimeter given at http://pyvisa.sourceforge.net/.

You just have to adapt  the Parameter in visa.instrumemt  to the id for your USB instrument. Check Measurement and Automationexplorer for you instrument. It will show you that id string

0 Kudos
Message 5 of 5
(5,777 Views)