preadu
Overview
initializes the preADU and controls the preADU attenuation. Also on TPM 1.2 the preADU filters can be controlled.
Python Class & Methods Index
- class pyfabil.plugins.tpm.preadu.PreAdu(board, **kwargs)[source]
AdcPowerMeter plugin
- check_present()[source]
Detects if a preADU is present. Sets attribute “is_present”. A gain of 21 is written to all channels and read back. If the first gain value read back is 21, then a preADU is present.
The starting configuration of the software gains and preADU hardware gains are copied and restored at the end of the method.
- disable_channels(channels=None)[source]
Disable channel output :param channels: Input channel to disable (None for all channels)
- enable_channels(channels=None)[source]
Enable channel output :param channels: Input channels to enable (None for all channels)
- get_attenuation()[source]
Returns the current attenuation value. Stored in channel_filters[7:3].
return integer
- static get_bit(input, bit)[source]
Gets the specified bit in input. :param input: value to get bit. :param bit: position of bit.
- get_bits(input, bit_range)[source]
Gets the specified bits in an input. :param input: value to get bit. :param bit_range: position of bits to get (from,to).
- get_passband()[source]
Returns the current passband value. Stored in channel_filters[2:0].
return integer
- set_attenuation(attenuation, channels=None)[source]
Set attenuation level for a particular channel :param attenuation: Value of attenuation :param channels: Preadu channels (None if to be applied to all channels
- static set_bit(input, bit, value)[source]
Sets the specified bit in input with a value. :param input: value before set bit. :param bit: position of bit to set. :param value: value of bit in returned value