FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

python-usbtmc/doc/examples.rst at master · subinitial/python-usbtmc · GitHub

Latest commit

 

History

History
24 lines (18 loc) · 581 Bytes

File metadata and controls

24 lines (18 loc) · 581 Bytes

Python USBTMC Examples

Opening a connection

Connect to an Agilent MSO7104A oscilloscope on IP address 192.168.1.104:

>>> import usbtmc
>>> instr =  usbtmc.Instrument(2391, 5973)
>>> print(instr.ask("*IDN?"))
'AGILENT TECHNOLOGIES,MSO7104A,MY********,06.16.0001'

Configuring connections

Open a connection and set the timeout:

>>> import usbtmc
>>> instr =  usbtmc.Instrument(2391, 5973)
>>> instr.timeout = 60*1000
>>> print(instr.ask("*TST?"))
'0'

Back | FazBrowse Home | New Git URL