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  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Time stamp question
From: "Martin L. Smith" <[email protected]>
To: Andrew Wagner <[email protected]>
Cc: [email protected]
Date: Wed, 01 Sep 2010 09:13:36 -0500
Hi Andrew,

I use the following an database to tell me when 1 minute has elapsed ... not
sure that this will help with what you need but it might give you another idea.

record(stringin,"S:SRsecsPastEpochSI") {
        field(DESC,"Seconds Past Epoch")
        field(DTYP,"Soft Timestamp")
        field(SCAN,"1 second")
        field(FLNK,"S:SRsecsPastEpoch PP NMS")
        field(PINI,"YES")
        field(INP,"@%s")
}
record(scalcout,"S:SRsecsPastEpoch") {
        field(DESC,"Sec Past Epoch")
        field(DTYP,"Soft Channel")
        field(CALC,"INT(A)-INT(B)")
        field(INPA,"S:SRsecsPastEpochSI.VAL NPP NMS")
        field(INPB,"631152000")
        field(OOPT,"Never")
        field(FLNK,"XFD:IntervalMinute PP NMS")
        field(PREC,"0")
        field(EGU,"Sec")
}
record(calcout,"XFD:IntervalMinute") {
        field(CALC,"A%B = 0? 1:0")
        field(INPA,"S:SRsecsPastEpoch.VAL NPP NMS")
        field(INPB,"60")
        field(OUT,"XFD:FillArrays.PROC PP NMS")
        field(OOPT,"Transition To Non-zero")
}

Marty

Andrew Wagner wrote:
Hey guys,

I have a Calcout record that needs to calculate the time between its present and previous processing. How can I best accomplish this? Searching the tech-talk forum I've found that there is DTYP, "Soft Timestamp" which I suppose gets the system time. I would like to compute the time difference in seconds so is it possible to create an AI record

record(ai, "TIme") { field(DESC, "System Time")
field(DTYP, "Soft Timestamp")
field(INP, "%s")
}


that gets seconds since the epoc I can use as an input to Calcout record?

Cheers,

Andrew




References:
Time stamp question Andrew Wagner

Navigate by Date:
Prev: Re: Time stamp question Tim Mooney
Next: Re: areaDetector video (Was: network video) J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Time stamp question Andrew Johnson
Next: Re: Time stamp question Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·