Parameters

Channel API

These functions are available for all channel types. Some channel types may have additional functions available, these are documented in the following sections.

chX.info() Provide a description of the channel type.

chX.ask(topic) Read the current value of a topic from the device.

chX.echo(topic, dt=0.001) Continuously read and print the value of a topic from the device every dt seconds. Throw an interrupt using Ctrl+C to stop.

chX.dump() Print all available topics for a given channel and their current values. Please consult the topics section for a more detailed description of available topics.

For example:

import ardi                 # import the ardi library
psu = ardi.autoconnect()    # connect to the first device found
ch1 = psu.channels['ch1']   # bind the first channel to the variable ch1
ch1.info()                  # print a description of ch1
ch1.dump()                  # print all available topics for ch1
ch1.ask('v_mon')            # read the voltage monitor of ch1

Topics

NOTE: This information is included as a reference. Reading these values via ask or echo is always safe. However, please do not attempt to modify these values, as doing so can cause permanent damage to the power supply and any connected hardware.

System

topictypeunitsdescription
firmwarestrfirmware version
hardwarestrhardware version
cpu_tempf32°CCPU temperature
n_channelsu8number of channels
n_callbacksu8number of active callbacks
stateu8state machine state
uptimeu32mssystem uptime in ms (resets every ~49.7 days)
cause_of_panicstrdescription of what caused the panic state

System State

The system state is a single byte that encodes the current state of the power supply. The state is encoded as follows:

valuestatedescription
0STANDBYhigh voltage is off
1AUTOCALcalibrating controller to connected loads
2ARMEDhigh voltage is on, waiting on a trigger
3ACTIVEhigh voltage is on, outputs are active
4PANIChigh voltage is off, problem detected

HV Rail

topictypeunitsdescription
v_moni16Vrail voltage (from psu monitor)
i_moni16μArail current (from psu monitor)

Unipolar Channels

topictypeunitsdescription
stateu8state machine state
pattern_dtu32μsvoltage pattern update rate
control_dtu32μscontroller update rate
v_patternu16Vprogrammed voltage pattern
v_refu16Vinstantaneous setpoint voltage
v_monu16Vinstantaneous measured voltage
v_railu16Vinstantaneous rail voltage
v_erru16Vvoltage error
kpf32controller proportional gain
kif32controller integral gain
kdf32controller derivative gain
kff32controller filter gain
u_maxu8charge PWM duty cycle limit
u_minu8drain PWM duty cycle limit
e_minu16error threshold for hold state
p_outu8controller output magnitude
p_chgu8charge PWM duty cycle
p_drnu8drain PWM duty cycle
v_idleu16Vidle voltage threshold
p_idleu8idle state drain duty cycle
p_calu8calibration PWM duty cycle
v_calu16Vcalibration voltage target
t_calu32μscalibration time
hasel_okboolshort detection flag
badnessu32short detection counter
v_badu16Vshort detection voltage threshold
max_badnessu32short detection threshold

Bipolar Channels

topictypeunitsdescription
stateu8state machine state
pattern_dtu32μsvoltage pattern update rate
control_dtu32μscontroller update rate
v_patternu16Vprogrammed voltage pattern
v_refu16Vinstantaneous setpoint voltage
v_mon_au16Vchannel A measured voltage
v_mon_bu16Vchannel B measured voltage
v_monu16Vdifferential measured voltage
v_railu16Vmeasured rail voltage
v_erru16Vvoltage error
kpf32controller proportional gain
kif32controller integral gain
kdf32controller derivative gain
kff32controller filter gain
u_maxu8charge PWM duty cycle limit
u_minu8drain PWM duty cycle limit
e_minu16error threshold for hold state
gnd_Au8channel A ground PWM duty cycle
gnd_Bu8channel B ground PWM duty cycle
p_outu8controller output magnitude
p_chg_au8channel A charge PWM duty cycle
p_drn_au8channel A drain PWM duty cycle
p_chg_bu8channel B charge PWM duty cycle
p_drn_bu8channel B drain PWM duty cycle
p_gndu8grounding PWM duty cycle
v_idleu16Vidle voltage threshold
p_idleu8idle state drain duty cycle
p_calu8calibration PWM duty cycle
v_calu16Vcalibration voltage target
t_calu32μscalibration time
hasel_okboolshort detection flag
badnessu32short detection counter
v_badu16Vshort detection voltage threshold
max_badnessu32short detection threshold