Building, Installing, and Deploying the MCSPU control program downtown and on the mountain

Downtown simulator

To build the MCSPU simulator downtown, checkout the source from svn, create symbolic links, and make simulator

cd <svn checkout>/mcsDisplay
./YouNeedSymbolicLinks
cd ..
make simulator

Note: for the make to work you need the TCSPATH environmental variable defined. And, if TCSPATH points to a local working copy, you must have executed the run-from-here script.

You can run the program from here with

./gotemp

We keep an installed version in /lbt/mcspu/current (which is in the path). To install new software (<rev> is the svn revision number)
mkdir /lbt/mcspu/<rev>
mkdir /lbt/mcspu/<rev>/bin
mkdir /lbt/mcspu/<rev>/etc

cp -p /lbt/mcspu/current/bin/gosim /lbt/mcspu/<rev>/bin
cp -p mcstemp /lbt/mcspu/<rev>/bin/mcsSimulator
cp -p mcsDisplay/mcsDisplay /lbt/mcspu/<rev>/bin/mcsDisplay
cp -p `tcs_config --path`/rpcconfig /lbt/mcspu/<rev>/bin
cp -p `tcs_config --path`/rpcserver /lbt/mcspu/<rev>/bin
cp -p `tcs_config --libpath`/libTCS.so /lbt/mcspu/<rev>/bin

cp -p mcspu.conf /lbt/mcspu/<rev>/etc
cp -p slewgenAZ.conf /lbt/mcspu/<rev>/etc
cp -p slewgenEL.conf /lbt/mcspu/<rev>/etc

ln -sfT <rev> /lbt/mcspu/current

To run the installed version do

gosim

Mountain operational program on jet

The source (and the binaries) for the code that runs in the MCSPU (the Mount Control System Processing Unit) and for the the Engineering Interface is normally stored in a directory called MCSPU. Copies of the source for many different versions installed at the LBT are stored in directories on jet in /home/telescope. They have names of the form MCSPUyymmdd, where "yymmdd" indicate the year, month and day the directory was created. So, the directory from Nov. 19, 2010 is called MCSPU101119. Within each of these directories is another called MCSPU and that directory contains all the source for the software that runs on the jet linux system, which is to say, it does NOT include the source code for the DSP processors.

Each of these directories was created by making the MCSPUyymmdd directory and then cd'ing into that and checking out the MCSPU software source from the svn repository. The sequence for that would, typically, be something like this:

cd MCSPU101119 
svn checkout https://svn.lbto.arizona.edu/repos/mcspu/trunk

That will check out the trunk directory. The name of trunk is then changed to MCSPU.

mv trunk MCSPU

Next cd into MCSPU/mcsDisplay and execute the script called YouNeedSymbolicLinks. This file should already be marked executable. It creates several dozen symbolic links to files in the MCSPU directory above. Then cd to the next directory up.

cd MCSPU/mcsDisplay
./YouNeedSymbolicLinks
cd ..
make

Typing make compiles everything. It will take several minutes to compile. This makes the MCSPU control program (mcstemp) and the Engineering Interface program (mcsDisplay).

Assuming that the compile completes with no errors, the only remaining task is to make sure the symbolic link /home/telescope/current points to the MCSPUyymmdd directory that you want to be used when the gotemp script is started by user telescope to load and start the MCSPU software. Usually, this is the latest one, or the latest one which we are willing to use for science operations.

There are two scripts in /home/telescope called std and new which simplify changing the symbolic link. Normally the new script sets up the current link to point to the currently in use version of the code and the std script sets up the current link to point to the previously used version of the software. So, it is easy to switch back and forth between the "latest" version and the previous version. Usually when a new version is installed, new is copied to std and new is then edited to refer the latest directory.

Once the software has been built in /home/telescope/MCSPUyymmdd and the current link has been set up, typing gotemp as user telescope will load and run the MCSPU control software and start a copy of the Engineering Interface.
Topic revision: r4 - 30 Oct 2015, ChrisBiddick
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback