EPICS Home

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  <20182019  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  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: CalcOut record update to another record
From: Amien WORK <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Date: Thu, 25 Jan 2018 11:25:02 +0200

Hi


    record(calcout,        "$(dev):cur") 
    {
        field(INPA,        "$(dev):raw_cur.VAL CP MS")
        field(INPB,        "$(dev):coefOffset.PROC CP MS")
        field(OOPT,        "Every Time")
        field(DOPT,        "Use CALC")
        field(CALC,        "A-B")
        field(FLNK,        "$(dev):rangeunit")
    }
   
    record(ao,             "$(dev):newcur")         
    {
        field(DTYP,        "Soft Channel")
    }
   
    record(sel,            "$(dev):coefOffset")         
    {
        field(SELM,        "Specified")
        field(NVL,         "$(dev):range")
        field(INPB,        "$(dev):calc_offset1.VAL")       
        field(INPC,        "$(dev):calc_offset2.VAL")       
        field(INPD,        "$(dev):calc_offset3.VAL")       
        field(INPE,        "$(dev):calc_offset4.VAL")       
        field(INPF,        "$(dev):calc_offset5.VAL")       
        field(INPG,        "$(dev):calc_offset6.VAL")       
        field(INPH,        "$(dev):calc_offset7.VAL")       
        field(INPI,        "$(dev):calc_offset8.VAL")       
        field(FLNK,        "$(dev):newcur") 
       
    }

    ## below is offset1 of 8 possible offsets I need to save

    record(bo,            "$(dev):store_offset1")         
    {
        field(PINI,        "YES")
        field(VAL,        "0")
        field(FLNK,        "$(dev):calc_offset1" )
    }
    record(bo,            "$(dev):clear_offset1")         
    {
        field(VAL,        "0")
        field(OUT,        "$(dev):store_offset1")
        field(FLNK,        "$(dev):store_offset1")
    }
    record(calcout,        "$(dev):calc_offset1") 
    {
        field(PINI,        "YES")
        field(INPA,        "$(dev):raw_cur.VAL")   # rawval
        field(INPB,        "$(dev):store_offset1")
        field(OOPT,        "Every Time")
        field(DOPT,        "Use CALC")
        field(CALC,        "B=1?A:0*A")
        field(OUT,         "$(dev):newcur")
    }

My problem is that I see the calculated values like $(dev):calc_offset1 correctly, but the $(dev):newcur shows 0.

I want to have a 'current' offset (newcur)  that changes depending on what the current 'range' is (user can select Range 1 to 8)

Amien



Replies:
Re: CalcOut record update to another record Mark Rivers

Navigate by Date:
Prev: Re: More streamDevice and Asyn issues... Eric Norum
Next: Problems with scaler record on epics archiver Gabriel de Souza Fedel
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: More streamDevice and Asyn issues... Eric Norum
Next: Re: CalcOut record update to another record Mark Rivers
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  <20182019  2020  2021  2022  2023  2024