[Buck manual] Wrong data index in ref_step_exp
In Section 4.3 of the buck manual (v1.1.0), an example of a Python function to automate a test is presented:
def ref_step_exp():
buck.init_buck_plecs_controller(vo_ref=5)
time.sleep(0.1)
buck.set_output_voltage_trigger(voltage=6)
time.sleep(0.1)
buck.set_ref(7)
time.sleep(0.1)
t, data = buck.get_transient_data()
plt.figure();
plt.plot(t, data[:,9])
plt.plot(t, data[:,4])
This is meant to plot the reference and the output voltage, but their indices are 7 and 3, respectively. So the correct code should be:
def ref_step_exp():
buck.init_buck_plecs_controller(vo_ref=5)
time.sleep(0.1)
buck.set_output_voltage_trigger(voltage=6)
time.sleep(0.1)
buck.set_ref(7)
time.sleep(0.1)
t, data = buck.get_transient_data()
plt.figure();
plt.plot(t, data[:,7])
plt.plot(t, data[:,3])