Skip to main content

CLI/library to control FNIRSI DC Power Supply (DC-6006L, etc).

Project description

dc6006l - CLI/library to control FNIRSI DC Power Supply (DC-6006L, etc)

What is this?

FNIRSI DC6006L is a programmable DC power supply that is quite compact and inexpensive. This CLI tool/library allows you to control an unit over an built-in USB-serial port.

This work is based on the work by jcheger for a similar model, DC-580. They seem to support same set of commands, but are not compatible in message format.

How to install

pip install dc6006l

How to use

dc6006l - Controls FNIRSI DC Power Supply (DC-6006L, etc)
Usage: dc6006l [-p devport] [-m model] cmd [cmd...]
Commands:
  on: Turn power on
  off: Turn power off
  v=<V>: Set target voltage
  c=<A>: Set target current
  ovp=<V>: Set over-voltage limit
  ocp=<A>: Set over-current limit
  opp=<W>: Set over-power limit
  ohp=<sec>: Set over-hour limit (0 to disable)
  noprotect: Disable protection
  stat: Show status (packed trace)
  trace=<n>: Show trace capture (infinite if n=-1)
  flush: Flush/clear log buffer
  echo=<str>: Print given input
  sep: Print separator string
  sleep=<sec>: Sleep for given seconds
  check: Enable double-check mode
Example:
  # Output 1V1A for ~3s
  $ dc6006l v=1 c=1 on sleep=3 off
  # More complex operation
  $ dc6006l check v=1.5 c=1.0 on flush sep trace=15 c=0.5 flush sep trace=15 off
NOTE:
  - Set envvar FNIRSI_PS=/some/devport to specify default port to use.

NOTE

While this code works for me, your milage may vary.

Just as a head-up, in one case, target voltage was unexpectedly set to 15V when I sent a command to set to 1.5V (V0150). Because there is no checksum in frame, I suppose the unit dropped a byte and somehow interpreted as "V1500". While the hardware is nice, it seems there is a serious issue with firmware of the product that it easily drops data sent over a serial port.

I added double-check mode (cmd: check) to cope with this, but this mode is ineffective if you need to change the setting while the unit is already on.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dc6006l-0.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

dc6006l-0.0.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file dc6006l-0.0.1.tar.gz.

File metadata

  • Download URL: dc6006l-0.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6

File hashes

Hashes for dc6006l-0.0.1.tar.gz
Algorithm Hash digest
SHA256 26989ae30c9c23f6a491b90ecef302d6822ab85cfd0325a362a3df241e0aee09
MD5 e9ad98dd7a1375c6abee6f70321a3a8f
BLAKE2b-256 40ed274b840b532458af40c4c5ecc098a38a9d8086ce2f9f588bdcbd6adc37f5

See more details on using hashes here.

File details

Details for the file dc6006l-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dc6006l-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6

File hashes

Hashes for dc6006l-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a432fc4f3e88c65f981d71de4c7a044c372d545738189bd57d3e24701957f04
MD5 60ed6e975d4bb621a95382bd7f3682c7
BLAKE2b-256 2303d79726002a11196e5cc6d7ef9b8422dced1d2cf7fc443e1e4d79143e3eb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page