Skip to main content
Glama
lxkang00

SDG Function Generator MCP Server

by lxkang00

SDG Function Generator MCP Server

基于 SDG Programming Guide PG02-C02C 编写的 MCP Server,通过 TCP/IP (SCPI 协议,端口 5024) 远程控制 Siglent SDG2000X 系列函数/任意波形发生器。

适用型号:SDG2122X、SDG2042X、SDG2082X 及 SDG1000X、SDG6000X 系列。

快速开始

pip install -r requirements.txt

Related MCP server: siglent-sdg-mcp

通信协议

项目

说明

物理层

Ethernet (TCP/IP)

端口

5024

协议

Raw TCP Socket

命令

IEEE 488.2 + SCPI

通道格式

C1:BSWV TYPE,SINE;FREQ,1000

可用工具(24 个)

连接

工具

说明

connect

连接设备(IP/主机名)

disconnect

断开

send_command

发送任意 SCPI 命令

get_id

设备 ID

reset

恢复出厂

输出控制

工具

说明

set_output

开关输出、设置负载阻抗、极性、通道间偏移

get_output

读取输出状态

基本波形(核心工具)

工具

说明

configure_waveform

设置波形类型、频率/周期、幅度、偏移、相位、占空比、对称性、上升/下降时间等

get_waveform

读取当前波形参数

波形类型:SINE, SQUARE, RAMP, PULSE, NOISE, ARB, DC, HARMONIC, PRBS, DUALTON, IQ

调制

工具

说明

configure_modulation

配置 AM/FM/PM/FSK/ASK/PSK/PWM/DSBAM 调制

get_modulation

读取调制设置

扫频

工具

说明

configure_sweep

配置线性/对数扫频(起止频率、幅度、时间、触发)

get_sweep

读取扫频设置

脉冲串

工具

说明

configure_burst

配置脉冲串模式(周期数/门控/触发/延迟)

get_burst

读取脉冲串设置

任意波

工具

说明

configure_arb

选择内置波形或用户波形、采样率、播放模式

频率计

工具

说明

get_counter

读取频率/周期/占空比/统计

configure_counter

配置频率计(耦合/门控)

clear_counter

清零

其他

工具

说明

configure_sync

设置 SYNC 输出模式

get_network

读取 IP/掩码/网关

get_status

设备状态 + 错误队列

quick_snapshot

一键概览两通道波形/调制/扫频/脉冲串状态

save_state / recall_state

保存/调用仪器状态

使用示例

> connect host=192.168.1.101
Connected to 192.168.1.101:5024

> configure_waveform channel=C1 wave_type=SINE frequency=1000000 amplitude=3.3 offset=0
C1 waveform set:
  - wave_type: SINE
  - frequency: 1000000
  - amplitude: 3.3
  - offset: 0

> set_output channel=C1 state=true load=HZ
C1 output:
  - Output: ON
  - Load: HZ

> configure_modulation channel=C1 state=true mod_type=FM fm_deviation=10000 mod_frequency=1000 mod_waveform=SINE
C1 modulation:
  - Modulation: ON
  - mod_type: FM
  - fm_deviation: 10000
  - mod_frequency: 1000

> quick_snapshot
=== SDG Quick Snapshot ===
Device: Siglent,SDG2122X,...
--- C1 ---
  Output: ON
  Wave: SINE | 1000000.0 Hz | 3.3 Vpp | Offset: 0.0 V
  Modulation: ON | Type: FM
  Sweep: OFF
  Burst: OFF

项目结构

sdg-mcp/
├── server.py            # MCP Server 主程序
├── requirements.txt     # Python 依赖
├── .mcp.json            # MCP 配置模板
├── README.md            # 本文件
├── .gitignore
└── sdg_mcp.log          # 运行日志(自动生成)

兼容性

  • SDG1000X 系列

  • SDG2000X 系列(SDG2122X、SDG2042X、SDG2082X)

  • SDG6000X / SDG6000X-E 系列

  • SDG7000A 系列

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Enables control of MHS-5200A series signal generators via serial connection, including frequency, amplitude, waveform, and sweep settings.
    16
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server that lets AI assistants control Siglent SDG waveform generators over a local network using natural language, supporting signal generation, modulation, sweep, burst, and arbitrary waveforms.
    21
    6 npm
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables remote control of Siglent oscilloscopes via SCPI over TCP/IP, allowing natural language commands for configuration, measurements, and waveform data retrieval.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server to remotely control Siglent SDM3000 series digital multimeters via TCP/IP SCPI protocol, enabling measurement, configuration, and data acquisition.
    -