TutorialΒΆ
Once you have ht installed, you should have ht’s packages available on matlab’s path. Using it can be as simple as this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | %% Connect to supplies
% Rigol
ps = htPowerSupplies.RigolPS('DP8C161650549');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% All other commands work for any connected supply.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Name each of the channels
vdda = ps.get_channel(1);
vddd = ps.get_channel(2);
vddio = ps.get_channel(2);
% set voltages
vdda.set_ilimit(0.05)
vdda.set_voltage(1.5)
% turn on the channel
vdda.turn_on()
% measure the load on the supply
[v i] = vdda.measure();
disp('Voltage:')
disp(v)
disp('Current:')
disp(i)
|