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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: StreamDevice redirection to ai record with ASLO question
From: "Zimoch Dirk \(PSI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: Kevin Peterson <kmpeters at anl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sat, 10 Dec 2022 09:23:47 +0000
Hi Kevin,

StreamDevice redirection works exactly like a link or a dbPut (which is what it uses). When you write into ai.VAL using a link, it will not apply ASLO. Neither will using a redirection do.

But your value is an integer (%u). Thus you can write into ai.RVAL and use „Raw Soft Channel“ in ai.DTYP and the ai will convert.

Yours
Dirk

> Am 09.12.2022 um 20:57 schrieb Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov>:
> 
> I'm working with a device that returns multiple integer values in response to queries.  These values need to be scaled by 0.1 to have the correct units.
> 
> The query function in the protocol file looks like this:
> 
> getLedIntensity {
>  out "ip?";
>  in "%(\$1:LED1:intensity_RBV)u,%(\$1:LED2:intensity_RBV)u,%(\$1:LED3:intensity_RBV)u";
> }
> 
> This is how the ai records are configured:
> 
> record(ai, "$(P)$(R):LED$(N):intensity_RBV") {
>  field(DESC, "LED $(N) intensity RBV")
>  field(PREC, "1")
>  # The raw value is in tenths of a percent
>  field(LINR, "NO CONVERSION")
>  field(ASLO, "0.1")
>  field(HOPR, "100.0")
>  field(LOPR, "0.0")
> }
> 
> When the intensities are queried, the ai records have VAL fields that have not been scaled by the ASLO value.
> 
> Does the redirection-to-record feature of streamDevice circumvent the RVAL conversion for ai records?  If not, is there something obviously wrong with this approach?
> 
> This support resides in an older IOC that is using base-3.15.6 and StreamDevice 2-8-9.
> 
> Thanks ahead of time.
> 
> Kevin
> 
> -- 
> My working hours may not be your working hours. Please do not
> feel obligated to reply outside of your normal work schedule.

Replies:
Re: StreamDevice redirection to ai record with ASLO question Kevin Peterson via Tech-talk
References:
StreamDevice redirection to ai record with ASLO question Kevin Peterson via Tech-talk

Navigate by Date:
Prev: StreamDevice redirection to ai record with ASLO question Kevin Peterson via Tech-talk
Next: Re: How to: IOC reading information from file? Marco A. Barra Montevechi Filho 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  <20222023  2024 
Navigate by Thread:
Prev: StreamDevice redirection to ai record with ASLO question Kevin Peterson via Tech-talk
Next: Re: StreamDevice redirection to ai record with ASLO question Kevin Peterson 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  <20222023  2024 
ANJ, 12 Dec 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·