Difference between revisions of "Programmable power supply"
Line 1: | Line 1: | ||
This page documents the config keys are various other info needed to write a libsigrok frontend for controlling programmable power supplies. | |||
== Notes == | == Notes == | ||
It's not unusual for different channels on a device to have different voltage or current limits. Therefore, channels will generally be in a probe group which allows setting these limits. | It's not unusual for different channels on a device to have different voltage or current limits. Therefore, channels will generally be in a probe group which allows setting these limits. |
Revision as of 17:56, 5 January 2014
This page documents the config keys are various other info needed to write a libsigrok frontend for controlling programmable power supplies.
Notes
It's not unusual for different channels on a device to have different voltage or current limits. Therefore, channels will generally be in a probe group which allows setting these limits.
After setting SR_CONF_CHANNEL_OUTPUT, the limits of these channels may change, and the limits should be queried again.
Config keys
A libsigrok driver for a programmable power supply implements all or some subset of the following config keys.
SR_CONF_POWER_SUPPLY
Denotes a device that provides power output via one or more output channels, typically with voltage and current set via the sigrok driver.
SR_CONF_OUTPUT_VOLTAGE
- double, representing voltage.
- get: The current output voltage. This may not be the same as what was set -- the output may be disabled, or can change depending on the load.
- set: NA
- list: NA
SR_CONF_OUTPUT_VOLTAGE_MAX
- double, representing voltage.
- get: The previously set maximum output voltage, or device default.
- set: Maximum output voltage.
- list: Supported voltage range as (low, high, step).
SR_CONF_OUTPUT_CURRENT
- double, representing current.
- get: The actual output current. This may not be the same as what was set -- the output may be disabled, or can change depending on the load.
- set: NA
- list: NA
SR_CONF_OUTPUT_CURRENT_MAX
- double, representing current.
- get: The previously set maximum output current, or device default.
- set: Maximum output current.
- list: Supported current range as (low, high, step).
SR_CONF_OUTPUT_ENABLED
- boolean
- get: actual state of output
- set: turn output on or off
If a channel/probe group cannot be enabled or disabled separately from other channels, setting this key will return SR_ERR_NO. The set should then instead be tried with a NULL probe group, for devices that have only a global setting for this.
SR_CONF_OUTPUT_CHANNEL
If available, this key is used to set the channel output to independent (the default), series, or parallel.
TODO enumeration
SR_CONF_OVER_VOLTAGE_PROTECTION
- boolean
- get: current state of OVP
- set: turn OVP on or off
SR_CONF_OVER_CURRENT_PROTECTION
- boolean
- get: current state of OCP
- set: turn OCP on or off