1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 <2022> 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 <2022> 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Implementing NDTransform plugin for areaDetector |
From: | "Pearson, Matthew via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "Marco A. Barra Montevechi Filho" <marco.filho at lnls.br>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 13 Sep 2022 20:33:15 +0000 |
Hi,
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 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
# 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")
From: Pearson, Matthew <pearsonmr at ornl.gov> 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 From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Marco A. Barra Montevechi Filho via Tech-talk Hello all.
dbpf MOBICDTE:Trans1:Type 1 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") # *** combined image *** 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:NDArrayAddress_RBV = 0x2 MOBICDTE:image:QueueSize_RBV = 0xc8 MOBICDTE:image:MaxThreads_RBV = 0x5
MOBICDTE:HDF1:NDArrayAddress = 0x0 And the HDF plugin works fine, so i dont think the problem is the address anymore.
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. |