MPX-32D#

XIA’s MPX-32D is a 32-channel digitizer and modular pulse-processor that resides in a computer controlled PXI crate. Its primary function is to measure pulse-heights, i.e. event energies in an STJ system.

Relays#

By default, STJ Analog on-board relays are open. The STJ detectors are terminated with 1 MOhm resistors, and the preamplifier inputs are terminated with 10 kOhm resistors in parallel with 2 nF capacitors, i.e. a ‘dummy’ detector circuit. When the relays are closed/enabled, the preamplifier inputs are connected only to the HDDSUB-78 pins, i.e. to the STJ detectors, if present. We recommend first familiarizing yourself with the system by using the on-board pulser to generate an input signal before working with actual STJ detectors. Note that if the STJ detectors are not connected the HDDSUB-78 connector(s), the STJ Relay provides a convenient ‘low noise’ pulser setting: the pulser signal is much cleaner when the dummy detector circuit has been removed via the relay.

Name

Range

Description

AMRELAY

0 - 1

1 Connects the preamplifiers to the STJ detector. Defaults to 0

On-board Pulser#

The MPX-32D has a rudimentary built-in pulser circuit, which feeds a periodic signal to all preamplifier channels on the Analog Module. The signal is generated by a DAC on the MPX-32D which repeatedly cycles through 4K points of waveform data stored in RAM. It is quite useful for debugging and for exercising the data acquisition system.

The pulser’s default settings are a periodic pulse with a 1 us risetime and 5 µs decay time, at 1 kHz frequency. The following parameters can be used with the xiaSetParameter() and xiaGetParameter() to manage the pulser.

Name

Range

Description

PULSERENA

0 - 1

1 Enables the Pulser. Defaults to 0.

PULSERINV

0 - 1

Controls the polarity of the pulse waveform. It should be set to 0 or 1 such that pulses are positive in the ADC waveform. Defaults to 0.

PULSERATE

0 - 15

Controls the rate at which the DAC is updated: update rate = 20 ns * 2^PULSERATE. Note that this setting affects the rise time and decay time! With the default value 0, the waveform spans 80 µs, with a 1 µs risetime and 5 µs decay time. With PULSERATE=1, the waveform spans 160 µs, with a 2 µs risetime and 10 µs decay time, etc.

PULSEWAIT

0 - 255

ranging from 0 to 255, controls the time that the circuit waits before cycling back to the beginning of the waveform data, i.e. it can be used to reduce the count rate. Its units depend on PULSERATE: wait time = 256 * update rate as defined above. For example, with PULSERATE=0, the units are 5.12 µs.

PULSEGAIN

0 - 3

Controls the pulse amplitude, which is proportional to 2^PULSEGAIN. Valid PULSEGAIN values ranges from 0 to 3.

Acquisition Parameters#

Use the following parameter names in conjunction with xiaSetAcquisitionValues(), xiaGetAcquisitionValues() and xiaRemoveAcquisitionValues().

Note

The following acquisition parameters all have a double type.

Name

Default

Description

baseline_average

256.0

Set the baseline average. Must be a power of 2, but if it isn’t then it is silently rounded.

bias_dac_enable

1.0

Toggle one of the last 8 bits of bank-level parameters BANKnCHANENA according to acquisition value setting for given channel: e.g. BANK1CHANENA=0x00FF –> Channels 8-15 enabled.

bias_dac_set_zero

0.0

Per-channel STJ Bias DAC offset value. Should be set after first scan, i.e. to the DAC value corresponding to the inflection point. Subsequent scans will correct the DAC value on a per-channel basis

bias_dac_zero

0.0

Sets the DAC zero point.

bias_scan_start_offset

0.0

The starting DAC value for a bias scan.

bias_scan_step_size

1.0

The size of each DAC step.

bias_scan_steps

4000.0

The number of DAC steps in the scan.

bias_scan_wait_time

10.0

The time in milliseconds that the FiPPI waits after communications with the Analog Module.

bias_set_dac

0.0

STJ Bias Voltage user setting

calibration_energy

5900.0

Sets the calibration energy. Forces a recalculation of the gain.

decay_time

10.0

Sets the decay time for RC-type preamplifier.

detector_polarity

1.0

Sets the detector polarity.

dynamic_range

5000.0

Sets the dynamic range composite value. The Dynamic Range acquisition value is the energy of an x-ray that would generate a pulse that spans 40% of the full-scale ADC input (1638 codes).

energy_threshold

0.0

Sets the energy threshold.

gap_time

0.240

Set the slow filter gap time.

list_mode_variant

16.0

Sets the list-mode variant in mapping mode.

mapping_mode

0.0

Enables disables mapping mode by switching to the appropriate firmware. Also used to indicate if mapping parameters should be downloaded to the hardware during startup.

