EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Using subArray record
From: "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 10 Mar 2023 18:53:50 +0000
As Érico Rolim pointed out, we could discover via 

caget PREFIX:GetRnvWav.VAL[0]

That the array was being interpreted as a string, not an actual waveform array. We ended up making the protocol interpret the array instead of a PV because the problem was in converting an scalcout into a waveform.

That way the subArray record worked nice. The question that remains is: is there an easy way to transform an scalcout of numbers separated by spaces into a waveform?

Thanks,

Marco

From: Marco A. Barra Montevechi Filho
Sent: 10 March 2023 12:52
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Using subArray record
 
Hi all. Im trying to use the subArray method to select a single element of a waveform record. The waveform record receives its value from an scalcout record:

record(scalcout,"PREFIX:GetRngCalc") {
  field (DESC, "Calculate channel's range")
  field (INAA, "PREFIX:GetRng CP")
  field (CALC, "(AA-'RNG ')")
}

record(waveform, "PREFIX:GetRngWav"){
field (DESC, "Waveform for ranges")
field (INP, "PREFIX:GetRngCalc.SVAL CP")
}

after the ioc initialization:

dbpf PREFIX:GetRng "RNG 0 1 2 3"
dbgf PREFIX:GetRngWav
DBR_STRING:      "0 1 2 3"

So i suppose it works. However, when i try to add the record:

record(subArray,"PREFIX:INDEX:GetRngCalc") {
  field (DESC, "Calculate channel's range")
  field (INP, "PREFIX:GetRngWav CP")
  field (MALM, "4")
  field (NELM, "1")
  field (INDX, "1")
}

And i try:

dbgf PREFIX:INDEX:GetRngCalc

I get nothing. Am i doing something wrong?
Thanks in advance for any help.


My ioc initialization:

#!../../bin/linux-x86_64/Eras
# https://gitlab.cnpem.br/SOL/synthesizer - Erasv2-ERAS.cmd 1st revision
< envPaths
epicsEnvSet("IOC","iocEras")
epicsEnvSet("TOP","/home/ABTLUS/marco.filho/eras")
epicsEnvSet("ASYN","/usr/local/epics-nfs/modules/R3.15.6/synApps/R6.1/support/asyn-R4-36")
epicsEnvSet("RECCASTER","/usr/local/epics-nfs/apps/recsync/stable/client")
epicsEnvSet("STREAM","/usr/local/epics-nfs/modules/R3.15.6/synApps/R6.1/support/StreamDevice-2-8-9")
epicsEnvSet("CALC","/usr/local/epics-nfs/modules/R3.15.6/synApps/R6.1/support/calc-R3-7-3")
epicsEnvSet("EPICS_BASE","/usr/local/epics-nfs/base/R3.15.6")
epicsEnvSet("BEAMLINE","CAX")
epicsEnvSet("HUTCH","A")
epicsEnvSet("IOCNAME","ERAS022")
epicsEnvSet("STREAM_PROTOCOL_PATH", "/home/ABTLUS/marco.filho/eras/ErasApp/Db")
cd "/home/ABTLUS/marco.filho/eras"
###############################################################################
# Register all support components
dbLoadDatabase "dbd/Eras.dbd"
Eras_registerRecordDeviceDriver (pdbbase)
###############################################################################
# Set up ASYN ports
drvAsynIPPortConfigure("EA", "10.30.13.27:3000")
################################################################################
# Load record instances
# General
dbLoadRecords("ErasApp/Db/dbEras.db","BL=CAX:,HUTCH=A:,M=ERAS022:,PORT=EA")
# Channel 1
dbLoadRecords("ErasApp/Db/dbEras_channel.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=0,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=1,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=2,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=3,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=4,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=5,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=6,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=1,SC=7,PORT=EA")
# Channel 2
dbLoadRecords("ErasApp/Db/dbEras_channel.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=0,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=1,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=2,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=3,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=4,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=5,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=6,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=2,SC=7,PORT=EA")
# Channel 3
dbLoadRecords("ErasApp/Db/dbEras_channel.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=0,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=1,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=2,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=3,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=4,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=5,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=6,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=3,SC=7,PORT=EA")
# Channel 4
dbLoadRecords("ErasApp/Db/dbEras_channel.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=0,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=1,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=2,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=3,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=4,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=5,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=6,PORT=EA")
dbLoadRecords("ErasApp/Db/dbEras_scale_label.db","BL=CAX:,HUTCH=A:,M=ERAS022:,CH=4,SC=7,PORT=EA")
###############################################################################
# Start EPICS
cd "/home/ABTLUS/marco.filho/eras/iocBoot/iocEras"
iocInit
Starting iocInit
############################################################################
## EPICS R3.15.6
## EPICS Base built Sep 27 2021
############################################################################
cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 41289,
cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be
cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete
dbpf CAX:A:ERAS022:GetRng "RNG 1 1 2 3"
DBR_STRING:          "RNG 1 1 2 3"      
dbgf CAX:A:ERAS022:CH1:GetRngCalc
dbgf CAX:A:ERAS022:CH2:GetRngCalc
epics> dbgf CAX:A:ERAS022:GetRngWav
DBR_STRING:          "1 1 2 3"          
epics> dbgf CAX:A:ERAS022:CH1:GetRngCalc



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.


References:
Using subArray record Marco A. Barra Montevechi Filho via Tech-talk

Navigate by Date:
Prev: RE: NDPluginXIP to compile the RIXSCam detector Nicolas Guilhermo Silva Moliterno via Tech-talk
Next: Re: [EXTERNAL] DeferredMoves without setting moving flag Laurenz Rettig via Tech-talk
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  <20232024 
Navigate by Thread:
Prev: Using subArray record Marco A. Barra Montevechi Filho via Tech-talk
Next: DeferredMoves without setting moving flag Laurenz Rettig via Tech-talk
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  <20232024 
ANJ, 10 Mar 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·