Skip to content

Add ramp of voltage/current to power supply.

Karol Krizka requested to merge kk_rampTo into devel

Adds ability to slowly change the the sourced voltage/current on a power supply to a target value. In rest of the description, I will only refer to voltage ramp to be succinct. However the same is true for sourcing current.

This adds two new functions: IPowerSupply::rampVoltageLevel(volt,ramp,channel) IPowerSupply::rampCurrentLevel(curr,ramp,channel) with the first argument being the target value, the second the rate of change and third the channel. The rate of change is an absolute value.

These functions first determine the current level and then call IPowerSupply::setVoltage/CurrentLevel in 1 second intervals to change the value by rate. The sign of rate (direction of ramp) is determined automatically by comparing the current level with the target level.

The powersupply tool also has a ramp-voltage/ramp-current to provide a convenient utility to use these new functions.

ramp-current -- I rate Ramp voltage I [A] at rate [A/s]
ramp-voltage -- V rate Ramp voltage V [V] at rate [V/s]
Edited by Karol Krizka

Merge request reports