Definitions

  • BOLD: refers to files that need to be modified or generated by IOC developer
  • Italics: symbolic link

How-To setup the IOC boot directories

The instructions differ between production and development due to permission restrictions in production. 

Production:   lcls, lcls2, facet, testfac

  1. Send email to Ken Brobeck requesting:
    1. create controls infrastructure for a new IOC on facility production server, which includes the following:
      1.  Add boot directory: $EPICS_IOCS/<ioc>  directory
      2.  Add data directories: $IOC_DATA/<ioc>/<autosave,autosave-req,restore,iocInfo,archive>  directories  
  2. Proceed to Development Step #3

Development:    dev

  1. Create the $IOC_DATA directory for your iocs as follows:
      1. cd $IOC_DATA
      2. mkdir sioc-<area>-<subsystem-prefix><2-digit#>
      3. cd  <sioc>
      4. mkdir archive autosave-req autosave iocInfo restore
  2.  Create the $EPICS_IOCS  ioc boot directory
    1. mkdir  sioc-<area>-<subsystem-prefix><2-digit#>
  3. Setup ioc boot directory files
    1. cd $EPICS_IOCS/ioc-<area>-<subsystem-prefix><2-digit#>
    2. copy the ioc startup.cmd script from  $EPICS_IOCS/template
      1.  cp ../template/startup.cmd.rtems        startup.cmd
  4. Edit startup.cmd
    1. replace <ioc>  with your ioc name
    2. replace <facility> based on the FACILITY in Table 1 below.

              Table 1

Facility

Replace <facility> with
Devg/lcls
LCLSlcls
FACET-IIfacet
Test-Facg/acctest

                  c. if your IOC Application uses a non-standard location for the startup.cmd file,  change path of EPICS_IOC_APP

                 d. Setup a relative symbolic link that points to the EPICS IOC Applicaiton TOP as follows:            ln -s ../../iocTop/<app>/<version> iocSpecificRelease

      5.  Modify $EPICS_IOCS/screeniocs    Please note that this is a symbolic link to a CVS file.

      6.  Verify that the file in use has not been modified without being committed.

    1. cd $EPICS_IOCS/All/<facility>      , where facility is Dev,Prod,facet,acctes
    2. cvs diff -r HEAD screenioc
    3. if there are issues, then send email to whoever made the change or to controls-software that you are about to update this file and uncommitted edits will be lost, so please commit your changes to CVS.  If you don't get a response,  you can either add the changes to CVS in addition to yours or just add yours. 

        7. check out screeniocs from CVS into your work area

    1. cd
    2. cd <work> cvs co epics/iocCommon/All/<facility>   , where facility is Dev,Prod,facet,acctest
      1. cd epics/iocCommon/All/<facility>/screeniocs
      2. edit screeniocs
        1. add line for <ioc>. For server refer to table 1 above. format:  sioc-<area>-<subsystem prefix><2-digit #>  <executable w/full absoluete path>    sioc   <server>    [#comment}
        2. The "comment" field in  screeeniocs  is optional and must be preceded by a  "#".
        3. add comment in the "Mod:" section of the header

         8. commit your changes of screeniocs to CVS  as follows:

    1. cvs commit  -m "added cpu and ioc blah" screeniocs
    2. update the screeniocs file in use
    3. cd $EPICS_IOCS/All/<facility>, where facility is Dev,Prod, facet, acctest
    4.  rm -f screeniocs
    5. cvs update screeniocs  
       

How-to boot an IOC from the Linux host:

There are multiple ways to boot an RTEMs ioc, which are listed below: 

  1. Use iocConsole to start an ioc, which uses the screen program  
    1. iocConsole <ioc>  --stayup
  1. Boot ioc from the facility home network display 

How-to use screen program:

  • ctrl a d : detach from the screen session
  • ctrl a [ : scroll up through the start-up messages.
  • No labels