EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Accessing Date and Time information
From: Andrew Johnson <[email protected]>
To: David Dudley <[email protected]>
Cc: [email protected]
Date: Fri, 16 Mar 2007 15:51:03 -0500
Hi David,

David Dudley wrote:
Is there a method that allows access of Date and Time information from
inside the database?

I need to set the clocks on some remote devices, and they are all
attached through Modbus.  I need to preset a set of registers and then
trigger a 'load' command on the remote.

Yes, there's a stringin device support delivered as part of Base since R3.14.5 that you can give an strftime string to. Eg:


record(stringin, "$(user)now")
{
    field(DESC, "Current time and date")
    field(DTYP, "Soft Timestamp")
    field(INP, "@%Y-%m-%d %H:%M:%S.%03f")
}

If you need the fields as integers rather than strings you can use one stringin record per field and rely on the numeric conversions built into the database links to convert the VAL field of each record into the appropriate integer -- not wildly efficient, but functional.

- Andrew
--
The right to be heard does not automatically include
the right to be taken seriously. -- Hubert H. Humphrey

Replies:
Re: Accessing Date and Time information Ralph Lange
References:
Accessing Date and Time information David Dudley

Navigate by Date:
Prev: Re: date format Kay-Uwe Kasemir
Next: Re: date format Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Accessing Date and Time information David Dudley
Next: Re: Accessing Date and Time information Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·