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  <20122013  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  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Get a time difference in EPICS database
From: 洪春霞 <[email protected]>
To: <[email protected]>
Date: Fri, 23 Nov 2012 16:07:26 +0800
Title: Get a time difference in EPICS database

Hi,
I want to get a time difference in EPICS database, the record of h:Systemtime1 is run when ioc is start, that is, it is the realtime time.
The record of h:Systemtime2 is get when A=3 in the record(calcout,"h:monitor_time"), and it should be executed once, but now I can not get the time of h:Systemtime2.
When I input “camonitor h:Systemtime2” in another Terminal, I always get “h:Systemtime2 <underfined> UDF INVALID”,and I input “camonitor h:time_plus” in another Terminal, I get the time is the value of C.
That is to say, the record of h:Systemtime2 is not executed.

Can you give me some advice? Thank you very much.
Best Wishes.

The database which I use is as follows:

record(ai, "h:status")
{
}
record(stringin,"h:Systemtime1")
{
        field(DESC,"Systemtime1")
        field(DTYP,"Soft Timestamp")
        field(SCAN,"1 second")
        field(PINI,"YES")
        field(INP,"@%s")
}
record(stringin,"h:Systemtime2")
{
        field(DESC,"Systemtime2")
        field(DTYP,"Soft Timestamp")
        field(INP,"@%s")
        field(DISV,"0")#If DISV=DISA, then the record will be disabled
        field(SDIS,"h:monitor_time PP MS")#
}
#This is the value that is compared with DISV to determine if the record is
#disabled. Its value is obtained via SDIS if SDIS is a database or channel access
#link.
record(calcout,"h:time_difference")
{
        field(CALC,"A=B?(C-D):0")
        field(INPA,"h:status PP NMS")
        field(INPB,"3")
        field(INPC,"h:Systemtime1 PP NMS")
        field(INPD,"h:Systemtime2 NPP NMS")
        field(OUT,"h:time_plus PP NMS")
        field(OOPT,"Transition To Non-zero")
}
------------------------------------------
hongchunxia


Replies:
Re: Get a time difference in EPICS database Tim Mooney

Navigate by Date:
Prev: Re: caRepeater object code not cross-compiled in R3.14.12.2 Dirk Zimoch
Next: Utilities for EPICS on Multi-Core Linux Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: caRepeater object code not cross-compiled in R3.14.12.2 Hill, Jeff
Next: Re: Get a time difference in EPICS database Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·