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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Record issue - to set aother record value
From: "Amien Crombie [TLABS]" <[email protected]>
To: "Mooney, Tim M." <[email protected]>
Cc: "<[email protected]>" <[email protected]>
Date: Fri, 27 Mar 2015 08:39:56 +0200
Hi Tim

Excellent. Works and concise.
Thanks to all of you.

Amien

On 2015-Mar-26 19:08, Mooney, Tim M. wrote:
> Hi all,
> 
> For completeness of this email thread (and also just for fun) an scalcout solution might look like this:
> 
> record(scalcout, "name") {
>     field(INPA, "$(dev):range")
>     field(AA, "mA")
>     field(BB, "mA")
>     field(CC, "mA")
>     field(DD, "uA")
>     field(EE, "uA")
>     field(FF, "uA")
>     field(GG, "nA")
>     field(HH, "nA")
>     field(CALC, "B:=MAX(1,MIN(8,A))-1; @@B")
>     field(OUT, "$(dev)trueval.EGU PP")
> }
> 
> Tim Mooney ([email protected]) (630)252-5417
> Software Services Group (www.aps.anl.gov)
> Advanced Photon Source, Argonne National Lab
> 
> 
> ________________________________________
> From: [email protected] [[email protected]]  on behalf of Amien Crombie [TLABS] [[email protected]]
> Sent: Thursday, March 26, 2015 9:27 AM
> To: Pearson, Matthew R.
> Cc: <[email protected]>
> Subject: Re: Record issue - to set aother record value
> 
> Matthew it works....thanks a million.
> Thanks to others but I needed this done today and this was easy to add.
> 
> Regards
> Amien
> 
> On 2015-Mar-26 15:51, Pearson, Matthew R. wrote:
>>
>> Hi,
>>
>> You could use a stringout record forward linked from each calcrange record, like:
>>
>> record(acalcout, "$(dev):calcrange1")
>> {
>>
>>      field(FLNK, "$(dev):calcrange1_EGU")
>> }
>>
>> record(stringout, "$(dev):calcrange1_EGU")
>> {
>>     field(VAL, "mA")
>>     field(OUT, "$(dev):trueval.EGU PP")
>> }
>>
>>
>> Cheers,
>> Matt
>>
>>
>> On Mar 26, 2015, at 8:34 AM, Amien Crombie [TLABS] <[email protected]> wrote:
>>
>>> Hi
>>>
>>> Below I have a few records and would like to know how I can set value for "$(dev):trueval"'s EGU.
>>> This text changes according to what the range is at the moment.
>>> So for example, if I call "calcrange2" , I need to set "$(dev):trueval.EGU" to "mA" or
>>> "calcrange4" , I need to set "$(dev):trueval.EGU" to "uA"  etc....
>>> Any help would be appreciated.
>>>
>>>     record   (dfanout, "$(dev):checkrange")
>>>     {
>>>       field(OUTA,    "$(dev):calcrange1 PP")
>>>       field(OUTB,    "$(dev):calcrange2 PP")
>>>       field(OUTC,    "$(dev):calcrange3 PP")
>>>       field(OUTD,    "$(dev):calcrange4 PP")
>>>       field(OUTE,    "$(dev):calcrange5 PP")
>>>       field(OUTF,    "$(dev):calcrange6 PP")
>>>       field(OUTG,    "$(dev):calcrange7 PP")
>>>       field(OUTH,    "$(dev):calcrange8 PP")
>>>       field(SELL,    "$(dev):range")
>>>       field(SELM,    "Specified")
>>>     }
>>>     record(acalcout, "$(dev):calcrange1")
>>>     {
>>>           field(DTYP,  "Soft Channel")
>>>           field(INPA,  "$(dev):rawval")
>>>           field(INPB,  "$(dev):range")
>>>           field(INPC,  "$(dev):offsetR1")
>>>           field(INPD,  "10.0")
>>>           field(OOPT,  "Every Time")
>>>           field(DOPT,  "Use CALC")
>>>           field(CALC,  "B==1?((A-C)/32767.2) * D:A")
>>>           field(OUT,   "$(dev):trueval PP")
>>>    }
>>>
>>>    record(acalcout, "$(dev):calcrange2")
>>>    {
>>>           field(DTYP,  "Soft Channel")
>>>           field(INPA,  "$(dev):rawval")
>>>           field(INPB,  "$(dev):range")
>>>           field(INPC,  "$(dev):offsetR1")
>>>           field(INPD,  "10.0")
>>>           field(OOPT,  "Every Time")
>>>           field(DOPT,  "Use CALC")
>>>           field(CALC,  "B==2?((A-C)/32767.2) * D:A")
>>>           field(OUT,   "$(dev):trueval PP")
>>>    }
>>>    record(ai,         "$(dev):trueval")
>>>    {
>>>           field(DTYP,   "Soft Channel")
>>>           field(EGU,    " mA")
>>>    }
>>>
>>> Thanks
>>> Amien
>>> Cape Town
>>
> 


Replies:
RE: Record issue - to set aother record value Dalesio, Leo
References:
Record issue - to set aother record value Amien Crombie [TLABS]
Re: Record issue - to set aother record value Pearson, Matthew R.
Re: Record issue - to set aother record value Amien Crombie [TLABS]
RE: Record issue - to set aother record value Mooney, Tim M.

Navigate by Date:
Prev: related to controls in edm priya tiwari
Next: RE: Record issue - to set aother record value Dalesio, Leo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Record issue - to set aother record value Mooney, Tim M.
Next: RE: Record issue - to set aother record value Dalesio, Leo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·