CAEN FERS Library v1.1.4
SDK for FERS systems
Calibration
Collaboration diagram for Calibration:

Functions

int FERS_FindMemThrDest (int handle)
 Find the source where calibration is stored (if present EEPROM is default) More...
 
int FERS_ReadThrCalib (int handle, int npts, int MemThrDest, char *date, float *ThrOffset)
 Read threshold calibration offsets from flash memory. More...
 
int FERS_Set_DiscrThreshold (int handle, int Adapter_ch, float thr_mv, int brd)
 Set the discriminator threshold. More...
 
int FERS_CalibThresholdOffset (int handle, float min_thr, float max_thr, int *done, float *ThrOffset, float *RMSnoise, void(*ptr)(char *msg, int progress))
 Calibate the threshold offset of A5256 adapter. More...
 
int FERS_WriteThrCalib (int handle, int npts, int MemThrDest, float *ThrOffset)
 Write Threshold offset calibration of A5256 adapter to flash. More...
 

Detailed Description

Function Documentation

◆ FERS_FindMemThrDest()

int FERS_FindMemThrDest ( int  handle)

Find the source where calibration is stored (if present EEPROM is default)

Parameters
[in]Boardhandle
Returns
Source code (0 = flash, 1 = EEPROM)

◆ FERS_ReadThrCalib()

int FERS_ReadThrCalib ( int  handle,
int  npts,
int  MemThrDest,
char *  date,
float *  ThrOffset 
)

Read threshold calibration offsets from flash memory.

Parameters
[out]datePointer to the calibration date (DD/MM/YYYY)
[out]ThrOffsetPointer to the threshold offsets values
[in]MemThrDestFlag indicating the source (0 = flash, 1 = EEPROM) (see FERS_FindMemThrDest function)
[in]handleBoard handle
[in]nptsNumber of points to read
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_Set_DiscrThreshold()

int FERS_Set_DiscrThreshold ( int  handle,
int  Adapter_ch,
float  thr_mv,
int  brd 
)

Set the discriminator threshold.

Parameters
[in]handleBoard handle
[in]Adapter_chAdapter channel identifier
[in]thr_mvThreshold in millivolts
[in]brdBoard identifier
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_CalibThresholdOffset()

int FERS_CalibThresholdOffset ( int  handle,
float  min_thr,
float  max_thr,
int *  done,
float *  ThrOffset,
float *  RMSnoise,
void(*)(char *msg, int progress)  ptr 
)

Calibate the threshold offset of A5256 adapter.

Parameters
[out]ThrOffsetThreshold offsets
[out]doneCalibration completed, per channel
[out]RMSnoiseStandard deviation of threshold offset
[out]ptrCallback function to report progress
[in]handlehandle of the board to calibrate
[in]min_thrminimum threshold fo the scan
[in]max_thrmaximum threshold for the scan (not true)
Returns
0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

◆ FERS_WriteThrCalib()

int FERS_WriteThrCalib ( int  handle,
int  npts,
int  MemThrDest,
float *  ThrOffset 
)

Write Threshold offset calibration of A5256 adapter to flash.

Warning
The flash memory contains vital parameters for the board. Overwriting certain pages can damage the hardware!!! Do not use this function without contacting CAEN first
Parameters
[in]handlehandle of the board to calibrate
[in]nptsnumber of values to write
[in]MemThrCalibFlag indicating the source (0 = flash, 1 = EEPROM) (see FERS_FindMemThrDest function)
[in]ThrOffsetThreshold offsets (use NULL pointer to keep old values)
Returns
0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes