# pico6000 **Repository Path**: osr-tech/pico6000 ## Basic Information - **Project Name**: pico6000 - **Description**: PicoScope 6000系列示波器Python驱动包,专为侧信道数据采集设计。 - **Primary Language**: Python - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-10 - **Last Updated**: 2025-12-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pico6000 PicoScope 6000A系列示波器Python驱动包,专为侧信道数据采集设计。 ## 功能特点 - 支持PicoScope 6000A系列示波器(如6424E) - API与pico3000包兼容,方便迁移 - 支持多通道配置 - 支持快速块模式采集 - 支持触发配置 ## 系统要求 - Windows/Linux操作系统 - Python 3.8+ ## 安装 ```bash cd pico6000 pip install -e . ``` ## 快速开始 ```python from pico6000 import Pico6000A, CHANNEL, COUPLING, VRANGE, TRIGGER_DIR, BANDWIDTH # 列出连接的设备 from pico6000 import list_devices devices = list_devices() print(f"Found devices: {devices}") # 打开示波器 scope = Pico6000A() # 设置通道A - 触发通道,5V范围 scope.set_channel( channel=CHANNEL.CHANNELA, coupling=COUPLING.DC, vrange=VRANGE.PICO_5V, enable=True, acquire=False # 不采集此通道数据 ) # 设置通道B - 信号通道 scope.set_channel( channel=CHANNEL.CHANNELB, coupling=COUPLING.DC, vrange=VRANGE.PICO_1V, enable=True, acquire=True # 采集此通道数据 ) # 设置触发 - 通道A上升沿触发,阈值2V scope.set_trigger( source=CHANNEL.CHANNELA, threshold=2000, # 2000mV = 2V direction=TRIGGER_DIR.PICO_RISING ) # 设置采集参数 scope.set_acquire( pre_trigger=0, # 触发前采样点数 post_trigger=10000, # 触发后采样点数 timebase=2, # 时基 sequence=1 # 采集序列数 ) # 准备采集 scope.arm() # 发送触发信号(例如通过串口发送数据) # ... 您的触发代码 ... # 获取数据 data = scope.acquire(CHANNEL.CHANNELB) if data is not None: print(f"Acquired {data.shape} samples") # 关闭示波器 scope.close() ``` ## API参考 ### 枚举类型 - `CHANNEL`: 通道枚举 (CHANNELA, CHANNELB, CHANNELC, CHANNELD, CHANNELEXT) - `COUPLING`: 耦合方式 (AC, DC, DC_50OHM) - `VRANGE`: 电压范围 (PICO_10MV ~ PICO_50V) - `TRIGGER_DIR`: 触发方向 (PICO_RISING, PICO_FALLING, PICO_RISING_OR_FALLING) - `BANDWIDTH`: 带宽限制 (BW_FULL, BW_20MHZ, BW_200MHZ) - `RESOLUTION`: 分辨率 (DR_8BIT, DR_10BIT, DR_12BIT) ### 主要函数 - `list_devices()`: 列出连接的设备 - `timebase_to_sample_rate(timebase)`: 时基转采样率 - `sample_rate_to_timebase(sample_rate)`: 采样率转时基 ### Pico6000A类 - `set_channel(channel, coupling, vrange, offset=0, bandwidth=BW_FULL, enable=True, acquire=True)`: 设置通道 - `set_trigger(source, threshold, direction, delay=0, auto_trigger_us=0)`: 设置触发 - `set_acquire(pre_trigger, post_trigger, timebase=2, sequence=1)`: 设置采集参数 - `arm()`: 准备采集 - `acquire(channel)`: 获取数据 - `stop()`: 停止采集 - `close()`: 关闭设备 ## 依赖 - numpy ## 许可证 MIT License