Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  <20012002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  Index 1994  1995  1996  1997  1998  1999  2000  <20012002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Re: Your Message Sent on Fri, 16 Feb 2001 12:16:07 -0600
From: Ned Arnold <nda@aps.anl.gov>
To: tech-talk@aps.anl.gov, graber@cars.uchicago.edu
Date: Fri, 16 Feb 2001 12:59:30 -0600 (CST)
 
> Hello-
> 	I have a database using the sequence record.  There are times when
> one of the delays can be quite long (DLY2 = 10 minutes). 
> 
> grecord(seq,"$(P)XRA_seq") {
> 	field(DO1,"1")
> 	field(LNK1,"$(P)$(DIO)$(N2).VAL PP NMS")
> 	field(DLY2,".01")
> 	field(DO2,"1")
>  	field(LNK2,"$(P)$(DIO)$(N3).VAL PP NMS")
> }
> If a user makes a mistake and wants to restart the process, the time he/she
> needs to wait for the record to finish processing can be too long. My
> question is, once the record is executed is there a way to stop the record
> from processing or reset it. 
> Thanks
> 
> ============================================
> Dr. Timothy Graber


I don't think you can clear or reset the delay. If this were a requirement,
I would probably use a simple sequencer program, which could be implemented
to provide the reset/clear.

OR, if you are into tricky databases, you could use a calcout 
record to do the delay and provide the reset capability. Something like 
this ... (no guarantees)

grecord(seq,"$(P)XRA_seq") {
        field(DO1,"1")
        field(LNK1,"$(P)$(DIO)$(N2).VAL PP NMS")        
        field(DO2,"10")
        field(LNK2,"delayCALC.VAL CA NMS")
  }
  
grecord(calcout,"delayCALC") {
        field(SCAN,"1 second")
        field(INPA,"delayCALC.VAL NPP NMS") 
        field(INPB,"-10")
        field(CALC,"A<0?B:A>0?A-1:0")
        field(OOPT,"Transition To Zero")
        field(DOPT,"Use OCAL")
        field(OCAL,"1")
        field(OUT,"$(P)$(DIO)$(N3).VAL PP NMS")
  }
  

Theory of operation ...

  $(P)XRA_seq.DO2 is the delay value (in scan times of delayCALC). When LNK2
  is executed, it loads the delay value into delayCALC.VAL (I'm not sure 
  if the CA flag is necessary). When delayCALC scans, it decrements .VAL.
  When .VAL goes from 1 to 0, the result of OCAL (1) is written to 
  the OUT link. delayCALC.VAL remains 0 until the sequence record preloads
  it again.
  
  To reset/clear the delay without processing the OUT link, write a negative
  number to delayCALC.VAL, which will remain negative until preloaded again.
  Since the .VAL field never went to 0, the OUT link will not process.
  
  NOT TESTED !!!!!
  
  
  	Ned
  	
  
  
  
  
  
  



Navigate by Date:
Prev: Delays in seq records Ralph Lange
Next: Callbacks and the PCAS question. Brian Tieman
Index: 1994  1995  1996  1997  1998  1999  2000  <20012002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: Delays in seq records Ralph Lange
Next: Callbacks and the PCAS question. Brian Tieman
Index: 1994  1995  1996  1997  1998  1999  2000  <20012002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·