Personal tools
You are here: Home Software CAMP slow controls camp_managers.html

camp_managers.html

by admin last modified Mar 02, 2016 05:32 PM

CAMP Software Manager's Guide


Introduction

The MUSR CAMP slow controls system consists of two parts: a SERVER and a CLIENT. In the standard MUSR system, the server runs under VxWorks on a MVME162, and the client runs on a Linux PC.
The power-pc (ppc) ,which runs the frontend for the MUSR experiment,  also loads a client library  to communicate directly with the CAMP server.

 

  • Build under linux:
  • Location of Code

  •  
     

    Building the Server for VxWorks (cross-compile under linux)

    To build ( & cross-compile)  the CAMP Server for VxWorks under linux,
        Log onto dasdevpc as musrdaq
        # cd musr/camp/m68k-vxworks
        # make -f Makefile.linux
    This will use the cross-compilers/linkers for the 68k and will use the VxWorks include files and libraries. You will then want to move the resulting object camp_srv.o to the working location on the DAQ linux pc  or  VAX.
    • To run it on a MVME162 with a linux boothost:
      • copy it to /home/musrdaq/musr/vw on the DAQ linux machine
    <back to top>

     
     
     
     
     
     

    To test the new server code:

    load the server code from the area which is nfsMounted by the VxWorks host as "/vw" :

    -> cd "/vw"

    -> < reload_campsrv.com

    Copy the final version to  all of the MuSR data acquisition  machines (linux). Normally all object modules are loaded from the ram disk, so also copy the final version to the RAM disk on the CAMP MVME162s for all DAQ systems.
     
     

    <back to top>

     
     
     

    Building the Client for Linux

    To build the Camp Client programs for linux,   log onto dasdevpc as musrdaq.

    First build the libc_tw library :

    [musrdaq@dasdevpc] cd musr/libc_tw/linux
    [musrdaq@dasdevpc] make

    Then build the camp client:

     [musrdaq@dasdevpc]  cd musr/camp/linux
     [musrdaq@dasdevpc]  make -f Makefile.linux

     

    <back to top>

    Building the Client for Power-PC

    To build the client library and CLI for the Power-PC, log onto dasdevpc as musrdaq.

    First build the libc_tw library for ppc:

    [musrdaq@dasdevpc] cd musr/libc_tw/ppc-vxworks
    [musrdaq@dasdevpc] make

    Then build the camp client library and CLI

    [musrdaq@dasdevpc] cd musr/camp/ ppc-vxworks
    [musrdaq@dasdevpc] make

    Then copy libcamp.o  and camp_cmd.o to the appropriate directory (e.g. isdaq01:/home/bnmr/online/bnmr/ppcobj ).
     
     

    <back to top>

     
     
     
     
     

                   

    Other VxWorks objects (server):

    The other VxWorks objects needed to run CAMP on the MVME162LX are as follows:
    • camacJorway73aLib.o - CAMAC library for the Jorway 73A SCSI CAMAC controller, located in dasdevpc:/home/musrdaq/musr/mvme162/camac/scsi.
    • ipQuad.o - driver for MVME IP Quad Serial Industry Pack (four serial ports) located in dasdevpc:/home/musrdaq/musr/mvme162//serial.
    • gpibMvip300Lib.o - driver for MVME IP 488 Industry Pack (GPIB), located in dasdevpc:/home/musrdaq/musr/mvme162/gpib.
    • libc_tw.o - handy C extensions, located in dasdevpc:/home/musrdaq/musr/libc_tw/m68k-vxworks.
    • te28Lib.o - library (by Dave Morris) for the Technology-80 Model 28 2 channel servo motor Industry Pack module, located in dasdevpc:/home/musrdaq/musr/mvme162/motor.
    • tip850Lib.o - library (by Dave Morris) for the ADC and DAC channels on the TIP850 Industry Pack module, located in dasdevpc:/home/musrdaq/musr/mvme162/adcdac.
    • vxRshd.o - remote shell daemon, located in dasdevpc:/home/musrdaq/musr/mvme162/rsh.
    Note also that a special VxWorks (currently version 5.3) kernel was built by Dave Morris using modified kernel source files to include support for the industry packs etc. The kernel is built on sundown, and all files are in account /usr1/local/tornado/target/config/mv162-023 . A copy of the contents of this directory is on dasdevpc:/home/online/musr/camp/vw/tornado/mv162-023. Files config.h and syslib.c have been modified to extend the functionality of the driver for the four onboard serial ports of the MVME162LX which are implemented with the Zilog 8530 chip, and to support the TEWS Datentechnik TIP850 ADC/DAC and Technology TE28 Motor Controller. The VxWorks kernel is called camp023.bin.
     
     
     
    <back to top>

     
     
     
     
     
     

    Starting the CAMP Server

    For VxWorks

    The Server is started automatically under VxWorks on bootup. The command to start the server is in the startup file. The server needs access to two directories on the host computer - these are nfsMounted as /camp and /campnode. The server needs read access to /camp and read and write access to /campnode.

    Messages from the Server are logged to /campnode/log/camp_srv.log.


     
     
    <back to top>

     
     
     

    Location of code

    The master copy of CAMP source code is kept on dasdevpc (the linux DAQ development machine)   on  /home/musrdaq/musr/camp/src .
    It is stored in CVS.

    The source and development subdirectories are described as follows:
     

    src subdirectory: source code

    The source code for the CAMP Server, User Interface and Command Line Interface for all platforms.
    • camp server
    CAMP Server specific modules are 'camp_srv_*.c', 'camp_if_*.c', 'camp_*_write.c' or 'camp_*_priv.c' (there are others).
     
    <back to top>
    • Tcl
    All Tcl extensions used by the Server's Tcl interpreter are in 'camp_tcl.c'. Standalone Tcl interpreters are built using the modules 'camp_tcl_client.c' and '*appinit_camp.c'.
    • Camp User Interface: camp_cui
    The main CAMP program itself is the 'camp_cui' or CAMP User Interface. Modules for the camp_cui are 'camp_cui_*'.
    • Command Line Interface: camp_cmd
    • Application interface module: camp_api
    • Makefiles
    Many of the other modules are used by the Server and the clients, refer to the Linux and VxWorks Makefiles  as roadmaps to the sources.

    drv - instrument drivers

    Master copies of all the instrument drivers implemented at TRIUMF.

    dat - calibration files

    Master copies of data files for temperature controller curves.
     
    <back to top>

    m68k-vxworks

    VxWorks build directory. Running
    make -f Makefile.linux  
    from here under linux will build the CAMP Server for VxWorks.  (Log on to dasdevpc as musrdaq).
     

    ppc-vxworks

    VxWorks build directory for Power-PC.

    Running make from here will build the CAMP Client library and CLI  for running on the ppc.


    linux

    Linux build directory (on dasdevpc). Running make from here under linux will build the CAMP client for linux.
     
     
    <back to top>

    Location of camp files on the host

      The linux hosts keep the files in their camp directories.

    Configuration files

  • camp.ini

  • The CAMP Server uses the initialization file  dasdevpc:/home/musrdaq/musr/camp/dat/camp.ini  as node-specific initialization. It is in this file that you specify which instrument types, serial ports, etc. are available for a particular camp node. Note that this file is common for all the CAMP nodes. You can refer to which node the Server is running on from this file using the global Tcl variable 'camp_host'.

    Note that the "official" version of camp.ini is located in dasdevpc/home/musrdaq/musr/camp/dat
     

  • camp.cfg

  • At startup, the CAMP Server will attempt to load the camp configuration file  (/campnode/cfg/camp.cfg), which is the autosaved configuration file. This file may be edited, but must end with the line 'return -code ok'. The CAMP Server periodically updates this file.
     
     

    <back to top>

    Stopping/restarting  the CAMP Server  (vxworks)

    To stop the camp server, on the vxWorks console
    -> ts "tCampSrv"
    -> td "tCampSrv"
    To restart, type
    ->taskSpawn "tCampSrv", 100, 0, 20000, campSrv, 0

     
    <back to top>

     
     

    Updating the CAMP Server

    To reload the initialization file without stopping or restarting the Server, run the Command Line Interface with the command 'sysUpdate'. This rereads the camp initialization file  (/camp/dat/camp.ini) and initializes the system structures accordingly. This is useful when you have added to new instrument driver that you would like to make available to a running Server. 
    suz@triumf.ca, TRIUMF Data Acquisition Group
    Document Actions