camp_managers.html
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
- Source code
- Instrument drivers
- Calibration files
- vxworks (mvme162) build directory
- ppc-vxworks build directory
- linux build directory
- Starting the camp server
- Configuration files
- Stopping the camp server
- Updating the camp server
Building the Server for VxWorks (cross-compile under linux)
To build ( & cross-compile) the CAMP Server for VxWorks under linux,Log onto dasdevpc as musrdaqThis 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.
# cd musr/camp/m68k-vxworks
# make -f Makefile.linux
- 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.
<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
<back to top>
- Tcl
- Camp User Interface: camp_cui
- Command Line Interface: camp_cmd
- Application interface module: camp_api
- Makefiles
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. Runningmake -f Makefile.linuxfrom 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"To restart, type
-> td "tCampSrv"
->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