02-06-2012 01:01 PM
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
02-07-2012 12:09 AM
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.
02-07-2012 01:32 PM
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
02-08-2012 11:59 AM
02-09-2012 12:00 AM
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