mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
Dev: trigger signal issues handled at acquire (#864)
* if blocking and handling sync, only master gets blocking acq, slaves get non blocking as they are first and so dont get status or error caught when slaves dont get trigger (due to not connected etc) and acq returns with slaves still in waiting status. so check status of all in blocking acq * for all dets with sync, ensure atleast one master when starting acq * docs updated about sync
This commit is contained in:
@ -1543,7 +1543,9 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||
sync, getSynchronization, setSynchronization, StringTo<int>,
|
||||
"[0, 1]\n\t[Jungfrau][Moench] Enables or disables "
|
||||
"synchronization between modules.");
|
||||
"synchronization between modules. Sync mode requires at least one "
|
||||
"master configured. Also requires flatband cabling between master and "
|
||||
"slave with termination board.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(row, getRow, setRow, StringTo<int>,
|
||||
"[value]\n\tSet Detector row (udp header) to value. "
|
||||
|
@ -1309,13 +1309,24 @@ void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
|
||||
std::vector<int> masters;
|
||||
std::vector<int> slaves;
|
||||
getMasterSlaveList(pos, masters, slaves);
|
||||
if (masters.empty()) {
|
||||
throw RuntimeError("Cannot start acquisition in sync mode. No "
|
||||
"master module found");
|
||||
}
|
||||
if (!slaves.empty()) {
|
||||
Parallel(&Module::startAcquisition, slaves);
|
||||
}
|
||||
if (!masters.empty()) {
|
||||
Parallel((blocking ? &Module::startAndReadAll
|
||||
: &Module::startAcquisition),
|
||||
masters);
|
||||
if (blocking) {
|
||||
Parallel(&Module::startAndReadAll, masters);
|
||||
// ensure all status normal (slaves not blocking)
|
||||
// to catch those slaves that are still 'waiting'
|
||||
auto status = Parallel(&Module::getRunStatus, pos);
|
||||
if (!status.contains_only(IDLE, STOPPED, RUN_FINISHED)) {
|
||||
throw RuntimeError("Acquisition not successful. "
|
||||
"Unexpected detector status");
|
||||
}
|
||||
} else {
|
||||
Parallel(&Module::startAcquisition, masters);
|
||||
}
|
||||
}
|
||||
// all in parallel
|
||||
|
Reference in New Issue
Block a user