EM1 Update P00-08-00 10/18/02

Installation Instructions


Important Note for this Release: There are two versions of the evtCli module in this release. In the distribution these are two separate files called evtCli.py and evtCli_oldTEM.py. The first one will give correct TKR event data *only* for the new TEM board. The second file will give correct TKR event data *only* for the old TEM board. If you have an old TEM board follow the instructions bulleted a through h below, users of the new TEM do not need to take any action:

  1. Install this distribution according to the instructions below (bullets 1 through 11).
  2. Open up a "Command Prompt" and change the directory to "c:\Online\work\LAT"
  3. Enter "del *.pyc"
  4. Enter "ren evtCli.py evtCli_newTEM.py"
  5. Enter "ren evtCli_oldTEM.py evtCli.py"
  6. Make sure VxWorks crate is up and running and the startup script have been executed
  7. Enter "python versions.py"
  8. Verify that the version numbers match the "old TEM board" column on the table below.

  1. First of all make a copy of your c:\VxWorks directory (right click on VxWorks, choose "Copy" then in the same window choose "Paste"). This will create a directory called "Copy of VxWorks". Rename this to VxWorks_Pxx-xx-xx (where xx-xx-xx is your current version)
     
  2. Unzip pyLAT archive to "C:\", replacing the old files
     
  3. On VxWorks enter "< startupaemevt" for AEM or "< startuptemevt" for CAL
     
  4. Make sure "ActiveState Python 2.2.1 or later is installed. If not download it from:
    http://www.activestate.com/Products/Download/Download.plex?id=ActivePython
     
  5. Install pyXML: Open up a "Command Prompt" and enter "pyppm". At the "PPM>" prompt enter "install pyXML". You need to have an active internet connection for this to work. If you are in an internal network, use another machine that is connected to the internet to download pyXML from http://download.sourceforge.net/pyxml/PyXML-0.8.1.win32-py2.2.exe, copy it to a floppy and then install it on the teststand machine.
     
  6. Open up a "Command Prompt" and change the directory to "c:\Online\work\LAT"
     
  7. Type "python -i test_aem.py" for AEM or "python -i test_cal.py" and press enter. At the ">>>" prompt type "test()" and press enter You should see the event data being displayed.
     
  8. If you need to go back to using SCL, rename the VxWorks directory to VxWorks_Python and rename the VxWorks_SCL directory to VxWorks and use the "< startupaem" or "< startuptem" scripts.
     
  9. We will provide tutorials and how-to documents on using the python interface in the near future. In the mean time the test_aem, test_cal and test_tkr examples and the LAT-SS-00586-01 Subsystem Interface Control Document should help you in developing your scripts.
     
  10. In order to run the "versions" utility, at the command prompt enter "python versions.py". This should output version infor for all modules (VxWorks and python) loaded.
     
  11. Rules have been implemented in this release. See the test script aemEU.py for an example
     
  12. Schema reading and writing is also available in this release. Included are two sample schema files latSchema.xml and testSchema.xml. The usage is as follows:
     
    lat = readSchema('testSchema.xml')
    f = open('mySchema.xml', 'w')
    writeSchema(lat, f)
    f.close()


     

Note1: In order to run the system without any hardware attached use the following instructions:

  1. Install the package according to the above instructions.
  2. Open up a 'Command Prompt', change the directory to \Online\work\LAT
  3. Enter 'cmdSvr 2000'
  4. Open up another 'Command Prompt', change the directory to \Online\work\LAT
  5. Enter 'evtSvr 2001'
  6. Open up a third 'Command Prompt', change the directory to \Online\work\LAT
  7. Enter 'set COMMAND_SERVER_HOST=localhost'
  8. Enter 'set EVENT_SERVER_HOST=localhost
  9. Run python -i 'test_xxx.py' (where xxx is one of aem, cal, tkr depending on what subsystem you are)
  10. Enter 'test()'
  11. You should see the dummy event being displayed.
     

Note2: The installation installs the core python interface code into \Online\work\LAT. This is a reserved area and should not be used for subsystem development. Subsystems are encouraged to create their own directories under \Online\work (such as \Online\work\ACD or \Online\work\CAL and develop their scripts under those directories. In order to be able to import the core python interface code, in your environment, you need to set PYTHONPATH to \Online\work\LAT.
 

Version Information (retrieved by running python versions.py for this release):

Module Version
 (new TEM board)
Version
(old TEM board)
GNAT 1.0.13 1.0.13
GTEM 1.0.16 1.0.16
GGLT 1.2.0 1.2.0
GAEM 1.0.8 1.0.8
cmdSvr 1.23 1.23
evtSvr 1.22 1.22
cmdCli 1.18 1.18
evtCli 1.15 1.1
gAttr 1.7 1.7
gConstraint 1.3 1.3
gEGU 1.2 1.2
gGroup 1.2 1.2
gLAT 1.4 1.4
gNode 1.9 1.9
gRule 1.1 1.1
gSchemaConfig 1.5 1.5

Note that there are two versions of the evtCli module. In the distribution these are two separate files called evtCli.py and evtCli_oldTEM.py. Use the appropriate one by renaming it to evtCli.py if necessary. Don't forget to delete the *.pyc files after the renaming.


Please contact Selim Tuvi at stuvi@slac.stanford.edu or Ric Claus at claus@slac.stanford.edu if you have problems or any questions.
 

Back