D4b_module


class spirack.D4b_module(spi_rack, module, calibrate=False)

SPI Rack interface code for the ADC module. An 2 channel 24-bit ADC module with integrated ARM Cortex M4 microcontroller. Used to connect to two neighbouring IVVI rack modules. Is in hardware identical to the B2b module, the only difference is the presence of connectors on the front of the module. In contrast to the D4a module, a microcontroller in the module handles all the communication with the ADCs. This allows for exactly timed ADC updates: based on triggers, timers etc.

This pages only contains the methods/functions that are different from the B2b module, for all the others: see the B2b_module page.

Parameters:

  • spi_rack (SPI_rack) - SPI_rack class object via which the communication runs
  • module (int) - module number set in hardware
  • calibrate (bool) - if True, runs calibration at initialisation. It will stall the code until the calibration is finished. This takes about 2 seconds.

Methods

set_input_location(ADC, location)

Sets the ADC input location to back or front. Back is used to read out neighbouring IVVI rack modules.

Parameters:

  • ADC (int: 0-1) - ADC inside the module of which to change the input location
  • location (string) - input location, possible values: back or front

get_input_location(ADC)

Gets the input location of the given ADC.

Parameters:

  • ADC (int: 0-1) - ADC inside the module of which to get the input location

Returns - input location of the ADC (string)


set_input_connection(ADC, connection_type)

Sets the ADC input to either single ended or differential. For back connections to the IVVI Rack it should always be set to differential.

Parameters:

  • ADC (int: 0-1) - ADC inside the module of which to change the input location
  • connection_type (string) - input connection type, possible values: single or differential

get_input_connection(ADC)

Gets the connection type for the given ADC

Parameters:

  • ADC (int: 0-1) - ADC inside the module of which to get the input connection type

Returns - connection type of the ADC (string)