(Modify) Logic to #StopAfterCycles for cont. mode

This commit is contained in:
Jim Larsson
2024-02-27 15:44:07 +01:00
committed by Iocuser
parent ed1845acf2
commit 2562f3d732
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ APPCMDS := $(APP)/cmds
#
############################################################################
TEMPLATES += $(wildcard $(APPDB)/*.db)
# TEMPLATES += $(wildcard $(APPDB)/*.db)
TEMPLATES += $(wildcard $(ADCORE_DIR)/*.db)
# USR_INCLUDES += -I$(where_am_I)$(APPSRC)
+2 -1
View File
@@ -217,10 +217,11 @@ record(ai, "$(P)$(R)#NCyclesPartial") {
## Stop sequence after N cycles
record(calcout, "$(P)$(R)#StopAfterCycles") {
field(DESC, "StopAfterCycles")
field(CALC, "C < (A + B)")
field(CALC, "(C < (A + B)) || (D=2)")
field(INPA, "$(P)$(R)#NCyclesPartial NPP")
field(INPB, "$(P)$(R)NumImages_RBV NPP")
field(INPC, "$(P)$(R)Cycle-Cnt CPP")
field(INPD, "$(P)$(R)ImageMode_RBV NPP")
field(OOPT, "When Zero")
field(OUT, "$(P)$(R)#SoftSeqDisable PP")
}
+2 -1
View File
@@ -929,9 +929,10 @@ void Orca::imageTask(){
getDoubleParam(ADAcquirePeriod, &acqusitionRate);
maxAcqusitionTime = acqusitionRate * 2;
maxAcqusitionTime = acqusitionRate * 2;
epicsTimeGetCurrent(&currentAcqTime);
if (epicsTimeDiffInSeconds(&currentAcqTime, &prevAcqTime) > maxAcqusitionTime) {
printf("[DEBUG]::maxAcqusitionTime %f\n", maxAcqusitionTime);
setShutter(0);
stopAcquire();
setIntegerParam(ADAcquire, 0);