Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions LambdaApp/Db/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ include $(TOP)/configure/CONFIG
DB += ADLambda.template
DB += LambdaModule.template

DB += ADLambda_settings.req

#-------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_TEMPLATE = <templatename>
Expand Down
49 changes: 3 additions & 46 deletions LambdaApp/op/ui/LambdaBase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -136,48 +136,6 @@ QPushButton::menu-indicator {image: url(none.png); width: 0}
<string>LambdaReadout.adl</string>
</property>
</widget>
<widget class="caRelatedDisplay" name="carelateddisplay_2">
<property name="geometry">
<rect>
<x>605</x>
<y>10</y>
<width>100</width>
<height>22</height>
</rect>
</property>
<property name="label">
<string notr="true">- IOC</string>
</property>
<property name="foreground">
<color>
<red>223</red>
<green>223</green>
<blue>223</blue>
</color>
</property>
<property name="background">
<color>
<red>53</red>
<green>132</green>
<blue>0</blue>
</color>
</property>
<property name="labels">
<string>1</string>
</property>
<property name="files">
<string>8idLambda.ui</string>
</property>
<property name="args">
<string/>
</property>
<property name="stackingMode" stdset="0">
<enum>caRowColMenu::Menu</enum>
</property>
<property name="removeParent" stdset="0">
<string>false</string>
</property>
</widget>
<widget class="caGraphics" name="cagraphics">
<property name="geometry">
<rect>
Expand Down Expand Up @@ -650,13 +608,13 @@ QPushButton::menu-indicator {image: url(none.png); width: 0}
</color>
</property>
<property name="labels">
<string>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</string>
<string>netCDF file #1;TIFF file #1;JPEG file #1;NeXus file #1;Magick file #1;HDF5 file #1;Null file #1</string>
</property>
<property name="files">
<string>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</string>
<string>NDFileNetCDF.adl;NDFileTIFF.adl;NDFileJPEG.adl;NDFileNexus.adl;NDFileMagick.adl;NDFileHDF5.adl;NDFileNull.adl</string>
</property>
<property name="args">
<string>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</string>
<string>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</string>
</property>
<property name="stackingMode" stdset="0">
<enum>caRowColMenu::Menu</enum>
Expand Down Expand Up @@ -1257,7 +1215,6 @@ QPushButton::menu-indicator {image: url(none.png); width: 0}
<zorder>caInclude_0</zorder>
<zorder>caInclude_1</zorder>
<zorder>caInclude_2</zorder>
<zorder>carelateddisplay_2</zorder>
<zorder>cagraphics</zorder>
<zorder>caLabel_6</zorder>
<zorder>calabel</zorder>
Expand Down
33 changes: 2 additions & 31 deletions LambdaApp/op/ui/LambdaReadout.ui
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ QPushButton::menu-indicator {image: url(none.png); width: 0}
<widget class="caLabel" name="caLabel_4">
<property name="geometry">
<rect>
<x>29</x>
<x>30</x>
<y>105</y>
<width>180</width>
<height>20</height>
Expand Down Expand Up @@ -572,7 +572,7 @@ QPushButton::menu-indicator {image: url(none.png); width: 0}
<widget class="caLabel" name="caLabel_8">
<property name="geometry">
<rect>
<x>10</x>
<x>105</x>
<y>-1</y>
<width>90</width>
<height>20</height>
Expand Down Expand Up @@ -656,32 +656,8 @@ QPushButton::menu-indicator {image: url(none.png); width: 0}
<enum>caLineEdit::string</enum>
</property>
</widget>
<widget class="caMenu" name="camenu">
<property name="geometry">
<rect>
<x>120</x>
<y>0</y>
<width>80</width>
<height>20</height>
</rect>
</property>
<property name="channel" stdset="0">
<string notr="true">$(P)$(R)DataType</string>
</property>
<property name="colorMode">
<enum>caMenu::Static</enum>
</property>
<property name="background">
<color>
<red>115</red>
<green>223</green>
<blue>255</blue>
</color>
</property>
</widget>
<zorder>caLineEdit_7</zorder>
<zorder>caLabel_8</zorder>
<zorder>camenu</zorder>
</widget>
<widget class="caLineEdit" name="caLineEdit_8">
<property name="geometry">
Expand Down Expand Up @@ -970,11 +946,6 @@ QPushButton::menu-indicator {image: url(none.png); width: 0}
</widget>
</widget>
<customwidgets>
<customwidget>
<class>caMenu</class>
<extends>QComboBox</extends>
<header>caMenu</header>
</customwidget>
<customwidget>
<class>caRelatedDisplay</class>
<extends>QWidget</extends>
Expand Down
15 changes: 6 additions & 9 deletions LambdaApp/src/ADLambda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);


/* **************
Expand Down Expand Up @@ -730,18 +730,15 @@ 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)
{
output = pNDArrayPool->alloc(2, imagedims_output, (NDDataType_t) datatype, 0, NULL);
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);

Expand All @@ -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);

Expand Down
17 changes: 1 addition & 16 deletions iocs/LambdaIOC/iocBoot/iocLambda/ADLambda.iocsh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
2 changes: 0 additions & 2 deletions iocs/LambdaIOC/iocBoot/iocLambda/ADLambda_settings.req

This file was deleted.

4 changes: 2 additions & 2 deletions iocs/LambdaIOC/iocBoot/iocLambda/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down