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: [External] Re: Scaling mA to A: EPICS or Phoebus?
From: "Leblanc, Gregory via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Cc: Eric Norum <ericnorum at gmail.com>
Date: Fri, 23 Jun 2023 21:29:17 +0000

I knew leaving out the proto file was going to bite me!  They’re using %d, so I guess that means they’re going into rval. 

 

getCurrent {

    out "AD 0";

    in "%d";

}

setCurrent {

    out "DA 0,\$1";

}

 

I modified my records to the following:

 

record(ai, "$(P)$(R)GetCurrent") {

    field(DESC, "Read output current")

    field(DTYP, "stream")

    field(INP, "@devPCU50_300.proto getCurrent $(PORT) $(A)")

    field(SCAN, "1 second")

    # field(SCAN, "Passive")

    field(PINI, "YES")

    field(EGU, "Amps")

    field(ESLO, "0.001")

    field(LINR, "SLOPE")

}

 

record(ao, "$(P)$(R)SetCurrent") {

    field(DESC, "Write output current")

    field(DTYP, "stream")

    # field(SCAN, "1 second")

    field(SCAN, "Passive")

    field(OUT, "@devPCU50_300.proto setCurrent(%d) $(PORT) $(A)")

    field(PINI, "YES")

    field(VAL, "0")

    field(FLNK, "$(P)$(R)GetCurrent")

    field(EGU, "Amps")

    field(ESLO, "0.001")

    field(LINR, "SLOPE")

}

 

And that seems to be doing what I want (screenshot attached). 

 

I think the EGUL and EGUF fields and LINEAR for the LINR field might do the same thing, but I haven’t quite parsed the aiRecord docs yet.

 

Thanks!

     Greg

 

From: Eric Norum <ericnorum at gmail.com>
Sent: Friday, June 23, 2023 12:48 PM
To: Leblanc, Gregory <leblanc at ohio.edu>
Subject: [External] Re: Scaling mA to A: EPICS or Phoebus?

 

Use caution with links and attachments.

And,

field(LINR, “SLOPE”)



Is your protocol file reading into RVAL (%d) or VAL (%e, or f or g)?

If the former then you can use ESLO to convert the value to engineering units — which in this case would be AMPS.

field(ESLO, “0.001”)

field(EGU,  “A”)

 



On Jun 23, 2023, at 9:19 AM, Leblanc, Gregory via Tech-talk <tech-talk at aps.anl.gov> wrote:

 


These power supplies expect commands in mA, and return results in mA, so I made my Phoebus display (bob file and screenshot attached) using mA, and it works OK.  But given that these supplies have an output current of 300A, 300,000 mA looks silly and is hard to read.  Is there a preferred method of tackling this problem?  Since there are "hints" as to the units in the records, it seems like someone has probably run into this before, but I didn't find anything when I searched. Any advice greatly appreciated!
    Greg

 

— 

Eric Norum

 

 

 

 

Attachment: Analyzer_magnet_bob2.png
Description: Analyzer_magnet_bob2.png


Replies:
Re: [External] Re: Scaling mA to A: EPICS or Phoebus? Andrew Johnson via Tech-talk
References:
Scaling mA to A: EPICS or Phoebus? Leblanc, Gregory via Tech-talk

Navigate by Date:
Prev: Real-Time Spectral Analysis of streaming data in EPICS operator screens. Evans, Richard K. (GRC-H000) via Tech-talk
Next: Re: [External] Re: Scaling mA to A: EPICS or Phoebus? Andrew Johnson 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: Re: Scaling mA to A: EPICS or Phoebus? Michael Davidsaver via Tech-talk
Next: Re: [External] Re: Scaling mA to A: EPICS or Phoebus? Andrew Johnson 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, 23 Jun 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·