Difference between revisions of "Programmable power supply"
Uwe Hermann (talk | contribs) m (→Config keys) |
|||
Line 13: | Line 13: | ||
=== SR_CONF_OUTPUT_VOLTAGE === | === SR_CONF_OUTPUT_VOLTAGE === | ||
* double representing voltage | * double, representing voltage. | ||
* get: | * 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: | * set: NA | ||
* list: voltage range as (low, high, step) | * 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 === | === SR_CONF_OUTPUT_CURRENT === | ||
* double representing current | * double, representing current. | ||
* get: 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. | * 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: | * set: NA | ||
* list: | * 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 === | === SR_CONF_OUTPUT_ENABLED === |
Revision as of 12:27, 5 January 2014
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