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  <20182019  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 
<== Date ==> <== Thread ==>

Subject: Re: Which record is the best to use?
From: Ralph Lange <ralph.lange@gmx.de>
To: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Fri, 13 Apr 2018 09:55:06 +0200
You can actually implement a complete simple state machine using two records:

1 calcout - holds the state, does the condition and next state logic, writes action selector to
1 seq - holds all actions and uses mask mode to execute them

The vacuum example from the SNL/Sequencer training (switching pump and valve depending on pressure) can be implemented using such a two record database.
(Would be a birdie in EPICS Database Golf.)

Cheers,
~Ralph


On Fri, Apr 13, 2018 at 9:01 AM, Mooney, Tim M. <mooney@aps.anl.gov> wrote:

Hi Maren,


Yes, you could do that.  The CALC _expression_, and the OOPT field, have complete control over the circumstances under which the output link is executed.  (And note: if the CALC _expression_ value is not also the value you want the output link to write, you can tell the record to write the result of the OCAL _expression_ instead, using the DOPT field.)


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


From: Maren Purves <m.purves@eaobservatory.org>
Sent: Thursday, April 12, 2018 10:48:49 PM
To: Mooney, Tim M.; Ivashkevych, Oksana; Tech-talk
Subject: Re: Which record is the best to use?
 
You could put in a counter and break out of that loop after a certain
number of tries?

Maren Purves
East Asian Observatory
(I thought I had sent this earlier but got an error)

On 04/11/18 04:40, Mooney, Tim M. wrote:
> One way to implement a loop is which a calcout record.  The CALC
> _expression_ determines whether or not to loop, and the OOPT field
> specifies the condition in which the output link is executed.  The
> output link should a CA link, otherwise EPICS will break what looks to
> it like an infinite loop.
>
>
> Tim Mooney (mooney@aps.anl.gov) (630)252-5417
> Beamline Controls Group (www.aps.anl.gov)
> Advanced Photon Source, Argonne National Lab
>
> ------------------------------------------------------------------------
> *From:* tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on
> behalf of Ivashkevych, Oksana <oksana@bnl.gov>
> *Sent:* Wednesday, April 11, 2018 8:21:46 AM
> *To:* Tech-talk
> *Subject:* Which record is the best to use?
>
>
> Hello,
>
> I would like to automate phasing of servomotors in Delta Tau.
>
> 1.      Send phasing command via asyn, wait
>
> 2.      If Phasing successful(bit x is set), ->DONE
>
> 3.      If Phasing error(bit y is set),  do 1 again.
>
>
>
> I would like to do it in the database, and not via sequencer, because it
> will give me a luxury of using a substitution file and repeating the
> same for 9 motors and looks much easier. It would be interesting to see
> how Delta Tau will handle several simultaneous phasing requests.
>
>
>
> Thank you for your advice.
>
>
>
> Oksana
>



References:
Which record is the best to use? Ivashkevych, Oksana
Re: Which record is the best to use? Mooney, Tim M.
Re: Which record is the best to use? Maren Purves
Re: Which record is the best to use? Mooney, Tim M.

Navigate by Date:
Prev: Re: EPICS Record to SCADA data exchange Ralph Lange
Next: Re: compress record FIFI/LIFO not working Heinz Junkes
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 
Navigate by Thread:
Prev: Re: Which record is the best to use? Mooney, Tim M.
Next: sscan question l123173
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 
ANJ, 13 Apr 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·