mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +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:
parent
66baaf1ebd
commit
e57cf49c49
@ -92,6 +92,9 @@ Common
|
|||||||
sls_detector_put rx_arping 1
|
sls_detector_put rx_arping 1
|
||||||
|
|
||||||
|
|
||||||
|
#. Only the slaves get no data
|
||||||
|
* Check trigger cabling and trigger configuration
|
||||||
|
* When you cannot stop Jungfrau slaves in sync mode, refer to :ref:`Cannot stop slaves<Jungfrau Troubleshooting Sync Slaves Cannot Stop>`.
|
||||||
|
|
||||||
.. _Receiver PC Tuning:
|
.. _Receiver PC Tuning:
|
||||||
|
|
||||||
@ -421,3 +424,19 @@ Cannot get multi module data
|
|||||||
* Comment out this line in the config file: powerchip 1
|
* Comment out this line in the config file: powerchip 1
|
||||||
* Powering on the chip increases the power consumption by a considerable amount. If commenting out this line aids in getting data (strange data due to powered off chip), then it could be the power supply current limit. Fix it (possibly to 8A current limit) and uncomment the powerchip line back in config file.
|
* Powering on the chip increases the power consumption by a considerable amount. If commenting out this line aids in getting data (strange data due to powered off chip), then it could be the power supply current limit. Fix it (possibly to 8A current limit) and uncomment the powerchip line back in config file.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.. _Jungfrau Troubleshooting Sync Slaves Cannot Stop:
|
||||||
|
|
||||||
|
Cannot stop slaves in sync mode
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#. If cabling is accessible, ensure termination board and flatband cable between the masters and the slaves are connnected properly. Then try to stop.
|
||||||
|
#. If cabling is inaccessible, unsync first so that the slaves can get the stop directly from the client using the command. Then, don't use sync mode until the cabling is fixed.
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# unsync, slaves command will fail as it is still in waiting state
|
||||||
|
sls_detector_put sync 0
|
||||||
|
|
||||||
|
# stop should now be successful as master does not determine the stop anymore
|
||||||
|
sls_detector_put stop
|
||||||
|
@ -1673,6 +1673,11 @@ class Detector(CppDetectorApi):
|
|||||||
def sync(self):
|
def sync(self):
|
||||||
"""
|
"""
|
||||||
[Jungfrau][Moench] Enables or disables synchronization between modules.
|
[Jungfrau][Moench] Enables or disables synchronization between modules.
|
||||||
|
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
Sync mode requires at least one master configured. Also requires flatband cabling between master and slave with termination board.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return self.getSynchronization()
|
return self.getSynchronization()
|
||||||
|
|
||||||
|
@ -216,7 +216,10 @@ class Detector {
|
|||||||
/** [Jungfrau][Moench] **/
|
/** [Jungfrau][Moench] **/
|
||||||
Result<bool> getSynchronization(Positions pos = {}) const;
|
Result<bool> getSynchronization(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench] */
|
/** [Jungfrau][Moench] Sync mode requires at least one master configured.
|
||||||
|
Also requires flatband cabling between master and slave with
|
||||||
|
termination board.
|
||||||
|
*/
|
||||||
void setSynchronization(bool value);
|
void setSynchronization(bool value);
|
||||||
|
|
||||||
/** [Gotthard2][Mythen3] */
|
/** [Gotthard2][Mythen3] */
|
||||||
|
@ -1543,7 +1543,9 @@ class CmdProxy {
|
|||||||
INTEGER_COMMAND_SET_NOID_GET_ID(
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
sync, getSynchronization, setSynchronization, StringTo<int>,
|
sync, getSynchronization, setSynchronization, StringTo<int>,
|
||||||
"[0, 1]\n\t[Jungfrau][Moench] Enables or disables "
|
"[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>,
|
INTEGER_COMMAND_VEC_ID(row, getRow, setRow, StringTo<int>,
|
||||||
"[value]\n\tSet Detector row (udp header) to value. "
|
"[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> masters;
|
||||||
std::vector<int> slaves;
|
std::vector<int> slaves;
|
||||||
getMasterSlaveList(pos, masters, slaves);
|
getMasterSlaveList(pos, masters, slaves);
|
||||||
|
if (masters.empty()) {
|
||||||
|
throw RuntimeError("Cannot start acquisition in sync mode. No "
|
||||||
|
"master module found");
|
||||||
|
}
|
||||||
if (!slaves.empty()) {
|
if (!slaves.empty()) {
|
||||||
Parallel(&Module::startAcquisition, slaves);
|
Parallel(&Module::startAcquisition, slaves);
|
||||||
}
|
}
|
||||||
if (!masters.empty()) {
|
if (blocking) {
|
||||||
Parallel((blocking ? &Module::startAndReadAll
|
Parallel(&Module::startAndReadAll, masters);
|
||||||
: &Module::startAcquisition),
|
// ensure all status normal (slaves not blocking)
|
||||||
masters);
|
// 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
|
// all in parallel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user