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  <20162017  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  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Error msg
From: Stefen Paul <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Wed, 15 Jun 2016 13:05:18 +0530
Hi Andrew,

Thanks for suggesting the solutions.

For first problem (RebootHook) I am half way through in applying the solution. 
The apsRebootHook.c file apparently needs a header file "apsLib.h" which I am not able to locate in EPICS installation or on the internet. Could you please provide the same.

For the second problem (NTP):
- I installed TimeTools NTP server on host PC. 
- In st.cmd file I am setting EPICS_TS_NTP_INET as the  IP address of this host using putenv call. (before calling munch file and iocInit)
- Above step is successful as I am able to verify it on the target's IOC with epicsEnvShow. 
- But somehow the time is not getting synced. The NTP server shows time as UTC and Local system time. Is it the right TIME_ZONE that EPICS accepts ? 

Thanks,
Stefen.

On Mon, Jun 13, 2016 at 9:00 PM, Andrew Johnson <[email protected]> wrote:
Hi Stefen,

On 06/13/2016 01:13 AM, Stefen Paul wrote:
> *Message-1:*
>
> ld 0,0, "app1.munch"
>
> BSP routine sysAtReboot() not found, epicsExit() will not be called by
> reboot.  For reduced functionality, call
> rebootHookAdd(epicsExitCallAtExits)

This is a message from the EPICS code warning you that if you want the
IOC to be able to close its network sockets nicely in response to a
Ctrl+X reboot, you need to make a minor change to your VxWorks source
code. The change is optional, the IOC will work fine without it, but
with it any CA clients will be notified about the IOC rebooting sooner,
and some older network-attached devices using Asyn might not recover
from the IOC rebooting without themselves needing a reboot unless you
add it.

The description of this change at
http://www.aps.anl.gov/epics/tech-talk/2005/msg00004.php was written for
older VxWorks versions; for recent VxWorks 6.x versions I copy the
attached apsRebootHook.c file to
  $(WIND_HOME)/vxworks-$(VXWORKS_VERSION)/target/config/comps/src
and then add the following components to my build:

Folder FOLDER_EPICS {
    NAME        EPICS Components and Configuration
    SYNOPSIS    Additional components for APS use. \
    _CHILDREN   FOLDER_ROOT
}

Component INCLUDE_EPICS_REBOOTHOOK {
    NAME        Early RebootHook capture
    SYNOPSIS    Run sysRebootHook before the network shuts down.
    CONFIGLETTES apsRebootHook.c
    INIT_RTN    rebootHookAdd(sysRebootHook);
    _INIT_ORDER usrRoot
    INIT_AFTER  usrKernelExtraInit
    INIT_BEFORE usrNetworkInit
    _CHILDREN   FOLDER_EPICS
    _DEFAULTS   FOLDER_EPICS
}

Copy the above component definitions into a new file
 $(WIND_HOME)/vxworks-$(VXWORKS_VERSION)/target/config/comps/vxWorks/50folder_epics.cdf
then close and reopen your VxWorks Image Project inside Workbench and
you should be able to see and add the above components to your the
Kernel Configuration.


> *Message-2:*
>
> iocInit
> Starting iocInit
> ############################################################################
> ## EPICS R3.14.12.4 $Date: Mon 2013-12-16 15:51:45 -0600$
> ## EPICS Base built Oct 16 2014
> ############################################################################
> WARNING: OS Clock time was read before being set.
> Using 1990-01-02 00:00:00.000000 UTC
> iocRun: All initialization complete
> value = 0 = 0x0
>
> Any clues regarding these messages .... may be we need to set the time
> properly for the second case.

Does the IOC ever get the correct time after that?

As Mark Rivers said unless you have configured it otherwise the EPICS
code will ask the boot host for the time using the NTP protocol, but you
can override that and specify a different host for NTP by setting the
environment variable EPICS_TS_NTP_INET with the IP address of the
correct server.

Recent versions of VxWorks also have a built-in time synchronization
task which you can configure while building the OS. In Base-3.15.4 and
later we don't start our own NTP sync task if the OS task is already
running, in which case the above environment variable will never be
used, so you'll want to make sure you have the OS configuration
variables set properly.

HTH,

- Andrew

--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon


Replies:
Re: Error msg Andrew Johnson
References:
Error msg Stefen Paul
Re: Error msg Dirk Zimoch
Re: Error msg Dirk Zimoch
Re: Error msg Stefen Paul
Re: Error msg Andrew Johnson

Navigate by Date:
Prev: Open Positions at SLAC: Senior Software Application Developer and Architect Williams Jr., Ernest L.
Next: Problem in base 3.15.x at runtime Shantonu Sahoo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Error msg Andrew Johnson
Next: Re: Error msg Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·