EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Time Stamping
From: Ned Arnold <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Tue, 23 Mar 1999 08:40:57 -0600 (CST)
> Hello,
> 
> We need to time stamp our data. The customer has suggested using a soft
> channel. Is that the best way?
> And how would that be implemented?
> 
> Any other ideas on how to do this?  
> 
> I'm relatively new to EPICS so feel free to be very thorough and simple.
> 
> 
> Thanks!!!
> 
> 
> Natalie Otey
> KineticSystems


Each EPICS record has a "time stamp" field (.TIME) that gets updated 
every time the record processes. The Time Stamp is available via a channel
access option and is used by many clients (archiver, alarm handler, etc). 
If the record only processes when "new data" is available (such as due to 
an interrupt), the time stamp field is very useful. It is also useful 
for passive output records. medm will show the time stamp of a record using its
PV Info tool, which is frequently used here to see when a process variable
was last "controlled". The time stamp is not very useful for periodically
scanned records (other than informing you it is still scanning periodically !).

The format of .TIME is not very user friendly. You cannot fetch it directly
from channel access (using a caget) and even if you could you would end up
with a structure of two long unsigned INTs (or something like that). That is
why some have written device support for a string record which converts
the time stamp of a record to a string such as ... 

         03/19/99 07:36:07.064915
         
which can then be conveniently displayed in medm. The disadvantage is that
it requires a record for each time stamp you want. The code is very simple:

   tsStampToText(&psi->time, TS_TEXT_MMDDYY, psi->val);


Without additional hardware, these timestamps have the resolution of the
vxWorks tick clock (60 Hz for us). With custom hardware, we have some 
ioc's sync'd to within 1 microsecond.


Hope that helps get you started. There are better experts out there than 
me !

		Ned
		

Navigate by Date:
Prev: Re: database race condition? Till Straumann
Next: Re: database race condition? Andrew Johnson
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Time Stamping Natalie Otey
Next: FW: slow VxWorks boot under Solaris 2.6 Jeff Hill
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
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 ·