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  <20212022  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  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Control SCAN field with ai record
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Wed, 19 May 2021 14:29:20 +0200
Hi Tom,

The SCAN field is an enum, i.e. a menu with a limited fixed set of choices.
As with all enum/menu fields: If you write a number to it, it will be interpreted as an index into the set of choices. If you write a string, it will be matched against the choice strings.

See the Record Reference Manual (https://epics.anl.gov/base/R7-0/4-docs/RecordReference.html) for more details and available choices.

Cheers,
~Ralph


On Wed, 19 May 2021 at 14:21, Stainer Tom via Tech-talk <tech-talk at aps.anl.gov> wrote:

Dear Epics Community,

 

I have a simple problem that I am sure has been asked before but my previous searches came up blank on tech-talk, so please forgive me if it is trivial.

 

I have a simple database, consisting of two records, as shown below. This works fine, and is one of the most elementary databases you can conceive of, however, you will notice the two commented out lines.

My desire is to have the SCAN field controlled by the “scan:ai1” PV, so I can do some *caput*s to control the scan, say to go from 0.1 second to 2 seconds.

My commented out lines obviously don’t work, but I wondered how this would be possible using the database file.

 

Does anyone have any tips on how to solve this problem? (Or please point me to previous/similar solutions.)

 

# mydb.db

-------------------------------

record(ai, "scan:ai1") {

  field(INP, ".1")

}

 

record(calcout, "scan:calc1"){

#  field(SCAN, "B second")

#  field(INPB, "scan:ai1")

  field(SCAN, ".5 second")

  field(INPA, "scan:calc1.VAL")

  field(CALC, "(A<20)?(A+1):0")

}

-------------------------------

 

Kind regards,

Tom


References:
Control SCAN field with ai record Stainer Tom via Tech-talk

Navigate by Date:
Prev: Control SCAN field with ai record Stainer Tom via Tech-talk
Next: Re: Control SCAN field with ai record Žiga Oven 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Control SCAN field with ai record Stainer Tom via Tech-talk
Next: Re: Control SCAN field with ai record Žiga Oven 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  <20212022  2023  2024 
ANJ, 19 May 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·