Utilities for measurements
- Author
- Carlos Kometter
- Version
- 0.1
- Date
- 2018
- Copyright
- GNU Public License.
template<typename T1 , typename T2 >
uint8_t meas_utils::BufferRamp |
( |
T1 |
dac, |
|
|
T2 |
adc, |
|
|
uint8_t |
dac_channels[], |
|
|
uint8_t |
n_dac_channels, |
|
|
uint8_t |
adc_channels[], |
|
|
uint8_t |
n_adc_channels, |
|
|
double |
start_voltages[], |
|
|
double |
end_voltages[], |
|
|
uint32_t |
n_steps, |
|
|
uint32_t |
step_delay, |
|
|
uint8_t |
delay_unit = 0 |
|
) |
| |
Ramps the voltage of dac_channels[] from start_voltages[] to end_voltages[] in n_steps. After each step, there is a step_delay, and then the adc_channels[] are read. Once the adc_channels[] are read, a new step starts.
- Parameters
-
[in] | dac | Dac |
[in] | adc | Adc |
[in] | dac_channels[] | The dac channels to be ramped. |
[in] | n_dac_channels | The number of dac channels to be ramped. |
[in] | adc_channels[] | The adc channels to be read. |
[in] | n_adc_channels | The number of adc channels to be read. |
[in] | start_voltages[] | The start voltages of the ramp. It must be the same size as dac_channels[] and the element index corresponds to same index on dac_channels[] (eg. start_voltage[2] is the start voltage of dac_channels[2]). |
[in] | end_voltages[] | The end voltages of the ramp. It must be the same size as dac_channels[] and the element index corresponds to same index on dac_channels[] (eg. end_voltage[2] is the end voltage of dac_channels[2]). |
[in] | n_steps | The number of steps the ramp will be divided. |
[in] | step_delay | The delay time between setting the dac channels and reading the adc channels. |
[in] | delay_unit | Specifies step_delay unit in us (0: default) or ms (1); |