areaDetector / ADPICam

areaDetector driver for Princeton Instruments cameras using the PICam library
https://areadetector.github.io/areaDetector/ADPICam/PICamDoc.html
3 stars 4 forks source link

will this IOC work on Ubuntu 18.0.4? #18

Closed LeeYangLBLBCS closed 1 year ago

LeeYangLBLBCS commented 1 year ago

PICam driver says it only support Centos. But PICam support said it should work on Ubuntu, regardless. Has anyone succeeded with Ubuntu 18.0.4 (or later)?

MarkRivers commented 1 year ago

I have not tried it. But the main incompatibility of vendor libraries on Linux is just the version of gcc that they are built with. If the vendor library is built with a newer version of gcc than the one on your OS then it won't work. However, if you can compile and run the executable on Ubuntu 18 then my prediction is that it will work OK.

LeeYangLBLBCS commented 1 year ago

gcc on my centos 7 is old, (4.8.5.20150623). Should I upgrade gcc? (is that a good thing to do)? I havn't figured out what the vendor's gcc is yet.

LeeYangLBLBCS commented 1 year ago

PICam support says gcc 4.8.5 is what they use, which is the same gcc installed on centos 7. However I'm getting compile errors, in attached compile output log: ADPICam.compile.txt

LeeYangLBLBCS commented 1 year ago

The compile errors appear to be related to missing STD: ../ADPICam.cpp:3328:27: error: ‘parameterExistsMap’ was not declared in this scope driverParameter = parameterExistsMap.at(parameter); ^ ../ADPICam.cpp:3324:24: warning: unused variable ‘functionName’ [-Wunused-variable] static const char functionName = "piSetParameterExists"; ^ ../ADPICam.cpp: In member function ‘asynStatus ADPICam::piSetParameterRelevance(asynUser, PicamParameter, int)’: ../ADPICam.cpp:3355:27: error: ‘parameterRelevantMap’ was not declared in this scope driverParameter = parameterRelevantMap.at(parameter); ^

MarkRivers commented 1 year ago

The error is this:

../ADPICam.cpp:2004:10: error: ‘unordered_map’ is not a member of ‘std’

If you look here https://en.cppreference.com/w/cpp/container/unordered_map you will see that unordered_map was added in C++11.

C++11 is not the default in g++ 4.8.5, but it is available. You just need to add this line to the Makefile:

USR_CXXFLAGS_Linux += -std=c++11

LeeYangLBLBCS commented 1 year ago

thanks. I added this line USR_CXXFLAGS_Linux += -std=c++11 to the following two files, ADPICam/PICamApp/src/Makefile ADPICam/PICamSupport/Makefile The problem persists.

MarkRivers commented 1 year ago

I just made a lot of fixes to ADPICam.cpp and pushed to Github. These fix many compiler warnings, so it is now much easier to see the actual compiler errors.

I tested compiling on Centos 7, i.e. gcc 4.8.5. This is what I get when I use the master branch of the Makefile, i.e. without directing to use C++11.

/usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -D_X86_64_  -DUNIX  -Dlinux      -O3 -g   -Wall      -mtune=generic      -m64  -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include      -I/corvette/home/epics/devel/asyn-4-43/include     -I/corvette/home/epics/devel/areaDetector-3-12-1/ADSupport/include/os/Linux -I/corvette/home/epics/devel/areaDetector-3-12-1/ADSupport/include   -I/corvette/home/epics/devel/areaDetector-3-12-1/ADCore/include -I/corvette/usr/local/epics-devel/base-7.0.7/include/compiler/gcc -I/corvette/usr/local/epics-devel/base-7.0.7/include/os/Linux -I/corvette/usr/local/epics-devel/base-7.0.7/include        -c ../ADPICam.cpp
In file included from /usr/include/c++/4.8.2/unordered_map:35:0,
                 from ../ADPICam.h:16,
                 from ../ADPICam.cpp:19:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
In file included from ../ADPICam.cpp:19:0:
../ADPICam.h:546:33: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
     bool imageThreadKeepAlive = true;
                                 ^
../ADPICam.h:553:5: error: 'unordered_map' in namespace 'std' does not name a type
     std::unordered_map<PicamParameter, int> parameterExistsMap;
     ^
../ADPICam.h:554:5: error: 'unordered_map' in namespace 'std' does not name a type
     std::unordered_map<PicamParameter, int> parameterRelevantMap;
     ^
../ADPICam.h:555:5: error: 'unordered_map' in namespace 'std' does not name a type
     std::unordered_map<PicamParameter, int> parameterValueMap;

I then changed the Makefile to enable C++11 as follows:

diff --git a/PICamApp/src/Makefile b/PICamApp/src/Makefile
index 7b8eef9..831a319 100644
--- a/PICamApp/src/Makefile
+++ b/PICamApp/src/Makefile
@@ -7,6 +7,8 @@ ifeq (windows-x64, $(findstring windows-x64, $(T_A)))
 USR_CPPFLAGS += -D__X64
 endif

+USR_CXXFLAGS_Linux += -std=c++11
+
 LIBRARY_IOC_Linux = ADPICam
 LIBRARY_IOC_WIN32 = ADPICam
 LIB_SRCS += ADPICam.cpp

When I compile with that change I get very different errors:

