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  <20192020  2021  2022  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Reset counter
From: enum riz via Tech-talk <[email protected]>
To: Tech-talk <[email protected]>
Date: Tue, 12 Nov 2019 06:07:14 +0000 (UTC)
Hi Mark

i made a counter which works fine when i press button it starts and after a fixed value it stop.but whenever i press again button it didnot work.(Independently it works but when i merge this in my file with other code it didnot start with next press button)
i am sending code please tell me how it will reset and starts again when button press. I want a duration of 2 seconds. Led On for 2 second and then off.




record(bi,     "b"){
 field(SCAN,  ".1 second")
 field(ZNAM, "0")
 field(ZNAM, "1")
}

record(calcout,  "t"){
 field(SCAN,  ".1 second")
 field(INPA, "b")
 field(CALC, "A==1?1:0")
}

record(calcout,  "counter"){
 field(SCAN,  ".1 second")
 field(VAL, "0")
 field(INPA, "counter")
 field(INPB, "1")
 field(INPC, "t")
 field(CALC, "C==1&&(A<=9)?(A+B):A")
}

record(calcout,  "reset"){
 field(SCAN,  ".1 second")
 field(INPA, "counter")
 field(CALC, "A<=9?A:0")
}


record(calcout,  "rst"){
 field(SCAN,  ".1 second")
 field(INPA, "reset")
 field(CALC, "A==1?1:0")
}

record(b0,     "out"){
 field(SCAN,  ".1 second")
 field(OMSL, "closed_loop")
 field(DOL, "rst")
 field(ZNAM, "0")
 field(ZNAM, "1")
}



Replies:
Re: Reset counter Simon Reiter via Tech-talk
Re: Reset counter William Layne via Tech-talk

Navigate by Date:
Prev: RE: Linux DMA driver and device support for Xilinx FPGA Ha, Kiman via Tech-talk
Next: Redundancy CCExecInit command problem Tasaddaq Khan 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Segmentation fault when Record Processing in StreamDevice Mark Rivers via Tech-talk
Next: Re: Reset counter Simon Reiter 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  <20192020  2021  2022  2023  2024 
ANJ, 12 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·