Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gwinstek driver (DC power supply)

This repository contains python driver for Gwinstek DC power supply. It supports following features:

  • Sending SCPI commands: turn on/off power channel, get device state
  • Periodic device state polling, logging
  • Asynchronous REST API interface

Quick-start (Ubuntu)

  1. Install python3.4+, python3-pip and dependencies:
pip install -r requirements.txt
  1. Update host, port_device and port_driver in config.yaml
host: 127.0.0.1
port_device: 5025 # Gwinstek
port_driver: 8080 # HTTP API
log_file: log.txt
  1. Launch driver
python main.py
  1. Sample HTTP commands
# Turn on power channel
curl -X POST http://127.0.0.1:8080/cmd -d '{"cmd": "power_on", "channel": 1, "voltage": 15.0, "current": 1.0}'
# Get channel state
curl -X POST http://127.0.0.1:8080/cmd -d '{"cmd": "get_state"}'
# Turn off power channel
curl -X POST http://127.0.0.1:8080/cmd -d '{"cmd": "power_off", "channel": 1}'

Running tests

pytest tests.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages