CODA 2.0 Usage Notes


  1. Login as "phobos" and source the ".setup" file in /usr/local/coda/2.0dev or the "user.setup" file. The EXPID environment variable should be setup correctly. The sourcing should be done for each xterm window used below.

  2. Start the Mini-sql daemon:

    > msqld &

    This starts msql server 1.0.16 and the databases and access control lists (ACLs) for the various experiments are loaded. Ignore warnings such as "Warning : Couldn't open ACL file: No such file or directory" which result if the file $CODA/common/rcdb/msqldb/<expid>/msql.acl does not exist.

  3. Use the CODA configuration editor "cedit" to visually edit and save the DAQ configuration.

    > cedit &

    cedit usage:

  4. Use the Mini-sql database editor "dbedit" to tweak/modify the database entries.

    > dbedit &

    dbedit usage:

  5. Readout list:

    Run "makelist" to compile the crl file into object code. e.g for a Solaris ROC

    > makelist test.crl native

    for a VxWorks PPC ROC

    > makelist test.crl ppc

  6. If one of your Readout Controllers (ROCs) is a VME PPC board running VxWorks, power it on and download the commands in $CODA/coda20_ppc.boot from the shell. This starts the ROC on the PPC board.

    Boot script:

    # Boot file for CODA ROC 2.0
    # PowerPC version

    # up the sliding window
    tcp_sendspace=0x8000
    tcp_recvspace=0x8000

    # NFS Mount CODA distribution disk
    #nfsMount "phobosx","/usr/local"

    # Setup environment / load coda_roc
    putenv "MSQL_TCP_HOST=phobosx"
    putenv "EXPID=test1"
    putenv "TCL_LIBRARY=/usr/local/coda/2.0dev/common/lib/tcl7.4"
    putenv "ITCL_LIBRARY=/usr/local/coda/2.0dev/common/lib/itcl2.0"
    putenv "DP_LIBRARY=/usr/local/coda/2.0dev/common/lib/dp"
    putenv "CMLOG_PORT=8102"
    putenv "TOKEN_PORT=5555"

    # Download Message logging libraries/client
    ld ld ld # download SFI FB library and ROC
    #ld ld # Spawn tasks
    sp cmlogClientD
    taskDelay (60*5)
    taskSpawn "ROC",200,0,250000,coda_roc,"-i","-s","ashutosh","-objects","roc0 ROC"

    Note that the VxWorks kernel should be built with NFS_SUPPORT and ANSI_EXTENSIONS. The Solaris system should export the "/usr/local" filesystem for mounting from VxWorks.

    After the ROC has been loaded, type exit to get into the tcl shell. For a session "ashutosh" and ROC "roc0", the prompt will be "ashutosh::roc0>"

  7. If one of your ROCs is a Solaris one, define the following environment variables:

    setenv TOKEN_PORT 5555 setenv CMLOG_PORT 8102

    Start coda_roc in a separate xterm window using

    > coda_roc -i -s ashutosh -o "roc1 ROC"

    for ROC "roc1" and session "ashutosh". This should eventually put you in a tcl shell with prompt "ashutosh::roc1>"

  8. Start the Event Builder (EB) component in a separate xterm window using

    > coda_eb -i -s ashutosh -t CDEB -n eb0

    for EB "eb0" and session "ashutosh". This should eventually put you in a tcl shell with prompt "ashutosh::eb0>"

  9. Start "rcServer" in a separate xterm using

    > rcServer -m phobosx -d test1 -s ashutosh &

    Here, "m" specifies the Solaris workstation running msqld, "d" specifies EXPID, and "s" the session name.

  10. Start the Run Control GUI in another xterm using

    > runcontrol &

    Once the GUI opens, Press the "Connect" button. You will now get a window showing the rcServer host (typically your localhost), the experiment (current value of the EXPID environment variable). Choose the Session "ashutosh" and hit "Connect" again. You should now get a proper RunControl GUI.

    If you click on the "expand window" button on the top right, you should get a full screen GUI with tabs for cedit, dbedit

    Now hit "Configure" and choose a configuration (e.g config1)

    Next hit "Download". This boots the components and loads the readout list(s).

    Next hit "Prestart" to enter data-taking mode.

    Next hit "Start Run" to start a run.

    You can stop the run with "End Run". In the Options menu, you can select displays for event and event/data rate displays. Also, you can use "File->Options" in cedit or the test1_option table in dbedit to set dataLimit (in bytes) or eventLimit. Zero indicates no limits. The no. of tokens should be a factor of 2-6 less than the data rate. The max no. is hardcoded to 2000 and the default is 64.

  11. Starting a run manually without the GUI. This can be done for debugging purposes from the tcl shell provided by coda_roc and coda_eb. Additional debugging may be performed by running "dpsh". in a separate xterm. More on this later.




    Misc. Usage Hints



    Contacts:

    David Abbott (757) 269-7190 abbottd@cebaf.gov
    Graham Heyes (757) 269-7030 heyes@cebaf.gov


    Ashutosh Sanzgiri