maxwidth

1.0

Set the maximum width of the trigger filter pile-up inspection

mca_bin_width

1.0

Sets the MCA bin width, also known as eV/bin. Changing this value forces a recalculation of the gain.

minimum_gap_time

0.060

Set the minimum gap time for the slow filter.

num_map_pixels_per_buffer

0.0

Sets the number of scan points that should be in each buffer. This parameter is skipped if mapping mode is not currently active. Also, the value -1.0 means: Use the maximum size for points/buffer given the size of my spectra. All buffer size validation is done by the DSP code.

num_map_pixels

0.0

Sets the total number of scan points when the hardware is run in mapping mode. This parameter is skipped if mapping mode is not currently active. Setting the number of mapping points to 0.0 causes the mapping run to continue indefinitely.

number_mca_channels

2048.0

Set the number of MCA channels.

peak_interval_offset

0.0

Set the peak interval offset for the specified decimation.

peak_mode

1.0

Set peak mode for determining the energy from the energy filter output. PEAKMODE = 0: XIA_PEAK_SENSING_MODE The largest filter value from a given pulse will be used as the energy. PEAKMODE = 1: XIA_PEAK_SAMPLING_MODE. The energy filter value will be sampled at a specific time determined by the setting of PEAKSAM.

peak_sample_offset

0.0

Specify an optional peak sample time offset, in microseconds, that overrides the value specified in the FDD file.

peaking_time

1.0

Sets the peaking time. Returns an error if no FDD file is defined.

pmt_dynode_sum_threshold

0.0

Sets the PMT dynode sum threshold, which has a 16-bit range.

pmt_dynode_threshold

3000.0

Sets the PMT dynode threshold, which has a 14-bit range.

pmt_multiplicity_length

0.0

Sets the interval for PMT multiplicity with a 10-bit range.

pmt_multiplicity_requirement

0.0

The multiplity of PMT events to trigger the system. Ranges from 0 - 32.

pmt_trigger_mode

0.0

Sets the PMT trigger mode.

preamp_gain

100.0

Synchronizes the preamplifier gain in the Detector configuration with the preamp_gain acquisition value. Handel assumes that the preamplifier gain specified in the Detector configuration is correct and uses it to set the acquisition value preamp_gain. This routine does not cause the gain to be recalculated.

preamp_type

0.0

Sets the preamplifier type and synchronizes it.

preset_type

0.0

Set the preset run type. The allowed preset run types are defined in handel_constants.h.

preset_value

0.0

Set the preset run value. This value is interpreted differently depending on the preset run type, which means that this value must be set after setting the preset type. For fixed realtime/livetime: Specify in seconds. For count-based runs: Specify as counts.

reset_delay

10.0

Set the reset delay interval.

trace_trigger_enable

0.0

Enables trace triggering if non-zero.

trace_trigger_position

0.0

Sets the Pre-Trigger interval for trace acquisition in units of 16 ADC samples. For example, if TRACELEN = 4096, TRACEPRETRIG = 128 will set the trigger point to the middle of the trace.

trace_trigger_type

0.0

Sets the trace triggering source according to the following map.

0 – Fast Peak
1 – Good Event
2 – Overflow Event
3 – Underflow Event
4 – ADC Rangebad
5 – NGATE edge
6 – Fast Pileup
7 – Slow Pileup

trigger_gap_time

0.0

Sets the trigger filter gap time.

trigger_peaking_time

0.100

Set the trigger filter peaking time

trigger_threshold

1000.0

Set the trigger threshold.

Run Data#

Use the following types in conjunction with xiaGetRunData().

Name

Type

Description

buffer_a

unsigned long*

Read mapping data from Buffer A. Requires mapping firmware.

buffer_b

unsigned long*

Read mapping data from Buffer B. Requires mapping firmware.

buffer_full_a

unsigned short

Checks to see if Buffer A is full. Requires the mapping mode firmware to be running.

buffer_full_b

unsigned short

Checks to see if Buffer B is full. Requires the mapping mode firmware to be running.

buffer_len

unsigned long

Calculates the size of the buffer, in 16-bit words, that will be returned by a call to xiaGetRunData() with the “buffer_a” “buffer_b” name argument. Requires mapping firmware.

buffer_overrun

unsigned short

Checks if a buffer overrun condition has been signaled. A value of 1 indicates a buffer overrun condition, while 0 indicates that the buffer has not been overrun. Requires mapping mode to be enabled.

current_pixel

unsigned long*

Gets the current mapping point. Requires mapping more firmware.

energy_livetime

double

Read the energy livetime from the board.

events_in_run

unsigned int

Get the events in run for the specified channel. This only returns the lower 32-bits of the events in run. For the complete 64-bit value, see module_statistics.

