Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: Sequencer embedded C code question
From: "Jiro Fujita" <jiro.fujita@gmail.com>
To: tech-talk@aps.anl.gov, "Tim Mooney" <mooney@aps.anl.gov>
Date: Thu, 29 Jun 2006 17:13:44 -0400
Thanks, Tim.
I will also look into this as well.  I think we may actually be using
some part of this on the production machines (I know we use some part
of SynApps, so may be I should have on the test machine).

On 6/29/06, Tim Mooney <mooney@aps.anl.gov> wrote:
I'm not sure if this will be any less trouble than the solution you're
already pursuing, because it requires a record that is not part of EPICS base.
But if you happen to have the sCalcout record available, you can do this with
an sCalcout and a dfanout.  Here's what the database would look like:

scalc.INAA = <link to input string>   # string from serial device
scalc.CALC = "int(aa)"                # get channel number
scalc.DOPT = "Use OCAL"               # evaluate '.OCAL' expression
scalc.OCAL = "dbl(aa[1,-1])"          # get value (skip past channel number)
scalc.OUT  = "dfanout.VAL PP"         # write value to dfanout

dfanout.SELM = "Specified"            # only write to link specified via SELL
dfanout.SELL = "scalc.VAL NPP"        # scalc calculated link to use
dfanout.OUTB = <link to channel 1 PV> # if scalc.VAL==1, write to <channel 1 PV>
dfanout.OUTC = <link to channel 2 PV> # ...and so on
dfanout.OUTD = <link to channel 3 PV>
dfanout.OUTE = <link to channel 4 PV>
dfanout.OUTF = <link to channel 5 PV>

--
Tim Mooney (mooney@aps.anl.gov) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab



References:
Sequencer embedded C code question Jiro Fujita
Re: Sequencer embedded C code question Tim Mooney

Navigate by Date:
Prev: Re: Sequencer embedded C code question Maren Purves
Next: Re: Sequencer embedded C code question Jiro Fujita
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: Sequencer embedded C code question Maren Purves
Next: Re: Sequencer embedded C code question Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·