From bbfcd3a1692e3c6e3c65a31f410cef10251426e5 Mon Sep 17 00:00:00 2001 From: Huw Date: Mon, 23 Feb 2026 14:37:16 +0000 Subject: [PATCH] Scan start failed message added Added 'scan start failed' message for when labview ignores the scan start command --- merlinApp/src/merlinDetector.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/merlinApp/src/merlinDetector.cpp b/merlinApp/src/merlinDetector.cpp index fc1c7ee..4ba61a3 100644 --- a/merlinApp/src/merlinDetector.cpp +++ b/merlinApp/src/merlinDetector.cpp @@ -1115,12 +1115,12 @@ asynStatus merlinDetector::writeInt32(asynUser *pasynUser, epicsInt32 value) else // a standard image acquisition (or profile acquisition) { epicsSnprintf(strVal, MPX_MAXLINE, "%d", imagesToAcquire); - cmdConnection->mpxSet(MPXVAR_NUMFRAMESTOACQUIRE, strVal, + status = cmdConnection->mpxSet(MPXVAR_NUMFRAMESTOACQUIRE, strVal, Labview_DEFAULT_TIMEOUT); if (profileMaskParm & (MPXPROFILES_IMAGE == MPXPROFILES_IMAGE)) { - cmdConnection->mpxCommand(MPXCMD_STARTACQUISITION, + status = cmdConnection->mpxCommand(MPXCMD_STARTACQUISITION, Labview_DEFAULT_TIMEOUT); } else @@ -1129,6 +1129,12 @@ asynStatus merlinDetector::writeInt32(asynUser *pasynUser, epicsInt32 value) Labview_DEFAULT_TIMEOUT); } } + if (status) + { + setIntegerParam(ADStatus, ADStatusError); + setStringParam(ADStatusMessage, "Scan start failed"); + status = setIntegerParam(ADAcquire, 0); + } } if (!value && (adstatus == ADStatusAcquire)) {