mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
G2: reconfigure chip (#927)
* changed common.c readADCFromFile to make it more general and move temperature calculation for Eiger out of this function and inside whereever it is called. * g2 and m2: gethighvoltage was just a variable set in server, it is now moved to a get inside DAC5671 implementation (but not reading a measured value, instead what is set from a file), high voltage variable used inside DAC5671 for virtual servers * g2: switching off hv (ifrom non zero to zero value) will wait for 10s; powering on chip reconfigures chip; powering off chip unconfigures chip; powering off chip also includes check if hv = 0, if not throw exception; chip configuration checked before acquring; at start up: hv switched off and chip powered on, so does not wait 10s to switch off hv; * included test to check powering off chip when hv is on should throw an exception * g2: check if chip configured before acquiring * nios: read hv value set from file and virtual still goes into DAC5671 for conversions to and fro dac to V, change common readadc to readparameter to generalize, make sethighvoltage into a get and set to catch errors in get as well, g2: if not at startup, remmeber hv value before setting it and after check if value was being switched off (from a non zero value) and wait 10s if it was (10s wait only for switching off from non zero and not at startup)
This commit is contained in:
@ -4,16 +4,6 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/**
|
||||
* Set Defines
|
||||
* @param hardMaxV maximum hardware limit
|
||||
* @param driverfname driver file name
|
||||
*/
|
||||
void DAC6571_SetDefines(int hardMaxV, char *driverfname);
|
||||
|
||||
/**
|
||||
* Set value
|
||||
* @param val value to set
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
int DAC6571_Set(int val);
|
||||
int DAC6571_Get(int *retval);
|
||||
|
@ -69,4 +69,4 @@ int deleteFile(char *mess, char *fname, char *errorPrefix);
|
||||
|
||||
int deleteOldServers(char *mess, char *newServerPath, char *errorPrefix);
|
||||
|
||||
int readADCFromFile(char *fname, int *value);
|
||||
int readParameterFromFile(char *fname, char *parameterName, int *value);
|
@ -442,6 +442,9 @@ int getSlowADC(int ichan, int *retval);
|
||||
int getTemperature(int *retval);
|
||||
#else
|
||||
int setHighVoltage(int val);
|
||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int getHighVoltage(int *retval);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// parameters - timing, extsig
|
||||
@ -650,7 +653,10 @@ int getClockDivider(enum CLKINDEX ind);
|
||||
|
||||
#elif GOTTHARD2D
|
||||
int checkDetectorType(char *mess);
|
||||
int powerChip(int on);
|
||||
int powerChip(int on, char *mess);
|
||||
int getPowerChip();
|
||||
int isChipConfigured();
|
||||
int configureChip(char *mess);
|
||||
void setDBITPipeline(int val);
|
||||
int getDBITPipeline();
|
||||
int setPhase(enum CLKINDEX ind, int val, int degrees);
|
||||
|
Reference in New Issue
Block a user