class spirack.U2_module(spi_rack, module, reset_voltages)

U2 module interface class. When creating an instance it requires a SPI_rack class and a module number passed as a parameter. It is a child class of the D5a_module class, so it has all the same functions and attributes. Inside the module is one of the D5a DAC pcbs.

The module controls the data going to the shift registers of the cryomux. At initialization all the DACs in the module will be set to +-4V span and set to 0 Volt (midscale) if reset_voltages=True.


  • spi_rack (SPI_rack) - SPI_rack class object via which the communication runs
  • module (int) - module number set in hardware
  • reset_voltages (bool) - if True, then reset all voltages to zero and change the span to range_4V_bi. If a voltage jump would occur, then ramp to zero in steps of 10 mV. Defaults to True



Sets the supply voltages for the switches.


  • voltages (float) - list of positive and negative supply voltage for the switches: [pos_voltage, neg_voltage]


Gets the current switch supply voltages.

Returns - List of switch supply voltages (float): [pos_voltage, neg_voltage]


Sets the supply voltages for the shift registers.


  • voltages (float) - list of positive and negative supply voltage for the shift registers: [pos_voltage, neg_voltage]


Gets the current shift register supply voltages.

Returns - List of shift register supply voltages (float): [pos_voltage, neg_voltage]


These voltages correspond to the digital high/low values. Also sets the comparator level to midway between these values.


  • voltages (float) - list of voltages corresponding to the low and high data voltages: [low_voltage, high_voltage]


Gets the currently set data voltages.

Returns - List of data voltages (float): [low_voltage, high_voltage]


The data being send back is toggled between the two supply levels of the shift register. These are voltages that the SPI Rack is not familiar with. A comparator is placed on the input to translate these levels back to 0-3.3V.


  • voltage (float) - voltage around which the decision for low/high is made


Gets the currently set comparator voltage.

Returns - Comparator voltage (float)


Activates the selected mux. Writes the correct SPI code to the shift registers to select the desired mux.


  • mux (int: 1-16) - select mux 1 to 16