Version 0.1 and git Setup
This commit is contained in:
135
README.md
135
README.md
@ -1,42 +1,119 @@
|
||||
# SDG2042X-PyQt-GUI-for-Linux
|
||||
# ToGo-Lab / SDG2042X Linux GUI – ToGo-Lab Edition
|
||||
|
||||
**Author:** Thomas Gohle – ToGo-Lab
|
||||
|
||||
A simple cross‑platform (Linux tested) GUI for controlling the **Siglent SDG2042X** function generator over LAN.
|
||||
---
|
||||
|
||||
## Features
|
||||
- Connect via LAN (raw SCPI over TCP, port 5025)
|
||||
- Basic waveform setup (SINE, SQUARE, RAMP, PULSE, NOISE, ARB, DC)
|
||||
- Control frequency, amplitude, offset, and phase
|
||||
- Output ON/OFF toggle
|
||||
- Burst configuration (mode, cycles, delay, trigger source)
|
||||
- Sweep configuration (linear/log, start/stop frequency, time, direction)
|
||||
- ARB Manager (not fully tested yet):
|
||||
- List built‑in and user waveforms
|
||||
- Upload `.bin` or `.csv` waveforms to USER memory
|
||||
- Download USER waveforms from the generator
|
||||
- Set selected waveform to active channel
|
||||
## Intro
|
||||
A PyQt5-based control GUI for the **Siglent SDG2042X Arbitrary Waveform Generator**.
|
||||
Runs on Linux and communicates over LAN using the instrument’s SCPI interface.
|
||||
---
|
||||
## Overview
|
||||
|
||||
## Requirements
|
||||
- Python 3
|
||||
- PyQt5 (`pip install pyqt5`)
|
||||
This first public release provides a functional desktop interface for the SDG2042X.
|
||||
It allows full access to the basic generator functions, presets, ARB manager, sweep, burst, and a SCPI command console.
|
||||
Data and settings are stored in an editable text file (`SDG2042x.dat`) for transparency and portability.
|
||||
|
||||
Future versions will maybe add:
|
||||
- Configurable paths for screenshots and data files
|
||||
- More user preferences saved between sessions
|
||||
- Extended ARB upload/download handling
|
||||
- CLI options beyond IP address
|
||||
- UI refinements and better error reporting
|
||||
|
||||
Contributions, forks, and suggestions are very welcome (I am more the HW guy, programming is not my finest profession).
|
||||
If you encounter bugs or have ideas, please send me a mail with description & logs. Help are **very** welcome!
|
||||
---
|
||||
## How It Works
|
||||
|
||||
The program uses a simple socket connection (`port 5025`) to talk SCPI to the SDG2042X.
|
||||
Each GUI tab corresponds to an instrument feature:
|
||||
</br>
|
||||
|
||||
| Tab | Function |
|
||||
|:----------------|:--------------------------------------------------------------|
|
||||
| **Basic** | Waveform, frequency, amplitude, offset, phase, output control |
|
||||
| **Burst** | Configure burst mode, trigger source, cycles, delay |
|
||||
| **Sweep** | Configure linear/log sweeps |
|
||||
| **ARB Manager** | List, upload, and download arbitrary waveforms |
|
||||
| **SCPI CLI** | Direct SCPI command line |
|
||||
| **Presets** | Store and recall up to 10 custom setups |
|
||||
|
||||
Screenshots are fetched via `SCDP` and stored as `.bmp` (or `.bin` if undecodable).
|
||||
|
||||
---
|
||||
|
||||
## Command Line Usage
|
||||
|
||||
## Usage
|
||||
```bash
|
||||
python3 sdg2042x_gui.py [options]
|
||||
python3 SDG2042X_V0.1.py [options]
|
||||
```
|
||||
|
||||
### Options
|
||||
- `-ip <addr>` or `--ip <addr>` : Prefill IP address field
|
||||
- `-h` or `--help` : Show help
|
||||
**Options**
|
||||
```
|
||||
-ip <addr>, --ip <addr> Prefill IP address in GUI
|
||||
-h, --help Show help message
|
||||
```
|
||||
|
||||
Example:
|
||||
```bash
|
||||
python3 sdg2042x_gui.py -ip 192.168.1.120
|
||||
python3 SDG2042X_V0.1.py --ip 192.168.1.120
|
||||
```
|
||||
---
|
||||
|
||||
## The Preset File – `SDG2042x.dat`
|
||||
|
||||
Presets are stored as plain text in key-value form and can be edited manually.
|
||||
A fresh file is created automatically if missing.
|
||||
|
||||
Example:
|
||||
```text
|
||||
# SDG2042X presets
|
||||
SLOT1_NAME=Test 1
|
||||
SLOT1_BSWV=C1:BSWV WVTP,SINE,FRQ,1KHZ,AMP,1V,OFST,0V,PHSE,0
|
||||
SLOT1_OUTP=ON
|
||||
SLOT2_NAME=
|
||||
SLOT2_BSWV=
|
||||
SLOT2_OUTP=
|
||||
...
|
||||
SLOT10_NAME=
|
||||
SLOT10_BSWV=
|
||||
SLOT10_OUTP=
|
||||
```
|
||||
|
||||
## Notes
|
||||
- Tested with Siglent SDG2042X firmware supporting SCPI commands.
|
||||
- Communication uses SCPI over TCP/IP; no VISA or NI libraries required.
|
||||
- ARB file formats: use Siglent EasyWaveX to prepare `.bin`/`.csv` if needed.
|
||||
Each slot (1–10) holds:
|
||||
- **NAME** – user label
|
||||
- **BSWV** – waveform setup string (as queried from instrument)
|
||||
- **OUTP** – output state (ON/OFF)
|
||||
|
||||
The GUI’s *Store* button reads back settings from the generator and saves them.
|
||||
*Recall* sends those settings back to the SDG2042X.
|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python ≥ 3.7
|
||||
- PyQt5
|
||||
- LAN-connected Siglent SDG2042X (default SCPI port 5025)
|
||||
|
||||
Install dependencies:
|
||||
```bash
|
||||
sudo apt install python3-pyqt5
|
||||
```
|
||||
---
|
||||
|
||||
## License, Contribution and Feedback
|
||||
|
||||
**Default license:** [CC-BY-NC-4.0 / Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/)
|
||||
You may use, modify, and redistribute with attribution to *ToGo-Lab*. Feel free to fork, enhance, or suggest features.
|
||||
|
||||
---
|
||||
|
||||
## Contact
|
||||
|
||||
Thomas Gohle
|
||||
[tgohle@togo-lab.io](mailto:tgohle@togo-lab.io)
|
||||
[https://togo-lab.io](https://togo-lab.io)
|
||||
|
||||
|
||||
## License
|
||||
MIT (or adapt as needed).
|
||||
|
||||
Reference in New Issue
Block a user