Can you try changing the 3rd NDStdArraysConfigure line to be:
NDStdArraysConfigure("Image", 200, 0, "TRANS1", 0, 0, 0, 0, 0, 5)
And place it after the NDTransformConfigure line?
It worked!!!!
or just parts of it...
Since image is just a combination of image1 and image2 and
image1 and image2 get their arrays respectively from port SIM1 address 0 and port SIM1 address 1, changing
image to port 0 basically just got half of my image (that which would be
image1). It is turned by 90 degrees indeed, but the other half is just black. I append a print screen of it.
Since i cant change the Address of image without loosing half of my image, how should i proceed to make Trans1 get things from port SIM1 address 2? Is it impossible?
I think i finally understand: <PLUGIN>:NDArrayAddress and <Plugin>:NDArrayPort are the port and address in which that plugin searches for the array. Contrary to that, the port and address configured in the plugin initial configuration are the ones in which
that plugin outputs the arrays. Is this right?
Also, why does NDStdArraysConfigure("Image", 200, 0, "TRANS1", 0, 0, 0, 0, 0, 5) needs to be after
NDTransformConfigure line? It does work, but i didnt understand the need for this.
Thanks!
From: Pearson, Matthew <pearsonmr at ornl.gov>
Sent: 14 September 2022 10:36
To: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: RE: Implementing NDTransform plugin for areaDetector
Hi,
Since image is being created with ADDRESS=2, i assume what i want is my NDTransform template to have NDArrayAddress = 2. Is that right?
Yes, that sounds right.
So im working with the following thoughts:
1 - I need only
one NDTransform template, since i need only image rotated;
2 - NDTransform NDArrayPort needs to be SIM1, since that is from where
image is getting its ArrayData info;
3 - NDTransform NDArrayAddress must be 2, since its the same NDArrayAddress where
image is getting its ArrayData info;
4 - NDTransform ADDR (in the template) must still be zero.
All that sounds correct.
In the printout below you are changing:
MOBICDTE:image:NDArrayPort "TRANS1"
But the ‘image’ stdArray plugin has been configured with NDArrayAddress=2, and the ‘TRANS1’ port is outputting it’s array on address=0. I think it’s only SIM1 that is
outputting NDArrays on multiple addresses, but once the NDArray are handled by plugins they are output on address=0 again since they each only deal with a single NDArray.
Can you try changing the 3rd NDStdArraysConfigure line to be:
NDStdArraysConfigure("Image", 200, 0, "TRANS1", 0, 0, 0, 0, 0, 5)
And place it after the NDTransformConfigure line?
You can also try disabling the plugins one-by-one, to see which one is causing the problem. Rather than looking at the end result (the CA waveform), try looking at the
plugin detailed screens (or PVs), to see which ones are processing correctly. You can tell if they are processing correctly when the NDArray timestamp or array index are updating. The screens should also show the correct NDArray size, but the NDArray size
will remain 0,0 if the plugin is not processing correctly.
Cheers,
Matt
If that is right, i expressed these with:
#####CONFIGURING IMAGES#####
# Create a standard arrays plugin, set it to get data from first simDetector driver.
# portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxThreads
NDStdArraysConfigure("Image1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 5)
NDStdArraysConfigure("Image2", 200, 0, "SIM1", 1, 0, 0, 0, 0, 5)
NDStdArraysConfigure("Image", 200, 0, "SIM1", 2, 0, 0, 0, 0, 5)
# This waveform only allows transporting 16-bit images
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image1:,PORT=Image1,ADDR=0,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image2:,PORT=Image2,ADDR=1,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image:,PORT=Image,ADDR=2,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
######CONFIGURING TRANSFORM##########
# Create a transform plugin
NDTransformConfigure("TRANS1", 200, 0, "SIM1", 2, 0, 0, 0, 0, 4)
dbLoadRecords("NDTransform.template", "P=MOBICDTE:,R=Trans1:, PORT=TRANS1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
############AFTER IOC INIT#####
dbpf MOBICDTE:Trans1:EnableCallbacks 1
dbpf MOBICDTE:Trans1:Type 1
dbpf MOBICDTE:image:NDArrayPort "TRANS1"
dbpf MOBICDTE:HDF1:EnableCallbacks 1
dbpf MOBICDTE:HDF1:NDArrayPort "TRANS1"
So i did this all and i append the full ioc initialization log at the end of this e-mail.
However, when doing an acquisition, i get three weird symptoms:
1 - My QT/PyDM ADViewer, that has channel=ca://MOBICDTE:image:ArrayData and previously was capable of showing it, is now is black;
2 - The IOC spits messages like the following:
epics> 2022/06/23 01:36:30.508 NDPluginFile::doCapture: ERROR, must collect an array to get dimensions first
mobipix:initDevices: entering
chunk_size: 262144, total: 524288000
chunk_size: 128, total: 256000
../mobipix.cpp, V4LTask (182): entering, index=0, device=/dev/video0, fd=32
../mobipix.cpp, V4LTask (190) about to VIDEOC_STREAMON, dev: /dev/video0
../mobipix.cpp, V4LTask (182): entering, index=1, device=/dev/video1, fd=33
../mobipix.cpp, V4LTask (190) about to VIDEOC_STREAMON, dev: /dev/video1
2022/06/23 01:36:30.794 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
2022/06/23 01:36:31.565 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
2022/06/23 01:36:32.665 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
2022/06/23 01:36:33.764 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
2022/06/23 01:36:34.865 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
2022/06/23 01:36:35.965 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
mobipix:finiDevices: entering
3 - No HDF5 file is generated in designated folder (it was working before).
My next try was doing
dbpf MOBICDTE:Trans1:NDArrayAddress 0
And retry the acquisition. Now and hdf5 file is generated as expected but not rotated. The illegal "invalid address=2" messages persist.
I also append an image of the viewer when MOBICDTE:Trans1:EnableCallbacks = 0, MOBICDTE:image:NDArrayPort = "SIM1" and MOBICDTE:HDF1:NDArrayPort = "SIM1". It is otherwise black when transform is enabled and image:NDArrayPort points to TRANS1.
Am i forgetting anything important?
Thanks for your patience,
Marco
Obs: IOC full init log:
#!/usr/local/epics/synApps/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/bin/linux-arm/mobipixApp
epicsEnvSet("IOC","iocHDF5Test")
epicsEnvSet("TOP","/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC")
epicsEnvSet("ADMOBIPIX","/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/../..")
epicsEnvSet("SUPPORT","/usr/local/epics/synApps/support")
epicsEnvSet("ASYN","/usr/local/epics/synApps/support/asyn4-38")
epicsEnvSet("AREA_DETECTOR","/usr/local/epics/synApps/support/areaDetector-R3-7")
epicsEnvSet("ADSUPPORT","/usr/local/epics/synApps/support/areaDetector-R3-7/ADSupport")
epicsEnvSet("ADCORE","/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore")
epicsEnvSet("AUTOSAVE","/usr/local/epics/synApps/support/autosave-R5-10")
epicsEnvSet("BUSY","/usr/local/epics/synApps/support/busy-R1-7-2")
epicsEnvSet("CALC","/usr/local/epics/synApps/support/calc-R3-7-3")
epicsEnvSet("SNCSEQ","/usr/local/epics/synApps/support/seq-2-2-6")
epicsEnvSet("SSCAN","/usr/local/epics/synApps/support/sscan-R2-11-3")
epicsEnvSet("DEVIOCSTATS","/usr/local/epics/synApps/support/iocStats-3-1-16")
epicsEnvSet("EPICS_BASE","/usr/local/epics/base")
epicsEnvSet("STREAM","/usr/local/epics/synApps/support/StreamDevice-2-8-9")
cd "/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC"
dbLoadDatabase("/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/dbd/mobipixApp.dbd")
mobipixApp_registerRecordDeviceDriver(pdbbase)
# epicsEnvSet("ADMOBIPIX", "$(AREADETECTOR)/ADMobipix")
epicsEnvSet("PREFIX", "MOBICDTE:")
# The port name for the detector
epicsEnvSet("PORT", "SIM1")
# The queue size for all plugins
epicsEnvSet("QSIZE", "200")
# The maximum image width; used to set the maximum size for this driver and for row profiles in the NDPluginStats plugin
epicsEnvSet("XSIZE", "512")
# The maximum image height; used to set the maximum size for this driver and for column profiles in the NDPluginStats plugin
epicsEnvSet("YSIZE", "512")
# The maximum number of time series points in the NDPluginStats plugin
epicsEnvSet("NCHANS", "2048")
# The maximum number of frames buffered in the NDPluginCircularBuff plugin
epicsEnvSet("CBUFFS", "200")
# The maximum number of threads for plugins which can run in multiple threads
epicsEnvSet("MAX_THREADS", "4")
# The search path for database files
epicsEnvSet("EPICS_DB_INCLUDE_PATH", "/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/db")
asynSetMinTimerPeriod(0.001)
asynSetMinTimerPeriod is not currently supported on this OS
# The EPICS environment variable EPICS_CA_MAX_ARRAY_BYTES needs to be set to a value at least as large
# as the largest image that the standard arrays plugin will send.
# That value is $(XSIZE) * $(YSIZE) * sizeof(FTVL data type) for the FTVL used when loading the NDStdArrays.template file.
# The variable can be set in the environment before running the IOC or it can be set here.
# It is often convenient to set it in the environment outside the IOC to the largest array any client
# or server will need. For example 10000000 (ten million) bytes may be enough.
# If it is set here then remember to also set it outside the IOC for any CA clients that need to access the waveform record.
# Do not set EPICS_CA_MAX_ARRAY_BYTES to a value much larger than that required, because EPICS Channel Access actually
# allocates arrays of this size every time it needs a buffer larger than 16K.
# Uncomment the following line to set it in the IOC.
#epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "10000000")
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "10000000")
# Create a Mobipix driver
# mobipixConfig(const char *portName, int maxSizeX, int maxSizeY, int dataType,
# int maxBuffers, int maxMemory, int priority, int stackSize)
mobipixConfig("SIM1", 512, 512, 3, 0, 0)
# To have the rate calculation use a non-zero smoothing factor use the following line
# dbLoadRecords("$(ADMOBIPIX)/db/mobipix.template","P=$(PREFIX),R=cam:,PORT=$(PORT),ADDR=0,TIMEOUT=3")
dbLoadRecords("/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/../../db/mobipix2.template","P=MOBICDTE:,R=cam:,PORT=SIM1,ADDR=0,TIMEOUT=3")
epicsEnvSet(STREAM_PROTOCOL_PATH, "/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/db")
epicsEnvSet(STREAM_PROTOCOL_PATH, "/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/../../db")
drvAsynIPPortConfigure("IPPORT1", "127.0.0.1:60000", 0, 0, 0)
dbLoadRecords("/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/../../db/mobibackend_pedro.template","P=MOBICDTE:,BE=Backend:,R=cam:,PORT=IPPORT1")
dbLoadRecords("/usr/local/epics/synApps_6_1/support/areaDetector-R3-7/ADMobipix/iocs/mobipixIOC/../../db/mobibackend_pedro2.template","P=MOBICDTE:,BE=Backend:,R=cam:,PORT=IPPORT1")
# asyn record for troubleshooting
dbLoadRecords("/usr/local/epics/synApps/support/asyn4-38/db/asynRecord.db","P=MOBICDTE:,R=asyn,PORT=IPPORT1,ADDR=0,OMAX=256,IMAX=256")
# Load an NDFile database. This is not supported for the simDetector which does not write files.
# dbLoadRecords("NDFile.template","P=$(PREFIX),R=cam1:,PORT=SIM1,ADDR=0,TIMEOUT=1")
# Create a standard arrays plugin, set it to get data from first simDetector driver.
# portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxThreads
NDStdArraysConfigure("Image1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 5)
NDStdArraysConfigure("Image2", 200, 0, "SIM1", 1, 0, 0, 0, 0, 5)
NDStdArraysConfigure("Image", 200, 0, "SIM1", 2, 0, 0, 0, 0, 5)
# This creates a waveform large enough for 2000x2000x3 (e.g. RGB color) arrays.
# This waveform only allows transporting 8-bit images
# dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=2,NDARRAY_PORT=$(PORT),TYPE=Int8,FTVL=UCHAR,NELEMENTS=12000000")
# dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image2:,PORT=Image2,ADDR=1,TIMEOUT=2,NDARRAY_PORT=$(PORT),TYPE=Int8,FTVL=UCHAR,NELEMENTS=12000000")
# dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image:,PORT=Image,ADDR=2,TIMEOUT=2,NDARRAY_PORT=$(PORT),TYPE=Int8,FTVL=UCHAR,NELEMENTS=12000000")
# This waveform only allows transporting 16-bit images
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image1:,PORT=Image1,ADDR=0,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image2:,PORT=Image2,ADDR=1,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image:,PORT=Image,ADDR=2,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
# This waveform allows transporting 32-bit images
# dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int32,FTVL=LONG,NELEMENTS=12000000")
# This waveform allows transporting 64-bit float images
# dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Float64,FTVL=DOUBLE,NELEMENTS=12000000")
# Load all other plugins using commonPlugins.cmd
< /usr/local/epics/synApps/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", 200, 0, "SIM1", 0)
dbLoadRecords("NDFileNetCDF.template","P=MOBICDTE:,R=netCDF1:,PORT=FileNetCDF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create a TIFF file saving plugin
NDFileTIFFConfigure("FileTIFF1", 200, 0, "SIM1", 0)
dbLoadRecords("NDFileTIFF.template", "P=MOBICDTE:,R=TIFF1:,PORT=FileTIFF1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create a JPEG file saving plugin
NDFileJPEGConfigure("FileJPEG1", 200, 0, "SIM1", 0)
dbLoadRecords("NDFileJPEG.template", "P=MOBICDTE:,R=JPEG1:,PORT=FileJPEG1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create a NeXus file saving plugin
NDFileNexusConfigure("FileNexus1", 200, 0, "SIM1", 0)
dbLoadRecords("NDFileNexus.template", "P=MOBICDTE:,R=Nexus1:,PORT=FileNexus1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create an HDF5 file saving plugin
NDFileHDF5Configure("FileHDF1", 200, 0, "SIM1", 0)
dbLoadRecords("NDFileHDF5.template", "P=MOBICDTE:,R=HDF1:,PORT=FileHDF1,ADDR=0,TIMEOUT=1,XMLSIZE=2048,NDARRAY_PORT=SIM1")
# 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)")
NDROIConfigure("ROI1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDROI.template", "P=MOBICDTE:,R=ROI1:, PORT=ROI1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
NDROIConfigure("ROI2", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDROI.template", "P=MOBICDTE:,R=ROI2:, PORT=ROI2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
NDROIConfigure("ROI3", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDROI.template", "P=MOBICDTE:,R=ROI3:, PORT=ROI3,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
NDROIConfigure("ROI4", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDROI.template", "P=MOBICDTE:,R=ROI4:, PORT=ROI4,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create 8 ROIStat plugins
NDROIStatConfigure("ROISTAT1", 200, 0, "SIM1", 0, 8, 0, 0, 0, 0, 4)
dbLoadRecords("NDROIStat.template", "P=MOBICDTE:,R=ROIStat1: ,PORT=ROISTAT1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:1:,PORT=ROISTAT1,ADDR=0,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:2:,PORT=ROISTAT1,ADDR=1,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:3:,PORT=ROISTAT1,ADDR=2,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:4:,PORT=ROISTAT1,ADDR=3,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:5:,PORT=ROISTAT1,ADDR=4,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:6:,PORT=ROISTAT1,ADDR=5,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:7:,PORT=ROISTAT1,ADDR=6,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDROIStatN.template", "P=MOBICDTE:,R=ROIStat1:8:,PORT=ROISTAT1,ADDR=7,TIMEOUT=1,NCHANS=2048")
# Create a processing plugin
NDProcessConfigure("PROC1", 200, 0, "SIM1", 0, 0, 0)
dbLoadRecords("NDProcess.template", "P=MOBICDTE:,R=Proc1:, PORT=PROC1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create a TIFF file plugin to read dark and flatfield images into the processing plugin
NDFileTIFFConfigure("PROC1TIFF", 200, 0, "SIM1", 0)
dbLoadRecords("NDFileTIFF.template", "P=MOBICDTE:,R=Proc1:TIFF:,PORT=PROC1TIFF,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create a scatter plugin
NDScatterConfigure("SCATTER1", 200, 0, "SIM1", 0, 0, 0)
dbLoadRecords("NDScatter.template", "P=MOBICDTE:,R=Scatter1:, PORT=SCATTER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create a gather plugin with 8 ports
NDGatherConfigure("GATHER1", 200, 0, 8, 0, 0)
dbLoadRecords("NDGather.template", "P=MOBICDTE:,R=Gather1:, PORT=GATHER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=1, PORT=GATHER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=2, PORT=GATHER1,ADDR=1,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=3, PORT=GATHER1,ADDR=2,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=4, PORT=GATHER1,ADDR=3,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=5, PORT=GATHER1,ADDR=4,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=6, PORT=GATHER1,ADDR=5,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=7, PORT=GATHER1,ADDR=6,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDGatherN.template", "P=MOBICDTE:,R=Gather1:, N=8, PORT=GATHER1,ADDR=7,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create 5 statistics plugins
NDStatsConfigure("STATS1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDStats.template", "P=MOBICDTE:,R=Stats1:, PORT=STATS1,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=512,YSIZE=512,NCHANS=2048,NDARRAY_PORT=SIM1")
NDTimeSeriesConfigure("STATS1_TS", 200, 0, "STATS1", 1, 23)
dbLoadRecords("/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template", "P=MOBICDTE:,R=Stats1:TS:, PORT=STATS1_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS1,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
NDStatsConfigure("STATS2", 200, 0, "ROI1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDStats.template", "P=MOBICDTE:,R=Stats2:, PORT=STATS2,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=512,YSIZE=512,NCHANS=2048,NDARRAY_PORT=SIM1")
NDTimeSeriesConfigure("STATS2_TS", 200, 0, "STATS2", 1, 23)
dbLoadRecords("/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template", "P=MOBICDTE:,R=Stats2:TS:, PORT=STATS2_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS2,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
NDStatsConfigure("STATS3", 200, 0, "ROI2", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDStats.template", "P=MOBICDTE:,R=Stats3:, PORT=STATS3,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=512,YSIZE=512,NCHANS=2048,NDARRAY_PORT=SIM1")
NDTimeSeriesConfigure("STATS3_TS", 200, 0, "STATS3", 1, 23)
dbLoadRecords("/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template", "P=MOBICDTE:,R=Stats3:TS:, PORT=STATS3_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS3,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
NDStatsConfigure("STATS4", 200, 0, "ROI3", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDStats.template", "P=MOBICDTE:,R=Stats4:, PORT=STATS4,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=512,YSIZE=512,NCHANS=2048,NDARRAY_PORT=SIM1")
NDTimeSeriesConfigure("STATS4_TS", 200, 0, "STATS4", 1, 23)
dbLoadRecords("/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template", "P=MOBICDTE:,R=Stats4:TS:, PORT=STATS4_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS4,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
NDStatsConfigure("STATS5", 200, 0, "ROI4", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDStats.template", "P=MOBICDTE:,R=Stats5:, PORT=STATS5,ADDR=0,TIMEOUT=1,HIST_SIZE=256,XSIZE=512,YSIZE=512,NCHANS=2048,NDARRAY_PORT=SIM1")
NDTimeSeriesConfigure("STATS5_TS", 200, 0, "STATS5", 1, 23)
dbLoadRecords("/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template", "P=MOBICDTE:,R=Stats5:TS:, PORT=STATS5_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=STATS5,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
# Create a transform plugin
NDTransformConfigure("TRANS1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDTransform.template", "P=MOBICDTE:,R=Trans1:, PORT=TRANS1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create an overlay plugin with 8 overlays
NDOverlayConfigure("OVER1", 200, 0, "SIM1", 0, 8, 0, 0, 0, 0, 4)
dbLoadRecords("NDOverlay.template", "P=MOBICDTE:,R=Over1:, PORT=OVER1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:1:,NAME=ROI1, SHAPE=1,O=Over1:,XPOS=MOBICDTE:ROI1:MinX_RBV,YPOS=MOBICDTE:ROI1:MinY_RBV,XSIZE=MOBICDTE:ROI1:SizeX_RBV,YSIZE=MOBICDTE:ROI1:SizeY_RBV,PORT=OVER1,ADDR=0,TIMEOUT=1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:2:,NAME=ROI2, SHAPE=1,O=Over1:,XPOS=MOBICDTE:ROI2:MinX_RBV,YPOS=MOBICDTE:ROI2:MinY_RBV,XSIZE=MOBICDTE:ROI2:SizeX_RBV,YSIZE=MOBICDTE:ROI2:SizeY_RBV,PORT=OVER1,ADDR=1,TIMEOUT=1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:3:,NAME=ROI3, SHAPE=1,O=Over1:,XPOS=MOBICDTE:ROI3:MinX_RBV,YPOS=MOBICDTE:ROI3:MinY_RBV,XSIZE=MOBICDTE:ROI3:SizeX_RBV,YSIZE=MOBICDTE:ROI3:SizeY_RBV,PORT=OVER1,ADDR=2,TIMEOUT=1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:4:,NAME=ROI4, SHAPE=1,O=Over1:,XPOS=MOBICDTE:ROI4:MinX_RBV,YPOS=MOBICDTE:ROI4:MinY_RBV,XSIZE=MOBICDTE:ROI4:SizeX_RBV,YSIZE=MOBICDTE:ROI4:SizeY_RBV,PORT=OVER1,ADDR=3,TIMEOUT=1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:5:,NAME=Cursor1,SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk,
YSIZE=junk, PORT=OVER1,ADDR=4,TIMEOUT=1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:6:,NAME=Cursor2,SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk,
YSIZE=junk, PORT=OVER1,ADDR=5,TIMEOUT=1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:7:,NAME=Box1, SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk,
YSIZE=junk, PORT=OVER1,ADDR=6,TIMEOUT=1")
dbLoadRecords("NDOverlayN.template","P=MOBICDTE:,R=Over1:8:,NAME=Box2, SHAPE=1,O=Over1:,XPOS=junk, YPOS=junk, XSIZE=junk,
YSIZE=junk, PORT=OVER1,ADDR=7,TIMEOUT=1")
# Create 2 color conversion plugins
NDColorConvertConfigure("CC1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDColorConvert.template", "P=MOBICDTE:,R=CC1:, PORT=CC1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
NDColorConvertConfigure("CC2", 200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDColorConvert.template", "P=MOBICDTE:,R=CC2:, PORT=CC2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create a circular buffer plugin
NDCircularBuffConfigure("CB1", 200, 0, "SIM1", 0, 200, 0)
dbLoadRecords("NDCircularBuff.template", "P=MOBICDTE:,R=CB1:, PORT=CB1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
# Create an NDAttribute plugin with 8 attributes
NDAttrConfigure("ATTR1", 200, 0, "SIM1", 0, 8, 0, 0, 0)
dbLoadRecords("NDAttribute.template", "P=MOBICDTE:,R=Attr1:, PORT=ATTR1,ADDR=0,TIMEOUT=1,NCHANS=2048,NDARRAY_PORT=SIM1")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:1:, PORT=ATTR1,ADDR=0,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:2:, PORT=ATTR1,ADDR=1,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:3:, PORT=ATTR1,ADDR=2,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:4:, PORT=ATTR1,ADDR=3,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:5:, PORT=ATTR1,ADDR=4,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:6:, PORT=ATTR1,ADDR=5,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:7:, PORT=ATTR1,ADDR=6,TIMEOUT=1,NCHANS=2048")
dbLoadRecords("NDAttributeN.template", "P=MOBICDTE:,R=Attr1:8:, PORT=ATTR1,ADDR=7,TIMEOUT=1,NCHANS=2048")
NDTimeSeriesConfigure("ATTR1_TS", 200, 0, "ATTR1", 1, 8)
dbLoadRecords("/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/db/NDTimeSeries.template", "P=MOBICDTE:,R=Attr1:TS:, PORT=ATTR1_TS,ADDR=0,TIMEOUT=1,NDARRAY_PORT=ATTR1,NDARRAY_ADDR=1,NCHANS=2048,ENABLED=1")
NDFFTConfigure("FFT1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDFFT.template", "P=MOBICDTE:, R=FFT1:, PORT=FFT1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=SIM1, NAME=FFT1, NCHANS=512")
NDCodecConfigure("CODEC1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDCodec.template", "P=MOBICDTE:, R=Codec1:, PORT=CODEC1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=SIM1")
NDCodecConfigure("CODEC2", 200, 0, "SIM1", 0, 0, 0, 0, 0, 5)
dbLoadRecords("NDCodec.template", "P=MOBICDTE:, R=Codec2:, PORT=CODEC2, ADDR=0, TIMEOUT=1, NDARRAY_PORT=SIM1")
set_requestfile_path("./")
set_requestfile_path("/usr/local/epics/synApps/support/areaDetector-R3-7/ADCore/ADApp/Db")
set_requestfile_path("/usr/local/epics/synApps/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("MOBICDTE:")
dbLoadRecords("/usr/local/epics/synApps/support/autosave-R5-10/asApp/Db/save_restoreStatus.db", "P=MOBICDTE:")
# 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
# 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")
# Create a standard arrays plugin, set it to get data from FFT plugin.
# NDStdArraysConfigure("Image2", 3, 0, "FFT1", 0)
# This waveform allows transporting 64-bit images, so it can handle any detector data type at the expense of more memory and bandwidth
# dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image2:,PORT=Image2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=FFT1,TYPE=Float64,FTVL=DOUBLE,NELEMENTS=12000000")
# set_requestfile_path("$(ADSIMDETECTOR)/simDetectorApp/Db")
# set_requestfile_path("$(ADMOBIPIX)/simDetectorApp/Db")
# > #define ASYN_TRACE_ERROR 0x0001
# > #define ASYN_TRACEIO_DEVICE 0x0002
# > #define ASYN_TRACEIO_FILTER 0x0004
# > #define ASYN_TRACEIO_DRIVER 0x0008
# > #define ASYN_TRACE_FLOW 0x0010
# > #define ASYN_TRACE_WARNING 0x0020
# asynSetTraceIOMask("$(PORT)",0,2)
# asynSetTraceMask("$(PORT)", -1, ASYN_TRACE_ERROR | ASYN_TRACE_FLOW | ASYN_TRACE_WARNING)
# asynSetTraceMask("$(PORT)", -1, 255)
# asynSetTraceMask("IPORT1", 0, 255)
# asynSetTraceIOMask("FileNetCDF",0,2)
# asynSetTraceMask("FileNetCDF",0,255)
# asynSetTraceMask("FileNexus",0,255)
# asynSetTraceMask("SIM2",0,255)
# hxxps://github.com/ISISComputingGroup/ibex_developers_manual/wiki/ASYN-Trace-Masks-(Debugging-IOC,-ASYN)
# 0x1: ASYN_TRACE_ERROR - Print error messages (default)
# 0x2: ASYN_TRACEIO_DEVICE - Device support reports I/O activity.
# 0x4: ASYN_TRACEIO_FILTER - Any layer between device support and the low level driver
# 0x8: ASYN_TRACEIO_DRIVER - Low level driver reports I/O activity
# 0x10: ASYN_TRACE_FLOW - Report logic flow
# 0x20: ASYN_TRACE_WARNING - Report warnings, i.e. conditions between ASYN_TRACE_ERROR and ASYN_TRACE_FLOW
# 0x0 (ASYN_TRACEIO_NODATA) - Print count of bytes transferred, but not bytes themselves
# 0x1 (ASYN_TRACEIO_ASCII) - Print bytes with a "%s" style format
# 0x2 (ASYN_TRACEIO_ESCAPE) - Calls epicsStrPrintEscaped() to display bytes
# 0x4 (ASYN_TRACEIO_HEX) - Print hexadecimal values of each byte with " %2.2x"
# 0x1 (ASYN_TRACEINFO_TIME) prints the date and time of the message (default)
# 0x2 (ASYN_TRACEINFO_PORT) prints [port,addr,reason], where port is the port name, addr is the asyn address, and reason is
# pasynUser->reason. These are the 3 pieces of "addressing" information in asyn.
# 0x4 (ASYN_TRACEINFO_SOURCE) prints the file name and line number, i.e. [FILE,LINE] where the asynPrint or asynPrintIO statement occurs.
# 0x8 (ASYN_TRACEINFO_THREAD) prints the thread name, thread ID and
# thread priority, i.e. [epicsThreadGetNameSelf(), epicsThreadGetIdSelf(), epicsThreadGetPrioritySelf()].
# ASYN_TRACE_ERROR | ASYN_TRACE_WARNING, use ASYN_TRACE_ERROR | ASYN_TRACE_FLOW | ASYN_TRACE_ERROR for debug
asynSetTraceMask("SIM1", -1, 0x21)
# Enable ASYN_TRACEIO_ASCII
asynSetTraceIOMask("SIM1", -1, 1)
# ASYN_TRACEINFO_TIME | ASYN_TRACEINFO_PORT
#asynSetTraceInfoMask("$(PORT)",- 1, x03)
asynSetTraceFile("SIM1", 0, "/tmp/log0.out")
############################################################################
## Rev. 2021-04-06T08:41-0300
############################################################################
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.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.iocRun: All initialization complete
# save things every thirty seconds
#create_monitor_set("auto_settings.req", 30, "P=$(PREFIX)")
# config do asyn, hybrid, 0: IMAX=256 (for binary and hybrid)
# ifmt ascii limits to 40 chars
# use caput -S PV:asyn.BOUT "adsfasdf"
# use caget -S PV:asyn.BINP
dbpf MOBICDTE:asyn.IFMT "Hybrid"
dbpf MOBICDTE:asyn.OFMT "Hybrid"
dbpf MOBICDTE:asyn.NRRD 0
dbpf MOBICDTE:asyn.OEOS "\n"
dbpf MOBICDTE:asyn.IEOS "\n"
dbpf MOBICDTE:HDF1:FilePath "/mnt/h5"
dbpf MOBICDTE:HDF1:FileName "test1"
dbpf MOBICDTE:HDF1:FileTemplate "%s%s_%3.3d.h5"
DBF_CHAR[14]: "%s%s_%3.3d.h5"
# dbpf $(PREFIX)HDF1:XMLFileName "./test1_layout.xml"
dbpf MOBICDTE:HDF1:AutoIncrement 1
dbpf MOBICDTE:HDF1:FileNumber 1
dbpf MOBICDTE:HDF1:FileWriteMode "Stream"
dbpf MOBICDTE:HDF1:AutoSave 1
dbpf MOBICDTE:HDF1:EnableCallbacks "Enable"
dbpf MOBICDTE:cam:ViTimeout 1000
dbpf MOBICDTE:Backend:acquire_time 1000000000000
dbpf MOBICDTE:Backend:num_exposures 1000
dbpf MOBICDTE:image1:EnableCallbacks 1
dbpf MOBICDTE:image2:EnableCallbacks 1
dbpf MOBICDTE:image:EnableCallbacks 1
dbpf MOBICDTE:cam:ArrayCallbacks "Enable"
# # dbpf $(PREFIX)cam2:ArrayCallbacks "Enable"
# # dbpf $(PREFIX)cam:ArrayCallbacks "Enable"
############DEBUG DELETE LATER################
dbgf MOBICDTE:Trans1:NDArrayPort
dbpf MOBICDTE:Trans1:EnableCallbacks 1
dbpf MOBICDTE:Trans1:Type 1
dbpf MOBICDTE:HDF1:NDArrayPort "TRANS1"
dbpf MOBICDTE:image:NDArrayPort "TRANS1"
DBF_STR
Hi,
dbpf MOBICDTE:Trans1:NDArrayPort "SIM1"
dbpf MOBICDTE:HDF1:NDArrayPort "TRANS1"
dbpf MOBICDTE:image:NDArrayPort "TRANS1”
Yes, that would be valid.
2022/06/22 19:47:09.533 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
2022/06/22 19:47:10.635 asynPortDriver:getAddress: TRANS1 invalid address=2, must be in range 0 to 0
And the messages kept going untill i finally gave up and stopped acquisition. I suspect this has something to do with MOBICDTE:image:NDArrayAddress = 2 and MOBICDTE:Trans1:NDArrayAddress = 0. But i cannot understand exactly what is going on or what is the problem
with Trans1:NDArrayAddress being equal to 2.
I’m not too sure. As I understand it, mobipixConfig is producing 3 NDArray objects on different addresses on the same port, like this:
SIM1, ADDR=0
SIM1, ADDR=1
SIM1, ADDR=2
?
So you might want 3 transform plugins with a configuration something like:
NDTransformConfigure(“TRANS0”, 200, 0, “SIM1”, 0, 0, 0, 0, 0)
NDTransformConfigure(“TRANS1”, 200, 0, “SIM1”, 1, 0, 0, 0, 0)
NDTransformConfigure(“TRANS2”, 200, 0, “SIM1”, 2, 0, 0, 0, 0)
(Or, you could have a single plugin and reassign NDArrayAddress depending on which one you want to deal with).
Similarly, the 3 StdArray plugins would be the following, which is what you pasted below:
NDStdArraysConfigure(“Image1", 200, 0, "SIM1", 0, 0, 0, 0, 0)
NDStdArraysConfigure(“Image2", 200, 0, "SIM1", 1, 0, 0, 0, 0)
NDStdArraysConfigure(“Image", 200, 0, "SIM1", 2, 0, 0, 0, 0)
And when you instantiate the database template files, NDARRAY_ADDR would be set to 0, 1 or 2 (not the ADDR, which would stay at 0). So I think the example for NDStdArrays.template which you pasted below might
be wrong. The ADDR parameter is the address used by the Asyn port for the plugin itself (to set and read parameters in the plugin), rather than the address of the port used for the NDArray callbacks.
Also, if you are using autosave, you might want to delete or rename the autosave file (between IOC reboots) because that can be confusing for complex areaDetector applications if you’ve been trying out different
port names and addresses.
Cheers,
Matt
I found this in the st.cmd file that i think helps in the discussion:
# mobipixConfig(const char *portName, int maxSizeX, int maxSizeY, int dataType,
# int maxBuffers, int maxMemory, int priority, int stackSize)
mobipixConfig("SIM1", 512,
512, 3, 0, 0)
#... a few lines after:
dbLoadRecords("NDStdArrays.template",
"P=MOBICDTE:,R=image:,PORT=Image,ADDR=2,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
But im still kinda lost.
Hi,
I think you need to chain the plugins together, rather than have them all point to SIM1.
If you modify the StdArray plugins to register for callbacks from TRANS1, it should work.
For example:
SIM1->TRANS1->Image
The HDF plugin can either point to the SIM1 or TRANS1, depending on if you want the saved image rotated or not.
Cheers,
Matt
Hello all.
Im implementing the NDTransform plugin for an areaDetector IOC made here and following these documentations for this:
hxxps://areadetector.github.io/master/ADCore/NDPluginTransform.html#
hxxps://areadetector.github.io/master/ADCore/NDPluginDriver.html and
hxxps://areadetector.github.io/master/ADCore/NDPluginTransform.html#.
Basically, i want a given image to rotate by 90 degrees and the documentation made me believe that this shouldnt be much trouble. The Array i want to rotate is a PV called MOBICDTE:image:ArrayData. I currently load the plugins via standard plugin file: commonPlugins.cmd
inside ADCore and it seems to work since we are saving files in hdf5 format with the HDF plugin. The HDF plugin was also loaded with default macros from commonPlugins.cmd.
However, when i try to rotate the image by doing:
dbpf MOBICDTE:Trans1:EnableCallbacks 1
dbpf MOBICDTE:Trans1:Type 1
simply nothing changes in my visualizer when i start acquisition. I tried changing the configurations in the default commonPlugins.cmd file and comparing them with MOBICDTE:image paramaters but im not getting any luck with this. Does anyone have any tips on
how to proceed?
What i tried so far:
The initial configurations were as follows:
NDStdArraysConfigure("Image1", 200, 0, "SIM1", 0, 0, 0, 0, 0, 5)
NDStdArraysConfigure("Image2", 200, 0, "SIM1", 1, 0, 0, 0, 0, 5)
# *** image is a combined image of image1 and image2***
NDStdArraysConfigure("Image", 200, 0, "SIM1", 2, 0, 0, 0, 0, 5)
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image1:,PORT=Image1,ADDR=0,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image2:,PORT=Image2,ADDR=1,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
dbLoadRecords("NDStdArrays.template", "P=MOBICDTE:,R=image:,PORT=Image,ADDR=2,TIMEOUT=2,NDARRAY_PORT=SIM1,TYPE=Int16,FTVL=SHORT,NELEMENTS=12000000")
... #Then elsewhere, from the commonPlugins.cmd file:
NDTransformConfigure("TRANS1",
200, 0, "SIM1", 0, 0, 0, 0, 0, 4)
dbLoadRecords("NDTransform.template",
"P=MOBICDTE:,R=Trans1:, PORT=TRANS1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=SIM1")
and by dbgf i could see that:
MOBICDTE:image:PluginType_RBV = NDPluginStdArrays
MOBICDTE:Trans1:PlguinType_RBV = NDPluginTransform
MOBICDTE:image:NDArrayPort_RBV = SIM1
MOBICDTE:Trans1:ArrayPort_RBV = SIM1
MOBICDTE:image:NDArrayAddress_RBV = 0x2
MOBICDTE:Trans1:NDArrayAddress_RBV = 0x0
MOBICDTE:image:QueueSize_RBV = 0xc8
MOBICDTE:Trans1:QueueSize_RBV = 0xc8
MOBICDTE:image:MaxThreads_RBV = 0x5
MOBICDTE:Trans1:MaxThreads_RBV = 0x4
So i thought i should change Trans1:NDArrayAddress to 0x2 by dbpf. Not only it did not work, but i also noticed that
MOBICDTE:HDF1:NDArrayAddress = 0x0
And the HDF plugin works fine, so i dont think the problem is the address anymore.
Am i doing something wrong? Im quite new to this plugin concept when applied to Area Detector. Thanks in advance for any help.
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual
consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible
querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.
|