Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| 
                    en:python-vxi11:readme [2013/02/17 20:56] alex  | 
                
                    en:python-vxi11:readme [2013/12/17 08:24] (current) alex [Usage Examples]  | 
            ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| Python VXI-11 provides a pure Python VXI-11 driver for controlling instruments over Ethernet. | Python VXI-11 provides a pure Python VXI-11 driver for controlling instruments over Ethernet. | ||
| + | |||
| + | ===== Requirements ===== | ||
| + | |||
| + | * Python 2 or Python 3 | ||
| ===== Installation ===== | ===== Installation ===== | ||
| Line 13: | Line 17: | ||
| </code> | </code> | ||
| - | ===== Usage ===== | + | ===== Usage Examples ===== | 
| - | + | ||
| - | Simple usage examples: | + | |
| Connecting to Agilent MSO7104A via LXI: | Connecting to Agilent MSO7104A via LXI: | ||
| Line 26: | Line 28: | ||
| </code> | </code> | ||
| - | Connecting to Agilent E3649A via HP 2050A GPIB bridge: | + | Connecting to Agilent E3649A on GPIB address 5 via HP 2050A GPIB bridge: | 
| <code python> | <code python> | ||
| Line 34: | Line 36: | ||
| # returns 'Agilent Technologies,E3649A,0,1.4-5.0-1.0' | # returns 'Agilent Technologies,E3649A,0,1.4-5.0-1.0' | ||
| </code> | </code> | ||
| + | |||
| + | It is also possible to connect with VISA resource strings like so: | ||
| + | |||
| + | <code python> | ||
| + | import vxi11 | ||
| + | instr = vxi11.Instrument("TCPIP::192.168.1.104::INSTR") | ||
| + | print(instr.ask("*IDN?")) | ||
| + | # returns 'AGILENT TECHNOLOGIES,MSO7104A,MY********,06.16.0001' | ||
| + | </code> | ||
| + | |||
| + | and: | ||
| + | |||
| + | <code python> | ||
| + | import vxi11 | ||
| + | instr = vxi11.Instrument("TCPIP::192.168.1.105::gpib,5::INSTR") | ||
| + | print(instr.ask("*IDN?")) | ||
| + | # returns 'Agilent Technologies,E3649A,0,1.4-5.0-1.0' | ||
| + | </code> | ||
| + | |||
| + | |||