12#error This is a C++ include file and cannot be used from plain C
20#define ngcdcsAOBIAS_ERR_PROTECTION 0x1
59 int Volt2Reg(
double *volt,
int chan,
double corr = 1.0);
62 double Reg2Volt(
int reg,
int chan,
double corr = 1.0);
68 int DacReg(
int value,
int chan);
117 if ((num < 0) || (num >=
numDc))
119 sprintf(
ErrMsg(),
"bias channel number out of range");
122 *volt =
dc[num].volt;
129 if ((num < 0) || (num >=
numDc))
131 sprintf(
ErrMsg(),
"bias channel number out of range");
134 *volt =
dc[num].volt;
140 int TelClk(
int num,
int l,
double *volt) {
141 if ((num < 0) || (num >=
numClk))
143 sprintf(
ErrMsg(),
"clock channel number out of range");
146 *volt =
clk[num].level[l].volt;
147 clkTel[num].volt[l] = *volt;
185 int SetupKey(
const char *key,
const int *idx,
const char *value,
189 int StatusKey(
const char *key,
const int *idx,
char *value,
199 void AdjustV_(
int num);
202 int AdjustR_(
int num);
Definition ngcbIFC.hpp:754
virtual int Success()
Return success.
Definition ngcbOBJ.cpp:67
virtual char * ErrMsg()
Error message.
Definition ngcbOBJ.cpp:65
void ClkMap(ngcdcs_clk_t *cv)
Clock channel mapping.
Definition ngcdcsAOBIAS.cpp:222
double Reg2Volt(int reg, int chan, double corr=1.0)
Convert register value to voltage.
Definition ngcdcsAOBIAS.cpp:687
int Zero()
Set all voltages to zero.
Definition ngcdcsAOBIAS.hpp:170
int DiodeBias(double volt)
Diode bias dummy function.
Definition ngcdcsAOBIAS.hpp:101
int VStatus(int *s)
Get voltage HW-status.
Definition ngcdcsAOBIAS.cpp:108
int Monitor(int num, int clkChan)
Clock-monitor dummy function.
Definition ngcdcsAOBIAS.hpp:71
int TelClk(int num, int l, double *volt)
Telemetry for clock level (dummy)
Definition ngcdcsAOBIAS.hpp:140
double OffsetDC()
Return offset for DC-biases.
Definition ngcdcsAOBIAS.hpp:110
int OffsetClk(double volt)
Clock offset dummy function.
Definition ngcdcsAOBIAS.hpp:77
int Calibrate(int noSetup=0)
Calibrate.
Definition ngcdcsAOBIAS.hpp:173
int VideoOffset(double *volt)
Video offset dummy function.
Definition ngcdcsAOBIAS.hpp:95
int Volt2Reg(double *volt, int chan, double corr=1.0)
Convert voltage to register value.
Definition ngcdcsAOBIAS.cpp:495
int PreampOffset(double volt)
Preamplifier offset dummy function.
Definition ngcdcsAOBIAS.hpp:89
ngcdcsAOBIAS(const ngcb_route_t &r, int nb)
Constructor with route and number of biases.
Definition ngcdcsAOBIAS.cpp:29
int TelDC(int num, double *volt)
Telemetry for DC-bias (dummy)
Definition ngcdcsAOBIAS.hpp:128
int OffsetDC(double volt)
Bias offset dummy function.
Definition ngcdcsAOBIAS.hpp:83
int Calibrated()
Check if calibration has been done.
Definition ngcdcsAOBIAS.hpp:182
void DcMap(ngcdcs_dc_t *dv)
Bias channel mapping.
Definition ngcdcsAOBIAS.cpp:187
virtual ~ngcdcsAOBIAS()
Destructor.
Definition ngcdcsAOBIAS.cpp:44
double OffsetClk()
Return offset for clocks.
Definition ngcdcsAOBIAS.hpp:107
int autoAdjust
Auto voltage register adjustment.
Definition ngcdcsAOBIAS.hpp:38
void DefaultSetup(const char *keyWord=NULL)
Default setup.
Definition ngcdcsAOBIAS.cpp:246
int DacReg(int value, int chan)
Map value on DAC register channel.
Definition ngcdcsAOBIAS.cpp:1022
int TelClk(int num, ngcdcs_clkv_t *cv)
Telemetry for clock (dummy, all levels)
Definition ngcdcsAOBIAS.hpp:152
int TelIntern(int sel=-1)
Update internal telemetry.
Definition ngcdcsAOBIAS.hpp:113
void ClearCalibration()
Clear calibration.
Definition ngcdcsAOBIAS.hpp:179
double hvGainUpperRail
Gain of high voltage clock upper rail.
Definition ngcdcsAOBIAS.hpp:41
double hvGainLowerRail
Gain of high voltage clock lower rail.
Definition ngcdcsAOBIAS.hpp:44
int Adjust(int chan)
Voltage setup adjustement for channel.
Definition ngcdcsAOBIAS.cpp:869
int TelChan(int num, double *volt)
Telemetry for channel.
Definition ngcdcsAOBIAS.hpp:116
int StatusKey(const char *key, const int *idx, char *value, int *status=NULL)
Status.
Definition ngcdcsAOBIAS.cpp:1097
int SetupKey(const char *key, const int *idx, const char *value, int *status=NULL)
Setup.
Definition ngcdcsAOBIAS.cpp:1056
int numDc
Number of bias voltages.
Definition ngcdcsCLDC.hpp:167
ngcdcs_clkv_t * clkTel
Saved clock voltages telemetry values.
Definition ngcdcsCLDC.hpp:170
double * dcTel
Saved bias voltages telemetry values.
Definition ngcdcsCLDC.hpp:173
int numClk
Number of clock voltages.
Definition ngcdcsCLDC.hpp:161
ngcdcs_dc_t * dc
Bias voltages.
Definition ngcdcsCLDC.hpp:164
ngcdcs_clk_t * clk
Clock voltages.
Definition ngcdcsCLDC.hpp:158
ngcdcsCLDC(const ngcb_route_t &r, int nc, int nb)
Constructor with route, number of clocks and number of biases.
Definition ngcdcsCLDC.cpp:28
#define ngcbCLDC_MAX_DC
Definition ngcbAddr.h:333
#define ngcbMOD_ERR
Definition ngcbOBJ.hpp:22
#define USE(x)
Definition ngcb.h:28
#define ngcdcsCLDC_DCLK
Definition ngcdcsCLDC.hpp:38
Definition ngcbIFC.hpp:72
Definition ngcdcsCLDC.hpp:103
Definition ngcdcsCLDC.hpp:114
double volt[ngcdcsCLDC_DCLK]
Definition ngcdcsCLDC.hpp:115
Definition ngcdcsCLDC.hpp:63