This explains the basics of installing ICE on a machine. One ICE has been installed their is a seperate configuration process which is explained later in the document. If a new version of ICE is installed on a machine which already has a configuration, the new version will use the previous configuration’s settings.
ICE can be configured to run on real hardware or to use fake simulated hardware.
Prerequisites :
You must have a cvs account on charlotte.
You must be able to access the super user account on your machine.
Notes:
<version#> must be an integer > 0.
Actions :
Open a linux terminal window
At the command prompt type : mkdir newIceInstall
Enter the new directory by typing : cd newIceInstall
Login to the CVS server: cvs -d :pserver:<your user name>@(continued)
charlotte.ncnr.nist.gov:/var/local/cvsroot login
Enter your cvs password at prompt.
Checkout DALI from the CVS server :
cvs -d :pserver:<your user name>@(continued)
charlotte.ncnr.nist.gov:/var/local/cvsroot checkout dali
Checkout ICE from the CVS server :
cvs -d :pserver:<your user name>@(continued)
charlotte.ncnr.nist.gov:/var/local/cvsroot checkout ice
Copy the template make file to the newIceInstall directory : cp ice/Makefile_v1 ./Makefile_v<version#>
Edit Makefile_v<version#> using whatever text editor you like. Its contents look like this:
DALISRC = "dali"
ICESRC = "ice"
DALIVERSION=1
ICEVERSION=1
all: install
clean:
cd $(DALISRC); make clean
cd $(ICESRC); make clean
install:
cd $(DALISRC); make python "version=$(DALIVERSION)"
cd $(ICESRC); make service "version=$(ICEVERSION)"
uninstall:
cd $(ICESRC); make uninstall "version=$(ICEVERSION)"
test: install
cd $(ICESRC); make test
Change the lines :
DALIVERSION=1
ICEVERSION=1
To :
DALIVERSION=<version#>
ICEVERSION=<version#>
Become super user by typing the following command at the prompt: su
Enter your super user password so that you can install the software.
ICE can be configured to run on real hardware or to use fake simulated hardware. Real hardware installations will need to be configured by reading the configuration section. However, simulated installations can be setup automatically during the installation process. Follow one of the three steps below based on your goal for the ICE system :
Real server : make –f Makefile_v<version#>
Fake server : make –f Makefile_v<version#> test
Fake server with fake analyzer support : make –f Makefile_v<version#> testana
The ICE server needs to be configured before it can run. ICE can either be configured as a test server, which mimics a triple axis system using simulated software motors or as a real instrument control server.
Actions :
Edit newIceInstall/ice/config/instrument.xml using whatever text editor you like. Its contents look like this :
<?xml version="1.0"?>
<!DOCTYPE ICE SYSTEM "ice.dtd">
<ICE>
<Server>
<!-- Location of the Instrument block that contains device definitions -->
<InstrFile>instrument.xml</InstrFile>
<!-- Period of status messages -->
<StatusFreq>1.0</StatusFreq>
<!-- Default period of busy() polling when a device is busy -->
<SleepOnBusy>0.5</SleepOnBusy>
<!-- Default period for read() call on busy devices -->
<UpdateOnBusy>10000000</UpdateOnBusy>
<!-- The following two are obsolete -->
<ScanBckFlg>1</ScanBckFlg>
<Verbose>1</Verbose>
<!-- File containing the DALI definitions -->
<MWFile>bt7dev_test.xml</MWFile>
<!-- File containing the DALI env controller definitions -->
<EnvFile>envdef.xml</EnvFile>
<!-- Location of DALI device drivers -->
<MWLibDir>/usr/local/dali/lib/drivers</MWLibDir>
<!-- Use (1) xpeek server or not (0) -->
<XpeekServer>1</XpeekServer>
<!-- Name of instrument for xpeek data stream (is this send to JICE?) -->
<XpeekName>BT0</XpeekName>
<!-- File format name (obsolete)-->
<FileFormat>ICE</FileFormat>
<!-- New directory structure (1), otherwise 0 -->
<DirStruct>0</DirStruct>
<!-- Email address to which to send messages on errors -->
<DbgEmail>doucet@nist.gov</DbgEmail>
<!-- Should be 1 for JICE, 0 for old IDL or pre-JICE clients -->
<NewClient>1</NewClient>
<!-- Sets all DALI devices as dummy devices -->
<Dummy>1</Dummy>
</Instrument>
...
...
</ICE>
Copy the template configuration file (instrument.xml) into the working ICE directory (/usr/local/ice/ice_v<version#>):
cp ice/config/instrument.xml (continued)
/usr/local/ice/ice_v<version#>/instrument.xml
Prerequisites :
You must have privileges to run the sudo command.
Actions :
The most recently installed version of ICE may be started using the following command : sudo startice
A specific version of ICE may be started with the command :
sudo startice <start version#>
Ice may be stopped using the following command :
sudo stopice
Directory structure
Main_script
Ice (CVS checkout)
Dali (CVS checkout)
MessServer (CVS checkout) (now part of Ice)
Script parameters
ICE and DALI version X
Main script actions
Call ICE makefile with version=X as parameter
Call DALI makefile with version=X as parameter
Write the file:
/usr/local/ice/ice_vX/iceConf.py
with the content:
from pydali_vX import *
from MeasGeo_vX import *
from pycollision_vX import *
from IceFit_vX import *
def getPyCollisionVersion(): return "pycollision_vX"
def getIceFitVersion(): return "IceFit_vX"
def getDaliDir(): return "/usr/local/dali/lib_vY/drivers"
Directory structure
/usr/local/ice/etc
/usr/local/ice/data
/usr/local/ice/com
/usr/local/ice/log
/usr/local/ice/usr
/usr/local/ice/ice_vX
Makefile actions:
Install /usr/local/ice/ice_vX
Install service “ice” in /etc/init.d
Write default version in /usr/local/ice/etc/ice.version
Install startice script in /usr/local/bin
Install python/site-packages/MeasGeo_vX
Install python/site-packages/IceFit_vX
Install python/site-packages/PyCollision_vX
Use startice script with or without a version number:
Startice (runs latest; from /usr/local/etc/ice.config)
Startice ice X (runs version X)
ICE will import pydali_vX (from iceConf.py)
Same thing for MeasGeo_vX
Same thing for IceFit_vX
ICE will get libraries from /usr/local/dali/lib_vX/drivers (from iceConf.py)