Difference between revisions of "Programmable power supply"
Uwe Hermann (talk | contribs) m (→Config keys) |
|||
Line 11: | Line 11: | ||
Denotes a device that provides power output via one or more output channels, typically with voltage and current set via the sigrok driver. | 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 | * double representing voltage | ||
Line 18: | Line 18: | ||
* list: voltage range as (low, high, step) | * list: voltage range as (low, high, step) | ||
=== | === SR_CONF_OUTPUT_CURRENT === | ||
* double representing current | * double representing current | ||
Line 33: | Line 33: | ||
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. | 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. | If available, this key is used to set the channel output to independent (the default), series, or parallel. |
Revision as of 23:47, 4 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: actual 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: target output voltage
- list: voltage range as (low, high, step)
SR_CONF_OUTPUT_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.
- set: target output current
- list: voltage 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