input_count_rate

double

Get the input count rate for the specified channel.

list_buffer_len_a

unsigned long

Calculates the size of the buffer, in 16-bit words, for Buffer A.

list_buffer_len_b

unsigned long

Calculates the size of the buffer, in 16-bit words, for Buffer B.

livetime

double

Read the energy livetime from the board.

mca_events

double

Gets the number of MCA events for the specified channel.

mca_length

unsigned int

Returns the current MCA spectrum length to the user

mca

unsigned long*

Get the MCA spectrum

module_mca

unsigned long*

Reads out the entire MCA block for the module that detChan is located in. This routine is an alternative to reading the MCA our individually for each channel. This routine assumes that all channels share the same size MCA.

module_statistics_2

double*

Returns the statistics for all channels on the module that detChan is a part of. Value is expected to be a double array with at least statsPerChan * m->number_of_channels elements. They are stored in the following format:

[ch0_runtime, ch0_trigger_livetime,
 ch0_energy_livetime, ch0_triggers,
 ch0_events, ch0_icr,
 ch0_ocr, ch0_underflows,
 ch0_overflows, ...,
 ch3_runtime, etc.]

module_statistics

double*

Returns the statistics for all channels on the module that detChan is a part of. value is expected to be a double array with at least 28 elements. They are stored in the following format:

[ch0_runtime, ch0_trigger_livetime,
 ch0_energy_livetime, ch0_triggers,
 ch0_events, ch0_icr,
 ch0_ocr, ...,
 ch3_runtime, etc.]

output_count_rate

double

Get the output count rate for the specified channel.

overflows

double

Returns the # of overflows in value.

realtime

double

Gets the runtime for the specified channel.

run_active

unsigned long

Get the run active status for the hardware.

runtime

double

Gets the runtime for the specified channel.

total_output_events

unsigned long

Get the events in run for the specified channel. This only returns the lower 32-bits of the events in run. For the complete 64-bit value, see module_statistics.

trigger_livetime

double

Get the trigger livetime for the specified channel.

triggers

double

Returns the # of triggers as a double in value.

underflows

double

Returns the # of underflows in value.

Gain Operations#

Use the following operations in conjunction with xiaGainOperation().

Name

Description

calibrate

Scale the analog gain according to given scale factor

scale_digital_gain

Calibrates the digital gain using the specified delta. Adjusts the digital gain by the inverse of the specified delta but doesn’t change the associated analog gain.

Board Operations#

Use the following operations in conjunction with xiaBoardOperation().

Name

Description

apply

Applies the current board settings.

buffer_done

Sets the specified buffer status to “done”. Requires mapping firmware. Returns an error if the specified buffer is not ‘a’ or ‘b’.

get_csr

Gets the Control Status Register.

get_cvr

Read the CPLD Version Register.

get_mcr

Gets the value of the Modem Control Register.

get_mfr

Get the Mapping Flag Register.

get_svr

Read the System FPGA Version Register.

mapping_pixel_next

Advances the mapping point to the next pixel. Requires mapping firmware. Requires mapping point control to be set to HOST, otherwise an error is returned.

Special Runs#

Run Type Listing#

Use the following run types with xiaDoSpecialRun().

Name

Read Data?

Type

Description

adc_trace

Yes

unsigned int*

Starts a run to collect ADC traces from all channels in the system.

adjust_offsets

No

unsigned int*

Tries to set all 32 channels Offset DACs such that their ADC average = value

begin_bias_scan

Yes

unsigned int*

Start steeping the STJ Bias DACs for all 32 channels through the user-specified range and acquires the average preamp output voltage value. The bias scan run will need to be stopped before other runs can proceed.

end_bias_scan

Yes

unsigned int*

Stops a Bias Scan currently in progress.

scale_digital_gain

No

unsigned int*

Calibrates the digital gain using the specified delta. Adjusts the digital gain by the inverse of the specified delta but doesn’t change the associated analog gain.

set_bias_dac

No

unsigned int*

Sets bias DACS for all channels in the module and Updates the STJDAC parameter value. Writes the value to the corresponding Bias DAC on the Analog Module.

Run Data Listing#

Name

Type

Description

adc_trace_length

unsigned long

Gets the ADC Trace length from the hardware. Getting the data stops the control task. If you do an ADC trace special run then you are required to read the data out to properly stop the run.

adc_trace

unsigned long*

Get the ADC trace from the board.

bias_scan_noise_length

unsigned long

Get the length of bias scan noise data

bias_scan_noise

unsigned long*

Get the bias scan noise data from the board.

bias_scan_trace_length

unsigned long

Get the length of bias scan trace data

bias_scan_trace

unsigned long*

Get the bias scan trace from the board.