diff --git a/LambdaApp/Db/Makefile b/LambdaApp/Db/Makefile index d2d4926..3976bbc 100644 --- a/LambdaApp/Db/Makefile +++ b/LambdaApp/Db/Makefile @@ -13,6 +13,8 @@ include $(TOP)/configure/CONFIG DB += ADLambda.template DB += LambdaModule.template +DB += ADLambda_settings.req + #------------------------------------------- # If .db template is not named *.template add # _TEMPLATE = diff --git a/LambdaApp/op/ui/LambdaBase.ui b/LambdaApp/op/ui/LambdaBase.ui index c4bb181..22f6600 100644 --- a/LambdaApp/op/ui/LambdaBase.ui +++ b/LambdaApp/op/ui/LambdaBase.ui @@ -136,48 +136,6 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} LambdaReadout.adl - - - - 605 - 10 - 100 - 22 - - - - - IOC - - - - 223 - 223 - 223 - - - - - 53 - 132 - 0 - - - - 1 - - - 8idLambda.ui - - - - - - caRowColMenu::Menu - - - false - - @@ -650,13 +608,13 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} - netCDF file #1;TIFF file #1;JPEG file #1;NeXus file #1;Magick file #1;HDF5 file #1;Null file #1;PipeWriterPlugin;Sparse Plugin 0;Sparse Plugin 1;Sparse Plugin 2;Sparse Plugin 3;IMM File + netCDF file #1;TIFF file #1;JPEG file #1;NeXus file #1;Magick file #1;HDF5 file #1;Null file #1 - NDFileNetCDF.adl;NDFileTIFF.adl;NDFileJPEG.adl;NDFileNexus.adl;NDFileMagick.adl;NDFileHDF5.adl;NDFileNull.adl;NDPluginPipeWriter.adl;NDSparse.adl;NDSparse.adl;NDSparse.adl;NDSparse.adl;NDFileIMM.adl + NDFileNetCDF.adl;NDFileTIFF.adl;NDFileJPEG.adl;NDFileNexus.adl;NDFileMagick.adl;NDFileHDF5.adl;NDFileNull.adl - P=$(P), R=netCDF1:, EXT=nc;P=$(P), R=TIFF1:, EXT=tif;P=$(P), R=JPEG1:, EXT=jpg;P=$(P), R=Nexus1:, EXT=h5;P=$(P), R=Magick1:, EXT=tif;P=$(P), R=HDF1:, EXT=h5;P=$(P), R=Null1:, EXT=null;P=$(P), R=PW1:;P=$(P), R=Sparse0:;P=$(P), R=Sparse1:;P=$(P), R=Sparse2:;P=$(P), R=Sparse3:;P=$(P), R=IMM1:, EXT=imm + P=$(P), R=netCDF1:, EXT=nc;P=$(P), R=TIFF1:, EXT=tif;P=$(P), R=JPEG1:, EXT=jpg;P=$(P), R=Nexus1:, EXT=h5;P=$(P), R=Magick1:, EXT=tif;P=$(P), R=HDF1:, EXT=h5;P=$(P), R=Null1:, EXT=null caRowColMenu::Menu @@ -1257,7 +1215,6 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} caInclude_0 caInclude_1 caInclude_2 - carelateddisplay_2 cagraphics caLabel_6 calabel diff --git a/LambdaApp/op/ui/LambdaReadout.ui b/LambdaApp/op/ui/LambdaReadout.ui index 4a746e1..3f06e76 100644 --- a/LambdaApp/op/ui/LambdaReadout.ui +++ b/LambdaApp/op/ui/LambdaReadout.ui @@ -338,7 +338,7 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} - 29 + 30 105 180 20 @@ -572,7 +572,7 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} - 10 + 105 -1 90 20 @@ -656,32 +656,8 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} caLineEdit::string - - - - 120 - 0 - 80 - 20 - - - - $(P)$(R)DataType - - - caMenu::Static - - - - 115 - 223 - 255 - - - caLineEdit_7 caLabel_8 - camenu @@ -970,11 +946,6 @@ QPushButton::menu-indicator {image: url(none.png); width: 0} - - caMenu - QComboBox -
caMenu
-
caRelatedDisplay QWidget diff --git a/LambdaApp/src/ADLambda.cpp b/LambdaApp/src/ADLambda.cpp index aa26bb2..bc6412e 100644 --- a/LambdaApp/src/ADLambda.cpp +++ b/LambdaApp/src/ADLambda.cpp @@ -120,8 +120,8 @@ configFileName(configPath) createParam( LAMBDA_EnergyThresholdString, asynParamFloat64, &LAMBDA_EnergyThreshold); createParam( LAMBDA_DualThresholdString, asynParamFloat64, &LAMBDA_DualThreshold); - setDoubleParam(LAMBDA_EnergyThreshold, 0.0); - setDoubleParam(LAMBDA_DualThreshold, 0.0); + setDoubleParam(LAMBDA_EnergyThreshold, 40.0); + setDoubleParam(LAMBDA_DualThreshold, 40.0); /* ************** @@ -730,9 +730,7 @@ void ADLambda::acquireThread(int index) NDArray* output; - this->lock(); - epicsTimeStamp currentTime = epicsTime::getCurrent(); - + this->lock(); // If there's not an NDArray stored for this frame_no, create one if (this->hasDecoder) { @@ -740,8 +738,7 @@ void ADLambda::acquireThread(int index) output->uniqueId = frame_no; output->getInfo(&info); - output->timeStamp = currentTime.secPastEpoch + currentTime.nsec / ONE_BILLION; - updateTimeStamp(&(output->epicsTS)); + updateTimeStamps(output); memset((char*) output->pData, 0, imagedims_output[0] * imagedims_output[1] * info.bytesPerElement); @@ -752,8 +749,8 @@ void ADLambda::acquireThread(int index) NDArray* new_frame = pNDArrayPool->alloc(2, imagedims_output, (NDDataType_t) datatype, 0, NULL); new_frame->uniqueId = 0; new_frame->getInfo(&info); - new_frame->timeStamp = currentTime.secPastEpoch + currentTime.nsec / ONE_BILLION; - updateTimeStamp(&(new_frame->epicsTS)); + + updateTimeStamps(new_frame); memset((char*) new_frame->pData, 0, imagedims_output[0] * imagedims_output[1] * info.bytesPerElement); diff --git a/iocs/LambdaIOC/iocBoot/iocLambda/ADLambda.iocsh b/iocs/LambdaIOC/iocBoot/iocLambda/ADLambda.iocsh index b25468b..ae17287 100644 --- a/iocs/LambdaIOC/iocBoot/iocLambda/ADLambda.iocsh +++ b/iocs/LambdaIOC/iocBoot/iocLambda/ADLambda.iocsh @@ -2,7 +2,7 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(ADCORE)/db") #LambdaConfig("Port Name", "Path to config", # of modules, # of threads to assign per module) -LambdaConfig("$(PORT)", "system.yml", 3) +LambdaConfig("$(PORT)", "/etc/opt/xsp/system.yml", $(NUM_MODULES=1)) dbLoadRecords("$(ADLAMBDA)/db/ADLambda.template","P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1") dbLoadRecords("$(ADLAMBDA)/db/LambdaModule.template", "P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1") @@ -15,20 +15,5 @@ dbLoadRecords("$(ADCORE)/db/NDPluginBase.template","P=$(PREFIX),R=image1:,PORT=I # The stitched image is 1558 x 1813 = 2,824,654 dbLoadRecords("$(ADCORE)/db/NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=2824654") -# Create a standard arrays plugin, set it to get data from Driver. -NDStdArraysConfigure("ImageA", 3, 0, "$(PORT)", 0) -dbLoadRecords("$(ADCORE)/db/NDPluginBase.template","P=$(PREFIX),R=imageA:,PORT=ImageA,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=0") -dbLoadRecords("$(ADCORE)/db/NDStdArrays.template", "P=$(PREFIX),R=imageA:,PORT=ImageA,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=802896") - -# Create a standard arrays plugin, set it to get data from Driver. -NDStdArraysConfigure("ImageB", 3, 0, "$(PORT)", 1) -dbLoadRecords("$(ADCORE)/db/NDPluginBase.template","P=$(PREFIX),R=imageB:,PORT=ImageB,ADDR=1,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=1") -dbLoadRecords("$(ADCORE)/db/NDStdArrays.template", "P=$(PREFIX),R=imageB:,PORT=ImageB,ADDR=1,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=802896") - -# Create a standard arrays plugin, set it to get data from Driver. -NDStdArraysConfigure("ImageC", 3, 0, "$(PORT)", 2) -dbLoadRecords("$(ADCORE)/db/NDPluginBase.template","P=$(PREFIX),R=imageC:,PORT=ImageC,ADDR=2,TIMEOUT=1,NDARRAY_PORT=$(PORT),NDARRAY_ADDR=2") -dbLoadRecords("$(ADCORE)/db/NDStdArrays.template", "P=$(PREFIX),R=imageC:,PORT=ImageC,ADDR=2,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int16,FTVL=SHORT,NELEMENTS=802896") - # Load all other plugins using commonPlugins.cmd iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "QSIZE=30, XSIZE=2048, YSIZE=2048, NCHANS=2048, CBUFFS=1000") diff --git a/iocs/LambdaIOC/iocBoot/iocLambda/ADLambda_settings.req b/iocs/LambdaIOC/iocBoot/iocLambda/ADLambda_settings.req deleted file mode 100755 index 446df02..0000000 --- a/iocs/LambdaIOC/iocBoot/iocLambda/ADLambda_settings.req +++ /dev/null @@ -1,2 +0,0 @@ -$(P)$(R)EnergyThreshold -$(P)$(R)OperatingMode diff --git a/iocs/LambdaIOC/iocBoot/iocLambda/st.cmd b/iocs/LambdaIOC/iocBoot/iocLambda/st.cmd index 41e73cf..129f2b1 100755 --- a/iocs/LambdaIOC/iocBoot/iocLambda/st.cmd +++ b/iocs/LambdaIOC/iocBoot/iocLambda/st.cmd @@ -6,9 +6,9 @@ dbLoadDatabase("$(TOP)/dbd/LambdaApp.dbd") LambdaApp_registerRecordDeviceDriver(pdbbase) -iocshLoad("ADLambda.iocsh", "PREFIX=LAMBDA1:, PORT=LAMBDA1") +iocshLoad("ADLambda.iocsh", "PREFIX=LAMBDA1:, PORT=LAMBDA1, NUM_MODULES=3") -set_requestfile_path("$(ADLAMBDA)/LambdaApp/Db") +set_requestfile_path("$(ADLAMBDA)/db") ########## iocInit()