make[1]: Entering directory `/home/epics/devel/areaDetector-3-12-1/ADPICam/PICamApp/src/O.linux-x86_64'
/usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -D_X86_64_  -DUNIX  -Dlinux      -O3 -g   -Wall     -std=c++11  -mtune=generic      -m64  -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include      -I/corvette/home/epics/devel/asyn-4-43/include     -I/corvette/home/epics/devel/areaDetector-3-12-1/ADSupport/include/os/Linux -I/corvette/home/epics/devel/areaDetector-3-12-1/ADSupport/include   -I/corvette/home/epics/devel/areaDetector-3-12-1/ADCore/include -I/corvette/usr/local/epics-devel/base-7.0.7/include/compiler/gcc -I/corvette/usr/local/epics-devel/base-7.0.7/include/os/Linux -I/corvette/usr/local/epics-devel/base-7.0.7/include        -c ../ADPICam.cpp
In file included from /usr/include/c++/4.8.2/bits/hashtable.h:35:0,
                 from /usr/include/c++/4.8.2/unordered_map:47,
                 from ../ADPICam.h:16,
                 from ../ADPICam.cpp:19:
/usr/include/c++/4.8.2/bits/hashtable_policy.h: In instantiation of 'struct std::__detail::_Hash_code_base<PicamParameter, std::pair<const PicamParameter, int>, std::__detail::_Select1st, std::hash<PicamParameter>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>':
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1402:10:   required from 'struct std::__detail::_Hashtable_base<PicamParameter, std::pair<const PicamParameter, int>, std::__detail::_Select1st, std::equal_to<PicamParameter>, std::hash<PicamParameter>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, false, true> >'
/usr/include/c++/4.8.2/bits/hashtable.h:174:11:   required from 'class std::_Hashtable<PicamParameter, std::pair<const PicamParameter, int>, std::allocator<std::pair<const PicamParameter, int> >, std::__detail::_Select1st, std::equal_to<PicamParameter>, std::hash<PicamParameter>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >'
/usr/include/c++/4.8.2/bits/unordered_map.h:100:18:   required from 'class std::unordered_map<PicamParameter, int>'
../ADPICam.h:553:45:   required from here
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1070:12: error: invalid use of incomplete type 'struct std::hash<PicamParameter>'
     struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2,
            ^
In file included from /usr/include/c++/4.8.2/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/random:41,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from ../ADPICam.cpp:11:
/usr/include/c++/4.8.2/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<PicamParameter>'
     struct hash;
            ^
In file included from /usr/include/c++/4.8.2/bits/hashtable.h:35:0,
                 from /usr/include/c++/4.8.2/unordered_map:47,
                 from ../ADPICam.h:16,
                 from ../ADPICam.cpp:19:
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1070:12: error: invalid use of incomplete type 'struct std::hash<PicamParameter>'
     struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2,
            ^
In file included from /usr/include/c++/4.8.2/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/random:41,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from ../ADPICam.cpp:11:
/usr/include/c++/4.8.2/bits/functional_hash.h:58:12: error: declaration of 'struct std::hash<PicamParameter>'
     struct hash;
            ^
In file included from /usr/include/c++/4.8.2/bits/hashtable.h:35:0,
                 from /usr/include/c++/4.8.2/unordered_map:47,
                 from ../ADPICam.h:16,
                 from ../ADPICam.cpp:19:
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1082:53: error: invalid use of incomplete type 'struct std::hash<PicamParameter>'
       using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>;
                                                     ^
In file included from /usr/include/c++/4.8.2/bits/basic_string.h:3033:0,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/random:41,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from ../ADPICam.cpp:11:

So using C++11 fixes some problems, but not all. @LeeYangLBLBCS please get the master branch and see if you see the same thing.

It compiles fine on Centos 8 Stream, gcc 8.5.0.

MarkRivers commented 1 year ago

Note that this problem has nothing to do with the vendor library. The problem is because the EPICS driver is using std::unordered_map.

LeeYangLBLBCS commented 1 year ago

I pulled the latest from the repo, and got the similar errors, mostly. The whole error outputs are much longer than the ones you showed. I attached both with and without CXXFLAG output here. compile_error_CXXFLAG.txt compile_error_NO_CXXFLAG.txt

LeeYangLBLBCS commented 1 year ago

That's what PICam support told me yesterday. I've switched to Centos8, giving up on Centos7. Maybe the front page readme section should be modified to reflect the Centos7 problem?

On Tue, Jun 13, 2023 at 10:48 AM Mark Rivers @.***> wrote:

Note that this problem has nothing to do with the vendor library. The problem is because the EPICS driver is using std::unordered_map.

— Reply to this email directly, view it on GitHub https://github.com/areaDetector/ADPICam/issues/18#issuecomment-1589769553, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSYGNACDWNIWCEF3AK2I3TXLCRYJANCNFSM6AAAAAAZBEESPY . You are receiving this because you were mentioned.Message ID: @.***>

-- Lee Yang Lawrence Berkeley National Lab 1 Cyclotron Road, M/S 15R0217 Berkeley, California 97320 office:(510)486-7320

LeeYangLBLBCS commented 1 year ago

When I attempt to start ADPICam IOC on Centos8 Stream, using a PIcam model MTE3 camera, I got the following error: [root@1ee83a4b03bc iocPICam]# ../../bin/linux-x86_64/PICamApp st.cmd terminate called after throwing an instance of 'std::runtime_error' what(): Failed to create process lock (named: PrincetonInstruments::Pidi::PixisUsb::CrossLock) (open-file): errno is 2 I must be doing something fundamentally wrong. Any help would be appreciated.

MarkRivers commented 1 year ago

Does the PICAM SDK come with any example programs? If so, have you tried building and running those?

LeeYangLBLBCS commented 1 year ago

I switched to Ubuntu 18.04, since I compiled ADPICam on it also. The IOC startup proceeded a little further,
but the IOC couldn't find many template files, such as NDArrayBase.template, ADBase.template,
etc.
Those files are found at the following location:
/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/ADApp/Db/NDArrayBase.template
/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDArrayBase.template
/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/ADApp/Db/ADBase.template
/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/ADBase.template

../../bin/linux-x86_64/PICamApp st.cmd
errlogInit(20000)
< envPaths
epicsEnvSet("IOC","iocPICam")
epicsEnvSet("TOP","/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC")
epicsEnvSet("ADPICAM","/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC/../..")
epicsEnvSet("SUPPORT","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support")
epicsEnvSet("ASYN","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/asyn-R4-38")
epicsEnvSet("AREA_DETECTOR","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7")
epicsEnvSet("ADSUPPORT","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADSupport")
epicsEnvSet("ADCORE","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore")
epicsEnvSet("AUTOSAVE","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/autosave-R5-10")
epicsEnvSet("BUSY","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/busy-R1-7-2")
epicsEnvSet("CALC","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/calc-R3-7-4")
epicsEnvSet("SNCSEQ","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/seq-2-2-7")
epicsEnvSet("SSCAN","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/sscan-R2-11-3")
epicsEnvSet("DEVIOCSTATS","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/iocStats-3-1-16")
epicsEnvSet("STD","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/std-R3-6-1")
epicsEnvSet("EPICS_BASE","/opt/epics/base-7.0.4")
#epicsThreadSleep(20)
dbLoadDatabase("/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC/dbd/PICamApp.dbd")
PICamApp_registerRecordDeviceDriver(pdbbase) 
epicsEnvSet("PREFIX", "13PICAM1:")
epicsEnvSet("PORT",   "PICAMDET1")
epicsEnvSet("QSIZE",  "20")
epicsEnvSet("XSIZE",  "2048")
epicsEnvSet("YSIZE",  "2048")
epicsEnvSet("NCHANS", "2048")
# Create a PICam driver
# PICamConfig(const char *portName, IDType, IDValue, maxBuffers, size_t maxMemory, int priority, int stackSize)
# This is for a 
PICamConfig("PICAMDET1", 0, 0, 0, 0)
epicsMutex pthread_mutex_unlock epicsMutexOsdUnlock failed: error Operation not permitted
epicsMutex pthread_mutex_unlock epicsMutexOsdUnlock failed: error Operation not permitted
#PICamAddDemoCamera("PIXIS: 100F")
#PICamAddDemoCamera("Quad-RO: 4320")
#PICamAddDemoCamera("PI-MAX4: 2048B-RF")
asynSetTraceIOMask(PICAMDET1, 0, 2)
#asynSetTraceMask($(PORT),0,0xff)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/ADBase.template", "P=13PICAM1:,R=cam1:,PORT=PICAMDET1,ADDR=0,TIMEOUT=1")
Can't open include file "NDArrayBase.template"
Error at or before ""NDArrayBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/ADBase.template" line 11
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/ADBase.template'
dbLoadRecords("/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC/../../db/PICam.template","P=13PICAM1:,R=cam1:,PORT=PICAMDET1,ADDR=0,TIMEOUT=1")
# Create a standard arrays plugin, set it to get data from Driver.
NDStdArraysConfigure("Image1", 3, 0, "PICAMDET1", 0)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDPluginBase.template","P=13PICAM1:,R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1,NDARRAY_ADDR=0")
Can't open include file "NDArrayBase.template"
Error at or before ""NDArrayBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDPluginBase.template" line 7
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDPluginBase.template'
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDStdArrays.template", "P=13PICAM1:,R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,TYPE=Int16,SIZE=16,FTVL=SHORT,NELEMENTS=20000000")
Can't open include file "NDPluginBase.template"
Error at or before ""NDPluginBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDStdArrays.template" line 7
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDStdArrays.template'
# Load all other plugins using commonPlugins.cmd
< /opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/iocBoot/commonPlugins.cmd
# This is an example file for creating plugins
# It uses the following environment variable macros
# Many of the parameters defined in this file are also in commonPlugins_settings.req so if autosave is being
# use the autosave value will replace the value passed to this file.

# $(PREFIX)      Prefix for all records
# $(PORT)        The port name for the detector.  In autosave.
# $(QSIZE)       The queue size for all plugins.  In autosave.
# $(XSIZE)       The maximum image width; used to set the maximum size for row profiles in the NDPluginStats plugin and 1-D FFT
#                   profiles in NDPluginFFT.
# $(YSIZE)       The maximum image height; used to set the maximum size for column profiles in the NDPluginStats plugin
# $(NCHANS)      The maximum number of time series points in the NDPluginStats, NDPluginROIStats, and NDPluginAttribute plugins
# $(CBUFFS)      The maximum number of frames buffered in the NDPluginCircularBuff plugin
# $(MAX_THREADS) The maximum number of threads for plugins which can run in multiple threads. Defaults to 5.

# Create a netCDF file saving plugin
NDFileNetCDFConfigure("FileNetCDF1", 20, 0, "PICAMDET1", 0)
dbLoadRecords("NDFileNetCDF.template","P=13PICAM1:,R=netCDF1:,PORT=FileNetCDF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDFileNetCDF.template
dbLoadRecords: failed to load 'NDFileNetCDF.template'

# Create a TIFF file saving plugin
NDFileTIFFConfigure("FileTIFF1", 20, 0, "PICAMDET1", 0)
dbLoadRecords("NDFileTIFF.template",  "P=13PICAM1:,R=TIFF1:,PORT=FileTIFF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDFileTIFF.template
dbLoadRecords: failed to load 'NDFileTIFF.template'

# Create a JPEG file saving plugin
NDFileJPEGConfigure("FileJPEG1", 20, 0, "PICAMDET1", 0)
dbLoadRecords("NDFileJPEG.template",  "P=13PICAM1:,R=JPEG1:,PORT=FileJPEG1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDFileJPEG.template
dbLoadRecords: failed to load 'NDFileJPEG.template'

# Create a NeXus file saving plugin
NDFileNexusConfigure("FileNexus1", 20, 0, "PICAMDET1", 0)
dbLoadRecords("NDFileNexus.template", "P=13PICAM1:,R=Nexus1:,PORT=FileNexus1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDFileNexus.template
dbLoadRecords: failed to load 'NDFileNexus.template'

# Create an HDF5 file saving plugin
NDFileHDF5Configure("FileHDF1", 20, 0, "PICAMDET1", 0)
dbLoadRecords("NDFileHDF5.template",  "P=13PICAM1:,R=HDF1:,PORT=FileHDF1,ADDR=0,TIMEOUT=1,XMLSIZE=2048,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDFileHDF5.template
dbLoadRecords: failed to load 'NDFileHDF5.template'

# Create a Magick file saving plugin
#NDFileMagickConfigure("FileMagick1", $(QSIZE), 0, "$(PORT)", 0)
#dbLoadRecords("NDFileMagick.template","P=$(PREFIX),R=Magick1:,PORT=FileMagick1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")

# Create 4 ROI plugins
NDROIConfigure("ROI1", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDROI.template",       "P=13PICAM1:,R=ROI1:,  PORT=ROI1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROI.template
dbLoadRecords: failed to load 'NDROI.template'
NDROIConfigure("ROI2", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDROI.template",       "P=13PICAM1:,R=ROI2:,  PORT=ROI2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROI.template
dbLoadRecords: failed to load 'NDROI.template'
NDROIConfigure("ROI3", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDROI.template",       "P=13PICAM1:,R=ROI3:,  PORT=ROI3,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROI.template
dbLoadRecords: failed to load 'NDROI.template'
NDROIConfigure("ROI4", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDROI.template",       "P=13PICAM1:,R=ROI4:,  PORT=ROI4,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROI.template
dbLoadRecords: failed to load 'NDROI.template'

# Create 8 ROIStat plugins
NDROIStatConfigure("ROISTAT1", 20, 0, "PICAMDET1", 0, 8, 0, 0, 0, 0, 5)
dbLoadRecords("NDROIStat.template",   "P=13PICAM1:,R=ROIStat1:  ,PORT=ROISTAT1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStat.template
dbLoadRecords: failed to load 'NDROIStat.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:1:,PORT=ROISTAT1,ADDR=0,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:2:,PORT=ROISTAT1,ADDR=1,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:3:,PORT=ROISTAT1,ADDR=2,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:4:,PORT=ROISTAT1,ADDR=3,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:5:,PORT=ROISTAT1,ADDR=4,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:6:,PORT=ROISTAT1,ADDR=5,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:7:,PORT=ROISTAT1,ADDR=6,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'
dbLoadRecords("NDROIStatN.template",  "P=13PICAM1:,R=ROIStat1:8:,PORT=ROISTAT1,ADDR=7,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDROIStatN.template
dbLoadRecords: failed to load 'NDROIStatN.template'

# Create a processing plugin
NDProcessConfigure("PROC1", 20, 0, "PICAMDET1", 0, 0, 0)
dbLoadRecords("NDProcess.template",   "P=13PICAM1:,R=Proc1:,  PORT=PROC1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDProcess.template
dbLoadRecords: failed to load 'NDProcess.template'
# Create a TIFF file plugin to read dark and flatfield images into the processing plugin
NDFileTIFFConfigure("PROC1TIFF", 20, 0, "PICAMDET1", 0)
dbLoadRecords("NDFileTIFF.template",  "P=13PICAM1:,R=Proc1:TIFF:,PORT=PROC1TIFF,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDFileTIFF.template
dbLoadRecords: failed to load 'NDFileTIFF.template'

# Create a scatter plugin
NDScatterConfigure("SCATTER1", 20, 0, "PICAMDET1", 0, 0, 0)
dbLoadRecords("NDScatter.template",   "P=13PICAM1:,R=Scatter1:,  PORT=SCATTER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDScatter.template
dbLoadRecords: failed to load 'NDScatter.template'

# Create a gather plugin with 8 ports
NDGatherConfigure("GATHER1", 20, 0, 8, 0, 0)
dbLoadRecords("NDGather.template",   "P=13PICAM1:,R=Gather1:, PORT=GATHER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGather.template
dbLoadRecords: failed to load 'NDGather.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=1, PORT=GATHER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=2, PORT=GATHER1,ADDR=1,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=3, PORT=GATHER1,ADDR=2,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=4, PORT=GATHER1,ADDR=3,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=5, PORT=GATHER1,ADDR=4,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=6, PORT=GATHER1,ADDR=5,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=7, PORT=GATHER1,ADDR=6,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'
dbLoadRecords("NDGatherN.template",   "P=13PICAM1:,R=Gather1:, N=8, PORT=GATHER1,ADDR=7,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDGatherN.template
dbLoadRecords: failed to load 'NDGatherN.template'

# Create 5 statistics plugins
NDStatsConfigure("STATS1", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDStats.template",     "P=13PICAM1:,R=Stats1:,  PORT=STATS1,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=2048,YSIZE=2048,NCHANS=2048,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDStats.template
dbLoadRecords: failed to load 'NDStats.template'
NDTimeSeriesConfigure("STATS1_TS", 20, 0, "STATS1", 1, 23)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template",  "P=13PICAM1:,R=Stats1:TS:, PORT=STATS1_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS1,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
Can't open include file "NDPluginBase.template"
Error at or before ""NDPluginBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template" line 17
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template'

NDStatsConfigure("STATS2", 20, 0, "ROI1",    0, 0, 0, 0, 0, 5)
dbLoadRecords("NDStats.template",     "P=13PICAM1:,R=Stats2:,  PORT=STATS2,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=2048,YSIZE=2048,NCHANS=2048,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDStats.template
dbLoadRecords: failed to load 'NDStats.template'
NDTimeSeriesConfigure("STATS2_TS", 20, 0, "STATS2", 1, 23)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template",  "P=13PICAM1:,R=Stats2:TS:, PORT=STATS2_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS2,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
Can't open include file "NDPluginBase.template"
Error at or before ""NDPluginBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template" line 17
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template'

NDStatsConfigure("STATS3", 20, 0, "ROI2",    0, 0, 0, 0, 0, 5)
dbLoadRecords("NDStats.template",     "P=13PICAM1:,R=Stats3:,  PORT=STATS3,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=2048,YSIZE=2048,NCHANS=2048,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDStats.template
dbLoadRecords: failed to load 'NDStats.template'
NDTimeSeriesConfigure("STATS3_TS", 20, 0, "STATS3", 1, 23)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template",  "P=13PICAM1:,R=Stats3:TS:, PORT=STATS3_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS3,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
Can't open include file "NDPluginBase.template"
Error at or before ""NDPluginBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template" line 17
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template'

NDStatsConfigure("STATS4", 20, 0, "ROI3",    0, 0, 0, 0, 0, 5)
dbLoadRecords("NDStats.template",     "P=13PICAM1:,R=Stats4:,  PORT=STATS4,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=2048,YSIZE=2048,NCHANS=2048,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDStats.template
dbLoadRecords: failed to load 'NDStats.template'
NDTimeSeriesConfigure("STATS4_TS", 20, 0, "STATS4", 1, 23)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template",  "P=13PICAM1:,R=Stats4:TS:, PORT=STATS4_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS4,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
Can't open include file "NDPluginBase.template"
Error at or before ""NDPluginBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template" line 17
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template'

NDStatsConfigure("STATS5", 20, 0, "ROI4",    0, 0, 0, 0, 0, 5)
dbLoadRecords("NDStats.template",     "P=13PICAM1:,R=Stats5:,  PORT=STATS5,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=2048,YSIZE=2048,NCHANS=2048,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDStats.template
dbLoadRecords: failed to load 'NDStats.template'
NDTimeSeriesConfigure("STATS5_TS", 20, 0, "STATS5", 1, 23)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template",  "P=13PICAM1:,R=Stats5:TS:, PORT=STATS5_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS5,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
Can't open include file "NDPluginBase.template"
Error at or before ""NDPluginBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template" line 17
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template'

# Create a transform plugin
NDTransformConfigure("TRANS1", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDTransform.template", "P=13PICAM1:,R=Trans1:,  PORT=TRANS1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDTransform.template
dbLoadRecords: failed to load 'NDTransform.template'

# Create an overlay plugin with 8 overlays
NDOverlayConfigure("OVER1", 20, 0, "PICAMDET1", 0, 8, 0, 0, 0, 0, 5)
dbLoadRecords("NDOverlay.template", "P=13PICAM1:,R=Over1:, PORT=OVER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlay.template
dbLoadRecords: failed to load 'NDOverlay.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:1:,NAME=ROI1,   SHAPE=1,O=Over1:,XPOS=13PICAM1:ROI1:MinX_RBV,YPOS=13PICAM1:ROI1:MinY_RBV,XSIZE=13PICAM1:ROI1:SizeX_RBV,YSIZE=13PICAM1:ROI1:SizeY_RBV,PORT=OVER1,ADDR=0,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:2:,NAME=ROI2,   SHAPE=1,O=Over1:,XPOS=13PICAM1:ROI2:MinX_RBV,YPOS=13PICAM1:ROI2:MinY_RBV,XSIZE=13PICAM1:ROI2:SizeX_RBV,YSIZE=13PICAM1:ROI2:SizeY_RBV,PORT=OVER1,ADDR=1,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:3:,NAME=ROI3,   SHAPE=1,O=Over1:,XPOS=13PICAM1:ROI3:MinX_RBV,YPOS=13PICAM1:ROI3:MinY_RBV,XSIZE=13PICAM1:ROI3:SizeX_RBV,YSIZE=13PICAM1:ROI3:SizeY_RBV,PORT=OVER1,ADDR=2,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:4:,NAME=ROI4,   SHAPE=1,O=Over1:,XPOS=13PICAM1:ROI4:MinX_RBV,YPOS=13PICAM1:ROI4:MinY_RBV,XSIZE=13PICAM1:ROI4:SizeX_RBV,YSIZE=13PICAM1:ROI4:SizeY_RBV,PORT=OVER1,ADDR=3,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:5:,NAME=Cursor1,SHAPE=1,O=Over1:,XPOS=junk,                  YPOS=junk,                  XSIZE=junk,                   YSIZE=junk,                   PORT=OVER1,ADDR=4,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:6:,NAME=Cursor2,SHAPE=1,O=Over1:,XPOS=junk,                  YPOS=junk,                  XSIZE=junk,                   YSIZE=junk,                   PORT=OVER1,ADDR=5,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:7:,NAME=Box1,   SHAPE=1,O=Over1:,XPOS=junk,                  YPOS=junk,                  XSIZE=junk,                   YSIZE=junk,                   PORT=OVER1,ADDR=6,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'
dbLoadRecords("NDOverlayN.template","P=13PICAM1:,R=Over1:8:,NAME=Box2,   SHAPE=1,O=Over1:,XPOS=junk,                  YPOS=junk,                  XSIZE=junk,                   YSIZE=junk,                   PORT=OVER1,ADDR=7,TIMEOUT=1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDOverlayN.template
dbLoadRecords: failed to load 'NDOverlayN.template'

# Create 2 color conversion plugins
NDColorConvertConfigure("CC1", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDColorConvert.template", "P=13PICAM1:,R=CC1:,  PORT=CC1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDColorConvert.template
dbLoadRecords: failed to load 'NDColorConvert.template'
NDColorConvertConfigure("CC2", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDColorConvert.template", "P=13PICAM1:,R=CC2:,  PORT=CC2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDColorConvert.template
dbLoadRecords: failed to load 'NDColorConvert.template'

# Create a circular buffer plugin
)acLib: macro CBUFFS is undefined (expanding string NDCircularBuffConfigure("CB1", $(QSIZE), 0, "$(PORT)", 0, $(CBUFFS), 0)
dbLoadRecords("NDCircularBuff.template", "P=13PICAM1:,R=CB1:,  PORT=CB1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDCircularBuff.template
dbLoadRecords: failed to load 'NDCircularBuff.template'

# Create an NDAttribute plugin with 8 attributes
NDAttrConfigure("ATTR1", 20, 0, "PICAMDET1", 0, 8, 0, 0, 0)
dbLoadRecords("NDAttribute.template",  "P=13PICAM1:,R=Attr1:,    PORT=ATTR1,ADDR=0,TIMEOUT=1,NCHANS=2048,NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttribute.template
dbLoadRecords: failed to load 'NDAttribute.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:1:,  PORT=ATTR1,ADDR=0,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:2:,  PORT=ATTR1,ADDR=1,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:3:,  PORT=ATTR1,ADDR=2,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:4:,  PORT=ATTR1,ADDR=3,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:5:,  PORT=ATTR1,ADDR=4,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:6:,  PORT=ATTR1,ADDR=5,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:7:,  PORT=ATTR1,ADDR=6,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
dbLoadRecords("NDAttributeN.template", "P=13PICAM1:,R=Attr1:8:,  PORT=ATTR1,ADDR=7,TIMEOUT=1,NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDAttributeN.template
dbLoadRecords: failed to load 'NDAttributeN.template'
NDTimeSeriesConfigure("ATTR1_TS", 20, 0, "ATTR1", 1, 8)
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template",  "P=13PICAM1:,R=Attr1:TS:, PORT=ATTR1_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ATTR1,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
Can't open include file "NDPluginBase.template"
Error at or before ""NDPluginBase.template"" in file "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template" line 17
dbLoadRecords: failed to load '/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template'

# Create an FFT plugin
NDFFTConfigure("FFT1", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDFFT.template", "P=13PICAM1:, R=FFT1:, PORT=FFT1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=PICAMDET1, NAME=FFT1, NCHANS=2048")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDFFT.template
dbLoadRecords: failed to load 'NDFFT.template'

# Create 2 Codec plugins
NDCodecConfigure("CODEC1", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDCodec.template", "P=13PICAM1:, R=Codec1:, PORT=CODEC1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDCodec.template
dbLoadRecords: failed to load 'NDCodec.template'
NDCodecConfigure("CODEC2", 20, 0, "PICAMDET1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDCodec.template", "P=13PICAM1:, R=Codec2:, PORT=CODEC2, ADDR=0, TIMEOUT=1, NDARRAY_PORT=PICAMDET1")
filename="../dbStatic/dbLexRoutines.c" line number=268
No such file or directory dbRead opening file NDCodec.template
dbLoadRecords: failed to load 'NDCodec.template'

set_requestfile_path("./")
set_requestfile_path("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/ADApp/Db")
set_requestfile_path("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/iocBoot")
set_savefile_path("./autosave")
set_pass0_restoreFile("auto_settings.sav")
set_pass1_restoreFile("auto_settings.sav")
save_restoreSet_status_prefix("13PICAM1:")
dbLoadRecords("/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/autosave-R5-10/asApp/Db/save_restoreStatus.db", "P=13PICAM1:")

# Optional: load NDPluginPva plugin
#NDPvaConfigure("PVA1", $(QSIZE), 0, "$(PORT)", 0, $(PREFIX)Pva1:Image, 0, 0, 0)
#dbLoadRecords("NDPva.template",  "P=$(PREFIX),R=Pva1:, PORT=PVA1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
# Must start PVA server if this is enabled
#startPVAServer

# Optional: load ffmpegServer plugin
#ffmpegServerConfigure(8081)
#ffmpegStreamConfigure("FfmStream1", 2, 0, "$(PORT)", 0, -1, 0)
#dbLoadRecords("$(FFMPEGSERVER)/db/ffmpegStream.template", "P=$(PREFIX),R=ffmstream1:,PORT=FfmStream1,NDARRAY_PORT=$(PORT)")
#ffmpegFileConfigure("FfmFile1", 16, 0, "$(PORT)", 0, -1, 0)
#dbLoadRecords("$(FFMPEGSERVER)/db/ffmpegFile.template", "P=$(PREFIX),R=ffmfile1:,PORT=FfmFile1,NDARRAY_PORT=$(PORT)")

# Optional: load NDPluginEdge plugin
#NDEdgeConfigure("EDGE1", $(QSIZE), 0, "$(PORT)", 0, 0, 0, 0)
#dbLoadRecords("$(ADPLUGINEDGE)/db/NDEdge.template",  "P=$(PREFIX),R=Edge1:, PORT=EDGE1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
#set_requestfile_path("$(ADPLUGINEDGE)/edgeApp/Db")

# Optional: load NDPluginCV plugin
#NDCVConfigure("CV1", $(QSIZE), 0, "$(PORT)", 0, 0, 0, 0, 0, $(MAX_THREADS=5))
#dbLoadRecords("$(ADCOMPVISION)/db/NDCV.template",  "P=$(PREFIX),R=CV1:, PORT=CV1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
#set_requestfile_path("$(ADCOMPVISION)/adcvApp/Db")

# Optional: load NDPluginBar plugin
#NDBarConfigure("BAR1", $(QSIZE), 0, "$(PORT)", 0, 0, 0, 0, 0, $(MAX_THREADS=5))
#dbLoadRecords("$(ADPLUGINBAR)/db/NDBar.template",  "P=$(PREFIX),R=Bar1:, PORT=BAR1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
#set_requestfile_path("$(ADPLUGINBAR)/barApp/Db")

# Optional: load scan records
#dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db", "P=$(PREFIX),MAXPTS1=2000,MAXPTS2=200,MAXPTS3=20,MAXPTS4=10,MAXPTSH=10")
#set_requestfile_path("$(SSCAN)/sscanApp/Db")

# Optional: load sseq record for acquisition sequence
#dbLoadRecords("$(CALC)/calcApp/Db/sseqRecord.db", "P=$(PREFIX), S=AcquireSequence")
#set_requestfile_path("$(CALC)/calcApp/Db")

# Optional: load devIocStats records (requires DEVIOCSTATS module)
#dbLoadRecords("$(DEVIOCSTATS)/db/iocAdminSoft.db", "IOC=$(PREFIX)")

# Optional: load alive record (requires ALIVE module)
#dbLoadRecords("$(ALIVE)/aliveApp/Db/alive.db", "P=$(PREFIX),RHOST=192.168.1.254")

# Set the callback queue size to 5000, up from default of 2000 in base.
# This can be needed to avoid errors "callbackRequest: cbLow ring buffer full".
callbackSetQueueSize(5000)
set_requestfile_path("/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC/../../PICamApp/Db")
#asynSetTraceMask($(PORT),0,0x09)
iocInit()
Starting iocInit
############################################################################
## EPICS R7.0.4
## Rev. 2022-06-08T15:11-0700
############################################################################
reboot_restore: entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from './autosave/auto_settings.sav' at initHookState 6 (before record/device init) ***
save_restore: Can't open file './autosave/auto_settings.sav'.
save_restore: Trying backup file './autosave/auto_settings.savB'
save_restore: Can't open file './autosave/auto_settings.savB'.
save_restore: Can't figure out which seq file is most recent,
save_restore: so I'm just going to start with './autosave/auto_settings.sav0'.
save_restore: Trying backup file './autosave/auto_settings.sav0'
save_restore: Can't open file './autosave/auto_settings.sav0'.
save_restore: Trying backup file './autosave/auto_settings.sav1'
save_restore: Can't open file './autosave/auto_settings.sav1'.
save_restore: Trying backup file './autosave/auto_settings.sav2'
save_restore: Can't open file './autosave/auto_settings.sav2'.
save_restore: Can't find a file to restore from...save_restore: ...last tried './autosave/auto_settings.sav2'. I give up.
save_restore: **********************************

save_restore: Can't open save file.2023/06/22 15:33:10.884 PICam:readEnum availableCamerasCount 1
2023/06/22 15:33:10.892 PICam:readEnum availableCamerasCount 1
reboot_restore: entry for file 'auto_settings.sav'
reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.
*** restoring from './autosave/auto_settings.sav' at initHookState 7 (after record/device init) ***
save_restore: Can't open file './autosave/auto_settings.sav'.
save_restore: Trying backup file './autosave/auto_settings.savB'
save_restore: Can't open file './autosave/auto_settings.savB'.
save_restore: Can't figure out which seq file is most recent,
save_restore: so I'm just going to start with './autosave/auto_settings.sav0'.
save_restore: Trying backup file './autosave/auto_settings.sav0'
save_restore: Can't open file './autosave/auto_settings.sav0'.
save_restore: Trying backup file './autosave/auto_settings.sav1'
save_restore: Can't open file './autosave/auto_settings.sav1'.
save_restore: Trying backup file './autosave/auto_settings.sav2'
save_restore: Can't open file './autosave/auto_settings.sav2'.
save_restore: Can't find a file to restore from...save_restore: ...last tried './autosave/auto_settings.sav2'. I give up.
save_restore: **********************************

save_restore: Can't open save file.ROIConstraints->rules 0x1E
2023/06/22 15:33:11.408 PICam:piSetRois Error writing rois Invalid Parameter Value
(x,y) = (1, 1), (height, width) = (0, 0), (xbin, ybin) = (1, 1)
ROIConstraints->rules 0x1E
2023/06/22 15:33:11.408 PICam:piSetRois Error writing rois Invalid Parameter Value
(x,y) = (1, 1), (height, width) = (0, 0), (xbin, ybin) = (1, 1)
ROIConstraints->rules 0x1E
2023/06/22 15:33:11.408 PICam:piSetRois Error writing rois Invalid Parameter Value
(x,y) = (1, 1), (height, width) = (0, 0), (xbin, ybin) = (1, 1)
ROIConstraints->rules 0x1E
2023/06/22 15:33:11.408 PICam:piSetRois Error writing rois Invalid Parameter Value
(x,y) = (1, 1), (height, width) = (0, 0), (xbin, ybin) = (1, 1)
ROIConstraints->rules 0x1E
2023/06/22 15:33:11.408 PICam:piSetRois Error writing rois Invalid Parameter Value
(x,y) = (1, 1), (height, width) = (0, 0), (xbin, ybin) = (1, 1)
ROIConstraints->rules 0x1E
2023/06/22 15:33:11.408 PICam:piSetRois Error writing rois Invalid Parameter Value
(x,y) = (1, 1), (height, width) = (0, 0), (xbin, ybin) = (1, 1)
2023/06/22 15:33:11.409 PICam,piWriteInt32RangeType Value 2.000000 is out of range 2084.000000,2.000000 for parameter (null)
2023/06/22 15:33:11.409 PICam,piWriteInt32RangeType Value 1.000000 is out of range 2084.000000,1.000000 for parameter (null)
MarkRivers commented 1 year ago

The missing template files are because st.cmd is missing this line:

# The search path for database files
epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(ADCORE)/db")

Look at ADSimDetector or most any other detector for an example.

LeeYangLBLBCS commented 1 year ago

thanks. The IOC comes up in Ubuntu 18.04, after I added the missing line you showed.

LeeYangLBLBCS commented 1 year ago

I spoke too early. I think I was just getting a demo camera on Ubuntu.
![PICAMBase adl](https://github.com/areaDetector/ADPICam/assets/15041332/77401899-0fec-4548-83d7-046dc22b48e0)

The IOC startup log shows two errors related to "epicsMutex", I wonder if that's related the access to the Camera USB port.

 ../../bin/linux-x86_64/PICamApp st.cmd
errlogInit(20000)
< envPaths
epicsEnvSet("IOC","iocPICam")
epicsEnvSet("TOP","/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC")
epicsEnvSet("ADPICAM","/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC/../..")
epicsEnvSet("SUPPORT","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support")
epicsEnvSet("ASYN","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/asyn-R4-38")
epicsEnvSet("AREA_DETECTOR","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7")
epicsEnvSet("ADSUPPORT","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADSupport")
epicsEnvSet("ADCORE","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore")
epicsEnvSet("AUTOSAVE","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/autosave-R5-10")
epicsEnvSet("BUSY","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/busy-R1-7-2")
epicsEnvSet("CALC","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/calc-R3-7-4")
epicsEnvSet("SNCSEQ","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/seq-2-2-7")
epicsEnvSet("SSCAN","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/sscan-R2-11-3")
epicsEnvSet("DEVIOCSTATS","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/iocStats-3-1-16")
epicsEnvSet("STD","/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/std-R3-6-1")
epicsEnvSet("EPICS_BASE","/opt/epics/base-7.0.4")
#epicsThreadSleep(20)
dbLoadDatabase("/opt/epics/modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADPICam/iocs/PICamIOC/dbd/PICamApp.dbd")
PICamApp_registerRecordDeviceDriver(pdbbase) 
epicsEnvSet("PREFIX", "13PICAM1:")
epicsEnvSet("PORT",   "PICAMDET1")
epicsEnvSet("QSIZE",  "20")
epicsEnvSet("XSIZE",  "2048")
epicsEnvSet("YSIZE",  "2048")
epicsEnvSet("NCHANS", "2048")
epicsEnvSet("EPICS_DB_INCLUDE_PATH", "/opt/epics/base-7.0.4/../modules/synApps_6_1_epics7/support/areaDetector-R3-7/ADCore/db")
# Create a PICam driver
# PICamConfig(const char *portName, IDType, IDValue, maxBuffers, size_t maxMemory, int priority, int stackSize)
# This is for a 
PICamConfig("PICAMDET1", 0, 0, 0, 0)
epicsMutex pthread_mutex_unlock epicsMutexOsdUnlock failed: error Operation not permitted
epicsMutex pthread_mutex_unlock epicsMutexOsdUnlock failed: error Operation not permitted
#PICamAddDemoCamera("PIXIS: 100F")
#PICamAddDemoCamera("Quad-RO: 4320")
#PICamAddDemoCamera("PI-MAX4: 2048B-RF")
asynSetTraceIOMask(PICAMDET1, 0, 2)
LeeYangLBLBCS commented 1 year ago

PICAMBase adl

LeeYangLBLBCS commented 1 year ago

repost medm screen. Not sure if it went through the first time.

MarkRivers commented 1 year ago

The mutex errors are probably calls to unlock when the mutex is not currently locked.

Is your camera actually a QuadRO 4320?

What happens when you try to acquire?

MarkRivers commented 1 year ago

The mutex errors are probably calls to unlock when the mutex is not currently locked.

Is your camera actually a QuadRO 4320?

What happens when you try to acquire?

LeeYangLBLBCS commented 1 year ago

the actual camera is a MTE3 2048B. Also, the medm screen looks the same when the camera is powered off. Clicking "start" acquire, the counter goes up like it's a real camera.

LeeYangLBLBCS commented 1 year ago

close this issue. Drive compiled and worked on Ubuntu 18.04.