mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
parent
22b9562629
commit
1bc4994be6
@ -88,7 +88,7 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
- adapted for g2 hdi v2.0. able to set master from server command line, server config file, and client.
|
||||
- rx udp socket refactored (maybe resolves getting stuck?)remove check for eiger header and isntead checks for malformed packets for every detector
|
||||
-help should not create a new object
|
||||
|
||||
- g2 parallel command
|
||||
|
||||
2. Resolved Issues
|
||||
==================
|
||||
|
@ -2045,11 +2045,13 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def parallel(self):
|
||||
"""
|
||||
[Eiger][Mythen3] Enable or disable the parallel readout mode of detector.
|
||||
[Eiger][Mythen3][Gotthard2] Enable or disable the parallel readout mode of detector.
|
||||
|
||||
Note
|
||||
----
|
||||
[Mythen3] If exposure time is too short, acquisition will return with an ERROR and take fewer frames than expected.
|
||||
[Mythen3][Eiger] Default: Non parallel
|
||||
[Gotthard2] Default: parallel. Non parallel mode works only in continuous mode.
|
||||
"""
|
||||
return self.getParallelMode()
|
||||
|
||||
|
@ -155,6 +155,8 @@
|
||||
#define ASIC_CONFIG_RESERVED_VAL ((0x3 << ASIC_CONFIG_GAIN_OFST) & ASIC_CONFIG_GAIN_MSK)
|
||||
#define ASIC_CONFIG_CURRENT_SRC_EN_OFST (7)
|
||||
#define ASIC_CONFIG_CURRENT_SRC_EN_MSK (0x00000001 << ASIC_CONFIG_CURRENT_SRC_EN_OFST)
|
||||
#define ASIC_CONFIG_NON_PARALLEL_RD_OFST (8)
|
||||
#define ASIC_CONFIG_NON_PARALLEL_RD_MSK (0x00000001 << ASIC_CONFIG_NON_PARALLEL_RD_OFST)
|
||||
#define ASIC_CONFIG_RST_DAC_OFST (15)
|
||||
#define ASIC_CONFIG_RST_DAC_MSK (0x00000001 << ASIC_CONFIG_RST_DAC_OFST)
|
||||
#define ASIC_CONFIG_DOUT_RDY_SRC_OFST (16)
|
||||
|
Binary file not shown.
@ -999,6 +999,28 @@ void resetPeripheral() {
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_PRPHRL_RST_MSK);
|
||||
}
|
||||
|
||||
/* set parameters - readout */
|
||||
|
||||
int setParallelMode(int mode) {
|
||||
if (mode < 0)
|
||||
return FAIL;
|
||||
LOG(logINFO, ("Setting %s mode\n", (mode ? "Parallel" : "Non Parallel")));
|
||||
uint32_t addr = ASIC_CONFIG_REG;
|
||||
if (mode) {
|
||||
bus_w(addr, bus_r(addr) & ~ASIC_CONFIG_NON_PARALLEL_RD_MSK);
|
||||
} else {
|
||||
bus_w(addr, bus_r(addr) | ASIC_CONFIG_NON_PARALLEL_RD_MSK);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
int getParallelMode() {
|
||||
int nonparallel =
|
||||
((bus_r(ASIC_CONFIG_REG) & ASIC_CONFIG_NON_PARALLEL_RD_MSK) >>
|
||||
ASIC_CONFIG_NON_PARALLEL_RD_OFST);
|
||||
return (nonparallel == 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
/* set parameters - dr, roi */
|
||||
|
||||
int setDynamicRange(int dr) {
|
||||
|
@ -207,7 +207,7 @@ int setExternalSampling(int val);
|
||||
#endif
|
||||
|
||||
// parameters - readout
|
||||
#if defined(EIGERD) || defined(MYTHEN3D)
|
||||
#if defined(EIGERD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int setParallelMode(int mode);
|
||||
int getParallelMode();
|
||||
#endif
|
||||
|
@ -5499,7 +5499,7 @@ int set_parallel_mode(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logINFO, ("Setting parallel mode: %u\n", arg));
|
||||
|
||||
#if !defined(EIGERD) && !defined(MYTHEN3D)
|
||||
#if !defined(EIGERD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
@ -5530,7 +5530,7 @@ int get_parallel_mode(int file_des) {
|
||||
|
||||
LOG(logDEBUG1, ("Getting parallel mode\n"));
|
||||
|
||||
#if !defined(EIGERD) && !defined(MYTHEN3D)
|
||||
#if !defined(EIGERD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
|
@ -499,12 +499,15 @@ class Detector {
|
||||
void setExternalSignalFlags(int signalIndex, defs::externalSignalFlag value,
|
||||
Positions pos = {});
|
||||
|
||||
/** [Eiger][Mythen3] */
|
||||
/** [Eiger][Mythen3][Gotthard2] */
|
||||
Result<bool> getParallelMode(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Mythen3]
|
||||
/** [Eiger][Mythen3][Gotthard2]
|
||||
* [Mythen3] If exposure time is too short, acquisition will return with an
|
||||
* ERROR and take fewer frames than expected */
|
||||
* ERROR and take fewer frames than expected \n
|
||||
* [Mythen3][Eiger] Default: Non parallel \n
|
||||
* [Gotthard2] Default: Parallel. Non parallel mode works only in continuous
|
||||
* mode.*/
|
||||
void setParallelMode(bool value, Positions pos = {});
|
||||
|
||||
/** [Gotthard2][Jungfrau] */
|
||||
|
@ -1407,10 +1407,12 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
parallel, getParallelMode, setParallelMode, StringTo<int>,
|
||||
"[0, 1]\n\t[Eiger][Mythen3] Enable or disable parallel "
|
||||
"[0, 1]\n\t[Eiger][Mythen3][Gotthard2] Enable or disable parallel "
|
||||
"mode.\n\t[Mythen3] If exptime is too short, the "
|
||||
"acquisition will return ERROR status and take fewer "
|
||||
"frames than expected.");
|
||||
"frames than expected.\n\t[Mythen3][Eiger] Default: Non "
|
||||
"parallel.\n\t[Gotthard2] Default: Parallel. Non parallel mode works "
|
||||
"only in continuous mode.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
filterresistor, getFilterResistor, setFilterResistor, StringTo<int>,
|
||||
|
@ -1483,7 +1483,8 @@ TEST_CASE("parallel", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::EIGER || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
auto prev_val = det.getParallelMode();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -7,8 +7,8 @@
|
||||
#define APIGUI 0x220609
|
||||
#define APICTB 0x220816
|
||||
#define APIGOTTHARD 0x220816
|
||||
#define APIGOTTHARD2 0x220816
|
||||
#define APIJUNGFRAU 0x220816
|
||||
#define APIMYTHEN3 0x220816
|
||||
#define APIMOENCH 0x220816
|
||||
#define APIEIGER 0x220816
|
||||
#define APIGOTTHARD2 0x220816
|
||||
|
Loading…
x
Reference in New Issue
Block a user