mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-02 10:50:05 +02:00
eiger fix for status idle in blocking trigger, readyfortrigger is not up indefinitely, so have to look at status
This commit is contained in:
parent
da4d47052d
commit
252f5a3e7b
@ -1106,7 +1106,7 @@ int Feb_Control_SendSoftwareTrigger() {
|
|||||||
LOG(logERROR, ("Could not give software trigger\n"));
|
LOG(logERROR, ("Could not give software trigger\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Software Internal Trigger Sent!\n"));
|
LOG(logDEBUG1, ("Software Internal Trigger Sent!\n"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1129,7 +1129,7 @@ int Feb_Control_SoftwareTrigger(int block) {
|
|||||||
|
|
||||||
// wait for next trigger ready
|
// wait for next trigger ready
|
||||||
if (block) {
|
if (block) {
|
||||||
LOG(logINFO, ("Blocking Software Trigger\n"));
|
LOG(logDEBUG1, ("Blocking Software Trigger\n"));
|
||||||
int readyForTrigger = 0;
|
int readyForTrigger = 0;
|
||||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after giving "
|
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after giving "
|
||||||
@ -1138,6 +1138,15 @@ int Feb_Control_SoftwareTrigger(int block) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!readyForTrigger) {
|
while (!readyForTrigger) {
|
||||||
|
// end of acquisition (cannot monitor readyForTrigger)
|
||||||
|
int status = Feb_Control_AcquisitionInProgress();
|
||||||
|
if (status == STATUS_ERROR) {
|
||||||
|
LOG(logERROR, ("Status: ERROR reading DAQ status register\n"));
|
||||||
|
return 0;
|
||||||
|
} else if (status == STATUS_IDLE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
usleep(5000);
|
usleep(5000);
|
||||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after "
|
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after "
|
||||||
@ -1145,8 +1154,10 @@ int Feb_Control_SoftwareTrigger(int block) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Done waiting (wait for trigger)!\n"));
|
LOG(logDEBUG2, ("Done waiting (wait for trigger)!\n"));
|
||||||
}
|
}
|
||||||
|
LOG(logINFO, ("%s Software Trigger %s\n", (block ? "Blocking" : "Non blocking"), (block ? "Acquired" : "Sent")));
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Binary file not shown.
@ -9,4 +9,4 @@
|
|||||||
#define APIJUNGFRAU 0x210722
|
#define APIJUNGFRAU 0x210722
|
||||||
#define APIMYTHEN3 0x210722
|
#define APIMYTHEN3 0x210722
|
||||||
#define APIMOENCH 0x210722
|
#define APIMOENCH 0x210722
|
||||||
#define APIEIGER 0x210722
|
#define APIEIGER 0x210727
|
||||||
|
Loading…
x
Reference in New Issue
Block a user