P2d_module


class spirack.P2d_module(spi_rack, module, Chn1_state, Chn2_state, Chn3_state, Chn4_state)

SPI Rack interface code for the P2d module: a 4-channel cryogenic remote-controlled power supply.

Parameters:

  • spi_rack (SPI_rack) - SPI_rack class object via which the communication runs
  • module (int) - module number set in hardware
  • Chn1_state, Chn2_state, Chn3_state, Chn4_state ('on' / 'off') - the state of the channel, either active or inactive

Methods

read_overcurrents()

Checks for fault conditions in the module. This is intended for remote operation, where the front panel LEDs are not visible, or for automated sequences.

Returns - a 4-bit array corresponding to the fault indicator for channls Power Supply1, Power Supply2, Power Supply3, Power Supply4


get_P2d_settings()

Gets the settings of all 4 channels in the P2d.

Returns - a byte corresponding to the diferent channel settings:

  • Bits 1, 3, 5, 7 - the active state of Power Supply1, Power Supply2, Power Supply3, Power Supply4: (1) - on, (0) - off
  • Bits 2, 4 - the current limits for channels Power Supply1, Power Supply2: 1 - low limit, 0 - high limit
  • Bits 6, 8 - the current limits for channels Power Supply3, Power Supply4: 1 - high limit, 0 - low limit

get_output_current(channel)

Gets the instantaneous current draw the specified channel

Parameters:

  • channel (int: 1-4) - the number of the Power Supply

Returns - the instantaneous current draw in Ampers (float)


set_I_limit(channel,limit)

Set the maximum current for the Power supply channels. This is a safety measure

Parameters:

  • channel (int: 1-4) - the number of Power Supply being set
  • limit (string) - possible values are 'high' or 'low'

enable_outputs(channel_num, state)

Sets a Power supply output to an active (source) or inactive (floating) state.

Parameters:

  • channel (int: 1-4) - the number of Power Supply being set
  • state (string) - possible values are 'on' or 'off'