13#error This is a C++ include file and cannot be used from plain C
21#define ngcdcsAOBIAS_ERR_PROTECTION 0x1
60 int Volt2Reg(
double *volt,
int chan,
double corr = 1.0);
63 double Reg2Volt(
int reg,
int chan,
double corr = 1.0);
69 int DacReg(
int value,
int chan);
118 if ((num < 0) || (num >=
numDc))
120 sprintf(
ErrMsg(),
"bias channel number out of range");
123 *volt =
dc[num].volt;
130 if ((num < 0) || (num >=
numDc))
132 sprintf(
ErrMsg(),
"bias channel number out of range");
135 *volt =
dc[num].volt;
141 int TelClk(
int num,
int l,
double *volt) {
142 if ((num < 0) || (num >=
numClk))
144 sprintf(
ErrMsg(),
"clock channel number out of range");
147 *volt =
clk[num].level[l].volt;
148 clkTel[num].volt[l] = *volt;
186 int SetupKey(
const char *key,
const int *idx,
const char *value,
190 int StatusKey(
const char *key,
const int *idx,
char *value,
200 void AdjustV_(
int num);
203 int AdjustR_(
int num);
Definition ngcbIFC.hpp:760
virtual int Success()
Return success.
Definition ngcbOBJ.cpp:68
virtual char * ErrMsg()
Error message.
Definition ngcbOBJ.cpp:66
void ClkMap(ngcdcs_clk_t *cv)
Clock channel mapping.
Definition ngcdcsAOBIAS.cpp:223
double Reg2Volt(int reg, int chan, double corr=1.0)
Convert register value to voltage.
Definition ngcdcsAOBIAS.cpp:688
int Zero()
Set all voltages to zero.
Definition ngcdcsAOBIAS.hpp:171
int DiodeBias(double volt)
Diode bias dummy function.
Definition ngcdcsAOBIAS.hpp:102
int VStatus(int *s)
Get voltage HW-status.
Definition ngcdcsAOBIAS.cpp:109
int Monitor(int num, int clkChan)
Clock-monitor dummy function.
Definition ngcdcsAOBIAS.hpp:72
int TelClk(int num, int l, double *volt)
Telemetry for clock level (dummy)
Definition ngcdcsAOBIAS.hpp:141
double OffsetDC()
Return offset for DC-biases.
Definition ngcdcsAOBIAS.hpp:111
int OffsetClk(double volt)
Clock offset dummy function.
Definition ngcdcsAOBIAS.hpp:78
int Calibrate(int noSetup=0)
Calibrate.
Definition ngcdcsAOBIAS.hpp:174
int VideoOffset(double *volt)
Video offset dummy function.
Definition ngcdcsAOBIAS.hpp:96
int Volt2Reg(double *volt, int chan, double corr=1.0)
Convert voltage to register value.
Definition ngcdcsAOBIAS.cpp:496
int PreampOffset(double volt)
Preamplifier offset dummy function.
Definition ngcdcsAOBIAS.hpp:90
ngcdcsAOBIAS(const ngcb_route_t &r, int nb)
Constructor with route and number of biases.
Definition ngcdcsAOBIAS.cpp:30
int TelDC(int num, double *volt)
Telemetry for DC-bias (dummy)
Definition ngcdcsAOBIAS.hpp:129
int OffsetDC(double volt)
Bias offset dummy function.
Definition ngcdcsAOBIAS.hpp:84
int Calibrated()
Check if calibration has been done.
Definition ngcdcsAOBIAS.hpp:183
void DcMap(ngcdcs_dc_t *dv)
Bias channel mapping.
Definition ngcdcsAOBIAS.cpp:188
virtual ~ngcdcsAOBIAS()
Destructor.
Definition ngcdcsAOBIAS.cpp:45
double OffsetClk()
Return offset for clocks.
Definition ngcdcsAOBIAS.hpp:108
int autoAdjust
Auto voltage register adjustment.
Definition ngcdcsAOBIAS.hpp:39
void DefaultSetup(const char *keyWord=NULL)
Default setup.
Definition ngcdcsAOBIAS.cpp:247
int DacReg(int value, int chan)
Map value on DAC register channel.
Definition ngcdcsAOBIAS.cpp:1023
int TelClk(int num, ngcdcs_clkv_t *cv)
Telemetry for clock (dummy, all levels)
Definition ngcdcsAOBIAS.hpp:153
int TelIntern(int sel=-1)
Update internal telemetry.
Definition ngcdcsAOBIAS.hpp:114
void ClearCalibration()
Clear calibration.
Definition ngcdcsAOBIAS.hpp:180
double hvGainUpperRail
Gain of high voltage clock upper rail.
Definition ngcdcsAOBIAS.hpp:42
double hvGainLowerRail
Gain of high voltage clock lower rail.
Definition ngcdcsAOBIAS.hpp:45
int Adjust(int chan)
Voltage setup adjustement for channel.
Definition ngcdcsAOBIAS.cpp:870
int TelChan(int num, double *volt)
Telemetry for channel.
Definition ngcdcsAOBIAS.hpp:117
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsAOBIAS.cpp:1098
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsAOBIAS.cpp:1057
int numDc
Number of bias voltages.
Definition ngcdcsCLDC.hpp:168
ngcdcs_clkv_t * clkTel
Saved clock voltages telemetry values.
Definition ngcdcsCLDC.hpp:171
double * dcTel
Saved bias voltages telemetry values.
Definition ngcdcsCLDC.hpp:174
int numClk
Number of clock voltages.
Definition ngcdcsCLDC.hpp:162
ngcdcs_dc_t * dc
Bias voltages.
Definition ngcdcsCLDC.hpp:165
ngcdcs_clk_t * clk
Clock voltages.
Definition ngcdcsCLDC.hpp:159
ngcdcsCLDC(const ngcb_route_t &r, int nc, int nb)
Constructor with route, number of clocks and number of biases.
Definition ngcdcsCLDC.cpp:29
#define ngcbCLDC_MAX_DC
Definition ngcbAddr.h:334
#define ngcbMOD_ERR
Definition ngcbOBJ.hpp:23
#define USE(x)
Definition ngcb.h:29
#define ngcdcsCLDC_DCLK
Definition ngcdcsCLDC.hpp:39
Definition ngcbIFC.hpp:78
Definition ngcdcsCLDC.hpp:104
Definition ngcdcsCLDC.hpp:115
double volt[ngcdcsCLDC_DCLK]
Definition ngcdcsCLDC.hpp:116
Definition ngcdcsCLDC.hpp:64