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  2016  2017  <20182019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019 
<== Date ==> <== Thread ==>

Subject: Accessing IOC_NAME on RTEMS boot (MVME3100)
From: "Perea-Chamblee, Tomin" <chamblee@bnl.gov>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Cc: "Derbenev, Anton" <aderbenev@bnl.gov>
Date: Fri, 19 Oct 2018 20:49:58 +0000
Hey all,

At NSLS-II we are working on updating our timing setup as we have a number of MVME3100 VME crates running RTEMS with EPICS driver for various diagnostics and MRF timing hardware which employ a setup that was put together quite some time ago including Till Straumann's Cexp and Gesys (see https://epics.anl.gov/tech-talk/2018/msg01373.php for additional details).

Baring expert input on the post above, we have been looking at excluding Cexp and GeSys altogether. However, we are wary of configuring the full path to a particular IOC onto each card (via Motload variables), be that in the form of a nfs mount point, a full path to a script, or otherwise (as is recommended in Eric Norum's tutorial https://epics.anl.gov/base/RTEMS/tutorial/tutorial.pdf). Ideally, we'd like to be able to give each card a standard hard configuration, have them all mount to the same server, and have each run its own IOC without collision or extreme overhead.

Currently, our strategy is to do the following: Relying on the fact that the default value of IOC_NAME will be set at RTEMS boot as the <client ip> address, we set the following Motload variables like so:

mot-/dev/enet0-cipa=<client ip>
epics-nfsmount=<server ip>:<path to parent directory of all iocs>:/mnt
epics-script=/mnt/script

We have the contents of this "script" file read as follows:

< $(IOC_NAME)
cd /mnt/$(IOC_NAME)
< st.sys

In turn, we include a file named <client ip> in the same mount directory that does only the following:

epicsEnvSet("IOC_NAME", "timing")

In doing so, we instruct the generic script of where to go to find the IOC, as the first line of the generic 'script' will cause the ioc shell to execute the contents of the <client ip> file which in turn will set the IOC_NAME to an appropriate value (the choice of "timing" is just an example), causing 'script' to change into the directory containing the startup script, and execute it. Since each client will have it's own IP address this uniquely maps each client to it's own IOC, so long as the <client name> file is present.

Realistically, this is far from a bad setup. However does seem a little roundabout, especially when Cexp and Gesys allowed for the IOC_NAME variable to be set via DHCP configurations (via the uarg option, by setting an INIT variable). 

The question then is: How have others navigated this issue of propagating the IOC_NAME variable to make it accessible to the EPICS shell at RTEMS boot?

Thanks,
Tomin

Navigate by Date:
Prev: Re: Controlling Eiger 1M with EPICS Mark Rivers
Next: Re: Controlling Eiger 1M with EPICS Jason A . Pattie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019 
Navigate by Thread:
Prev: CSS-BOY combo box - Version 3.2.16 Gyujin Kim
Next: Beacon like connection attempts from caGateway Bo Jakobsen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019 
ANJ, 23 Oct 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·