CAEN FERS Library v1.1.4
SDK for FERS systems
High Voltage control
Collaboration diagram for High Voltage control:

Functions

int FERS_HV_Init (int handle)
 Initialize the HV communication bus (I2C) More...
 
int FERS_HV_WriteReg (int handle, uint32_t reg_addr, uint32_t dtype, uint32_t reg_data)
 Write a value of the HV. More...
 
int FERS_HV_ReadReg (int handle, uint32_t reg_addr, uint32_t dtype, uint32_t *reg_data)
 Read a register of HV. More...
 
int FERS_HV_Set_OnOff (int handle, int OnOff)
 Turn the high voltage module ON or OFF. More...
 
int FERS_HV_Get_Status (int handle, int *OnOff, int *Ramping, int *OvC, int *OvV)
 Get the status of the high voltage module. More...
 
int FERS_HV_Get_SerNum (int handle, int *sernum)
 Get the serial number of the high voltage module. More...
 
int FERS_HV_Set_Vbias (int handle, float vbias)
 Set HV output voltage (bias) More...
 
int FERS_HV_Get_Vbias (int handle, float *vbias)
 Get the output bias voltage set. More...
 
int FERS_HV_Get_Vmon (int handle, float *vmon)
 Get HV output voltage (HV read back with internal ADC) More...
 
int FERS_HV_Set_Imax (int handle, float imax)
 Set the maximum output current from the high voltage module. More...
 
int FERS_HV_Get_Imax (int handle, float *imax)
 Get the maximum allowed current of the high voltage module. More...
 
int FERS_HV_Get_Imon (int handle, float *imon)
 Get the output monitored current flowing into the detector. More...
 
int FERS_HV_Get_IntTemp (int handle, float *temp)
 Get the internal temperature of the HV module. More...
 
int FERS_HV_Get_DetectorTemp (int handle, float *temp)
 Get external temperature (of the detector). Temp sensor must be connected to dedicated lines. More...
 
int FERS_HV_Set_Tsens_Coeff (int handle, float Tsens_coeff[3])
 Set coefficients for external temperature sensor. T = V*V*c2 + V*c1 + c0. More...
 
int FERS_HV_Set_TempFeedback (int handle, int enable, float Tsens_coeff)
 Set coefficient for Vbias temperature feedback. More...
 

Detailed Description

Function Documentation

◆ FERS_HV_Init()

int FERS_HV_Init ( int  handle)

Initialize the HV communication bus (I2C)

Parameters
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_WriteReg()

int FERS_HV_WriteReg ( int  handle,
uint32_t  reg_addr,
uint32_t  dtype,
uint32_t  reg_data 
)

Write a value of the HV.

Parameters
[in]handleHandle to the FERS device
[in]reg_addrAddress of the register
[in]dtypeData type (0=signed int, 1=fixed point (Val*10000), 2=unsigned int, 3=float)
[in]reg_dataData to write
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_ReadReg()

int FERS_HV_ReadReg ( int  handle,
uint32_t  reg_addr,
uint32_t  dtype,
uint32_t *  reg_data 
)

Read a register of HV.

Parameters
[out]reg_dataPointer to the read value
[in]handleHandle to the FERS device
[in]reg_addrAddress of the register
[in]dtypeData type (0=signed int, 1=fixed point (Val*10000), 2=unsigned int, 3=float)
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Set_OnOff()

int FERS_HV_Set_OnOff ( int  handle,
int  OnOff 
)

Turn the high voltage module ON or OFF.

Parameters
[in]handleHandle to the FERS device
[in]OnOff1 to turn on, 0 to turn off
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_Status()

int FERS_HV_Get_Status ( int  handle,
int *  OnOff,
int *  Ramping,
int *  OvC,
int *  OvV 
)

Get the status of the high voltage module.

Parameters
[out]OnOffPointer to the on/off status (1 = on, 0 = off)
[out]RampingPointer to the ramping status (1 = ramping, 0 = not ramping)
[out]OvCPointer to the overcurrent status (1 = fault, 0 = normal)
[out]OvVPointer to the overvoltage status (1 = fault, 0 = normal)
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_SerNum()

int FERS_HV_Get_SerNum ( int  handle,
int *  sernum 
)

Get the serial number of the high voltage module.

Parameters
[out]sernumPointer to the Getd serial number
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Set_Vbias()

int FERS_HV_Set_Vbias ( int  handle,
float  vbias 
)

Set HV output voltage (bias)

Parameters
[in]handleHandle to the FERS device
[in]vbiasOutput bias voltage in Volts
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_Vbias()

int FERS_HV_Get_Vbias ( int  handle,
float *  vbias 
)

Get the output bias voltage set.

Parameters
[out]vbiasPointer to the output voltage setting in Volts (read from register)
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_Vmon()

int FERS_HV_Get_Vmon ( int  handle,
float *  vmon 
)

Get HV output voltage (HV read back with internal ADC)

Parameters
[out]vmonPointer to the monitored voltage in Volts
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Set_Imax()

int FERS_HV_Set_Imax ( int  handle,
float  imax 
)

Set the maximum output current from the high voltage module.

Parameters
[in]handleHandle to the FERS device
[in]imaxMaximum output current in mA
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_Imax()

int FERS_HV_Get_Imax ( int  handle,
float *  imax 
)

Get the maximum allowed current of the high voltage module.

Parameters
[out]imaxPointer to the maximum current
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_Imon()

int FERS_HV_Get_Imon ( int  handle,
float *  imon 
)

Get the output monitored current flowing into the detector.

Parameters
[out]imonPointer to the output current in mA
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_IntTemp()

int FERS_HV_Get_IntTemp ( int  handle,
float *  temp 
)

Get the internal temperature of the HV module.

Parameters
[out]tempPointer to the internal temperature in Celsius
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Get_DetectorTemp()

int FERS_HV_Get_DetectorTemp ( int  handle,
float *  temp 
)

Get external temperature (of the detector). Temp sensor must be connected to dedicated lines.

Parameters
[out]tempPointer to the detector temperature in Celsius
[in]handleHandle to the FERS device
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Set_Tsens_Coeff()

int FERS_HV_Set_Tsens_Coeff ( int  handle,
float  Tsens_coeff[3] 
)

Set coefficients for external temperature sensor. T = V*V*c2 + V*c1 + c0.

Parameters
[in]handleHandle to the FERS device
[in]Tsens_coeffCoefficients array (c0=offset, c1=linear, c2=quadratic)
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes

◆ FERS_HV_Set_TempFeedback()

int FERS_HV_Set_TempFeedback ( int  handle,
int  enable,
float  Tsens_coeff 
)

Set coefficient for Vbias temperature feedback.

Parameters
[in]handleHandle to the FERS device
[in]enable1 to enable, 0 to disable
[in]Tsens_coeffCoefficients for temperature feedback (mV/C)
Returns
0 on success, or a negative error code as defined in FERSLIB_ErrorCodes