Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c951811fc | ||
|
|
db6ce72e1d | ||
|
|
081d5bfdd5 | ||
|
|
634c3b12ba | ||
|
|
4bc89278fe |
122
ADOrca.Makefile
122
ADOrca.Makefile
@@ -22,136 +22,46 @@
|
|||||||
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
include $(E3_REQUIRE_TOOLS)/driver.makefile
|
include $(E3_REQUIRE_TOOLS)/driver.makefile
|
||||||
|
|
||||||
ifneq ($(strip $(ADCORE_DEP_VERSION)),)
|
|
||||||
adcore_VERSION=$(ADCORE_DEP_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(strip $(BUSY_DEP_VERSION)),)
|
|
||||||
busy_VERSION=$(BUSY_DEP_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any required modules here that come from startup scripts, etc.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
REQUIRED += adcore
|
REQUIRED += adcore
|
||||||
REQUIRED += busy
|
REQUIRED += busy
|
||||||
REQUIRED += seq
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# If you want to exclude any architectures:
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
EXCLUDE_ARCHS += linux-ppc64e6500
|
EXCLUDE_ARCHS += linux-ppc64e6500
|
||||||
|
|
||||||
|
APP := ADOrcaApp
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Relevant directories to point to files
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
APP := ADOrcaApp
|
|
||||||
APPDB := $(APP)/Db
|
APPDB := $(APP)/Db
|
||||||
APPSRC := $(APP)/src
|
APPSRC := $(APP)/src
|
||||||
APPCMDS := $(APP)/cmds
|
APPCMDS := $(APP)/cmds
|
||||||
|
|
||||||
############################################################################
|
SUPPORT:= support/dcamsdk4/lib/linux-x86_64
|
||||||
#
|
|
||||||
# Add any files that should be copied to $(module)/Db
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# TEMPLATES += $(wildcard $(APPDB)/*.db)
|
TEMPLATES += $(wildcard $(APPDB)/*.db)
|
||||||
TEMPLATES += $(wildcard $(ADCORE_DIR)/*.db)
|
TEMPLATES += $(wildcard $(ADCORE_DIR)/*.db)
|
||||||
|
TEMPLATES += $(wildcard $(APPDB)/*.template)
|
||||||
|
|
||||||
# USR_INCLUDES += -I$(where_am_I)$(APPSRC)
|
|
||||||
# USR_INCLUDES += -I $(E3_ADCORE_LOCATION)/ADCore/ADApp/ADSrc
|
|
||||||
# USR_INCLUDES += -I $(E3_ASYN_LOCATION)/asyn/interfaces
|
|
||||||
# USR_INCLUDES += -I $(E3_ASYN_LOCATION)/asyn/asynDriver
|
|
||||||
# USR_INCLUDES += -I $(E3_ASYN_LOCATION)/asyn/asynPortDriver
|
|
||||||
|
|
||||||
# USR_INCLUDES += -DLINUX -I/home/iocuser/dcamsdk4/inc/
|
|
||||||
USR_INCLUDES += -DLINUX -I ../support/dcamsdk4/inc/
|
USR_INCLUDES += -DLINUX -I ../support/dcamsdk4/inc/
|
||||||
# USR_INCLUDES += -I ../support/dcamsdk4/misc/
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any files that need to be compiled (e.g. .c, .cpp, .st, .stt)
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# SOURCES += $(APPSRC)/ADOrcaMain.cpp
|
|
||||||
SOURCES += $(APPSRC)/orca.cpp
|
SOURCES += $(APPSRC)/orca.cpp
|
||||||
# SOURCES += support/dcamsdk4/misc/common.cpp
|
DBDS += $(APPSRC)/orca.dbd
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any .dbd files that should be included (e.g. from user-defined functions, etc.)
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
DBDS += $(APPSRC)/orca.dbd
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any header files that should be included in the install (e.g.
|
|
||||||
# StreamDevice or asyn header files that are used by other modules)
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# HEADERS += /home/iocuser/dcamsdk4/inc
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any startup scripts that should be installed in the base directory
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
SCRIPTS += $(wildcard iocsh/*.iocsh)
|
SCRIPTS += $(wildcard iocsh/*.iocsh)
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# If you have any .substitution files, and template files, add them here.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# SUBS=$(wildcard $(APPDB)/*.substitutions)
|
|
||||||
TMPS=$(wildcard $(APPDB)/*.template)
|
TMPS=$(wildcard $(APPDB)/*.template)
|
||||||
|
|
||||||
|
USR_LDFLAGS += -L$(PREFIX)/lib/ -ldcamapi
|
||||||
|
LIB_SYS_LIBS += dcamapi
|
||||||
|
|
||||||
|
VENDOR_LIBS += $(SUPPORT)/libdcamapi.so.4
|
||||||
|
VENDOR_LIBS += $(SUPPORT)/libdcamapi.so.4.0.6269
|
||||||
|
VENDOR_LIBS += $(SUPPORT)/libdcamapi.so
|
||||||
|
|
||||||
USR_DBFLAGS += -I . -I ..
|
USR_DBFLAGS += -I . -I ..
|
||||||
USR_DBFLAGS += -I $(E3_ADCORE_LOCATION)/db
|
USR_DBFLAGS += -I $(E3_ADCORE_LOCATION)/db
|
||||||
USR_DBFLAGS += -I $(EPICS_BASE)/db
|
USR_DBFLAGS += -I $(EPICS_BASE)/db
|
||||||
USR_DBFLAGS += -I $(APPDB)
|
USR_DBFLAGS += -I $(APPDB)
|
||||||
|
|
||||||
USR_LDFLAGS += -L$(PWD)/support/dcamsdk4/lib/linux-x86_64 -ldcamapi
|
vlibs: $(VENDOR_LIBS)
|
||||||
#USR_LDFLAGS += -L/usr/local/lib -ldcamapi
|
|
||||||
|
|
||||||
db: $(SUBS) $(TMPS)
|
$(VENDOR_LIBS):
|
||||||
|
$(QUIET) install -m 755 $@ $(PREFIX)/lib/
|
||||||
|
|
||||||
$(SUBS):
|
.PHONY: $(VENDOR_LIBS) vlibs
|
||||||
@printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
|
|
||||||
@rm -f $(basename $(@)).db.d $(basename $(@)).db
|
|
||||||
@$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db -S $@ > $(basename $(@)).db.d
|
|
||||||
@$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db -S $@
|
|
||||||
|
|
||||||
$(TMPS):
|
|
||||||
@printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
|
|
||||||
@rm -f $(basename $(@)).db.d $(basename $(@)).db
|
|
||||||
@$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db $@ > $(basename $(@)).db.d
|
|
||||||
@$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db $@
|
|
||||||
|
|
||||||
.PHONY: db $(SUBS) $(TMPS)
|
|
||||||
|
|
||||||
|
|
||||||
vlibs:
|
|
||||||
|
|
||||||
.PHONY: vlibs
|
|
||||||
|
|||||||
4
ADOrcaApp/Db/AlarmsOverride.template
Normal file
4
ADOrcaApp/Db/AlarmsOverride.template
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Removing undesired alarms from aborted state
|
||||||
|
record(mbbi, "$(P)$(R)DetectorState_RBV") {
|
||||||
|
field(TESV, "NO_ALARM")
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
include "ADBase.template"
|
include "ADBase.template"
|
||||||
|
include "AlarmsOverride.template"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Note: The following are records defined in ADBase.template. #
|
# Note: The following are records defined in ADBase.template. #
|
||||||
|
|||||||
@@ -779,6 +779,7 @@ void Orca::imageTask(){
|
|||||||
int evr_counts_since_last_start = 0;
|
int evr_counts_since_last_start = 0;
|
||||||
int evr_counts_since_last_start_previous = 0;
|
int evr_counts_since_last_start_previous = 0;
|
||||||
int evr_trigger_dropped = 0;
|
int evr_trigger_dropped = 0;
|
||||||
|
int acqStatus;
|
||||||
uint64_t prevAcquisitionCount = 0;
|
uint64_t prevAcquisitionCount = 0;
|
||||||
DCAMCAP_TRANSFERINFO captransferinfo;
|
DCAMCAP_TRANSFERINFO captransferinfo;
|
||||||
epicsTimeStamp prevAcqTime, currentAcqTime;
|
epicsTimeStamp prevAcqTime, currentAcqTime;
|
||||||
@@ -929,10 +930,12 @@ void Orca::imageTask(){
|
|||||||
|
|
||||||
|
|
||||||
getDoubleParam(ADAcquirePeriod, &acqusitionRate);
|
getDoubleParam(ADAcquirePeriod, &acqusitionRate);
|
||||||
|
getIntegerParam(ADStatus, &acqStatus);
|
||||||
maxAcqusitionTime = acqusitionRate * 2;
|
maxAcqusitionTime = acqusitionRate * 2;
|
||||||
epicsTimeGetCurrent(¤tAcqTime);
|
epicsTimeGetCurrent(¤tAcqTime);
|
||||||
if (epicsTimeDiffInSeconds(¤tAcqTime, &prevAcqTime) > maxAcqusitionTime) {
|
if ((epicsTimeDiffInSeconds(¤tAcqTime, &prevAcqTime) > maxAcqusitionTime) &&
|
||||||
printf("[DEBUG]::maxAcqusitionTime %f\n", maxAcqusitionTime);
|
acqStatus != ADStatusAborted) {
|
||||||
|
printf("[DEBUG]::maxAcqusitionTime %f\n", maxAcqusitionTime);
|
||||||
setShutter(0);
|
setShutter(0);
|
||||||
stopAcquire();
|
stopAcquire();
|
||||||
setIntegerParam(ADAcquire, 0);
|
setIntegerParam(ADAcquire, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user