https://github.com/pklaus/agilent_34411a
Python Package for the table-top DMM Agilent 34411A using TCP/IP
https://github.com/pklaus/agilent_34411a
Last synced: about 1 month ago
JSON representation
Python Package for the table-top DMM Agilent 34411A using TCP/IP
- Host: GitHub
- URL: https://github.com/pklaus/agilent_34411a
- Owner: pklaus
- Created: 2015-08-03T10:22:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-22T11:39:50.000Z (over 7 years ago)
- Last Synced: 2025-03-26T13:11:16.332Z (about 2 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Agilent 34411A Python Package
This Python package makes it easy to communicate with the Agilent 34411A in Python.
#### Installation
pip install --upgrade https://github.com/pklaus/agilent_34411a/archive/master.zip
#### Usage
I use the small CLI script thats being supplied with the package like this:
agilent_34411a_cli 192.168.0.10 --interval 3 --avg-samples 1
I also added some more transformation functions:
agilent_34411a_cli 192.168.0.10 \
--apply-function PT100 \
--output-format '{:.03f} °C' \
--interval 0.9 --avg-samples 1Check what's possible by running `agilent_34411a_cli --help`:
$ agilent_34411a_cli -h
usage: agilent_34411a_cli [-h] [--port PORT] [--interval INTERVAL]
[--avg-samples AVG_SAMPLES]
[--value-scaling VALUE_SCALING]
[--output-format OUTPUT_FORMAT]
[--apply-function {None,PT100}]
host
Process some integers.
positional arguments:
host Agilent 34411A to connect to
optional arguments:
-h, --help show this help message and exit
--port PORT TCP Port to connect to
--interval INTERVAL Interval in s between printing the value
--avg-samples AVG_SAMPLES
Number of samples to to capture for averaging
--value-scaling VALUE_SCALING
A factor to scale the measured value with
--output-format OUTPUT_FORMAT
Format for printing the output
--apply-function {None,PT100}
A function to apply to the output value (after
scaling)You can, however, also write your own Python script to implement your own measurement tasks:
```python
from agilent_34411a import Agilent_34411Aa = Agilent_34411A('192.168.0.10')
print("Connected to the following device: {}".format(a.idn))while True:
value = a.read()
print("{}".format(value))
```#### Resources
##### Connecting via VXI-11
Besides connecting directly to port 5025 via TCP/IP, the
DMM also understands the RPC protocol VXI-11.To make this work, you don't need this package (`agilent_34411a`).
Instead, install the Python bindings for VXI-11:
[python-vxi11](https://github.com/python-ivi/python-vxi11)
and you can connect to the device with the following Python code:```python
import vxi11instr = vxi11.Instrument("192.168.0.207")
print(instr.ask("*IDN?"))
print("{:.05f}".format(float(instr.ask("READ?"))))
```