agilent-rs232
所属分类:Python编程
开发工具:Python
文件大小:237KB
下载次数:0
上传日期:2020-05-31 22:50:53
上 传 者:
sh-1993
说明: 通过RS232从Agilent 54621A示波器读取波形并使用matplotlib显示的基本脚本
(A basic script to read the waveform from an Agilent 54621A oscilloscope via RS232 and display it using matplotlib)
文件列表:
LICENSE (1062, 2020-06-01)
agilent-rs232.py (4958, 2020-06-01)
reading.png (76586, 2020-06-01)
scope.jpg (165559, 2020-06-01)
# agilent-rs232
A basic script to read the waveform from an Agilent 54621A (Note: Has also been checked with 54622D) oscilloscope via RS232 and display it using matplotlib.
It can convert this:
![scope](https://github.com/kiwih/agilent-rs232/blob/master/scope.jpg?raw=true "Oscilloscope reading")
To this:
![matplotlib](https://github.com/kiwih/agilent-rs232/blob/master/reading.png?raw=true "Matplotlib rendering")
I wrote a blog post to go along with this! You can find it [here](https://github.com/kiwih/agilent-rs232/blob/master/https://01001000.xyz/2020-05-07-Walkthrough-Agilent-Oscilloscope-RS232/)!
# Usage
The program is written in python3.
```
usage: agilent-rs232.py [-h] [--port PORT] [--baud BAUD] [--channel CHANNEL]
[--length LENGTH]
optional arguments:
-h, --help show this help message and exit
--port PORT, -p PORT set serial port (default /dev/ttyUSB0)
--baud BAUD, -b BAUD set serial baud rate (default 57600)
--channel CHANNEL, -c CHANNEL
set probe channel (default 1)
--length LENGTH, -l LENGTH
number of samples (default 1000)
```
# Other implementations
I'm not the first person to want to solve this problem!
Although I did not use their code, a more full-featured approach to reading scopes and other tools from Python can be found under the [PyVisa](https://github.com/kiwih/agilent-rs232/blob/master/https://pyvisa.readthedocs.io/en/latest/) library.
近期下载者:
相关文件:
收藏者: