Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
daq:docss800grt [2015/10/02 13:58] weisshaa |
daq:docss800grt [2015/10/02 22:26] weisshaa |
||
---|---|---|---|
Line 1: | Line 1: | ||
S800/Gretina Cookbook. | S800/Gretina Cookbook. | ||
+ | |||
Most important: The Gretina run control and 'toys' cn only be run from either | Most important: The Gretina run control and 'toys' cn only be run from either | ||
ddasdaq2.nscl.msu.edu or ddasdaq3.nscl.msu.edu These two systems are the only | ddasdaq2.nscl.msu.edu or ddasdaq3.nscl.msu.edu These two systems are the only | ||
NSCLDAQ systems that are on both the NSCL DAQ network and the GRETINA | NSCLDAQ systems that are on both the NSCL DAQ network and the GRETINA | ||
internal network. | internal network. | ||
+ | |||
+ | 1. Where things live: | ||
+ | |||
+ | Gretina support software is installed in /usr/opt/gretina in a directory of the | ||
+ | form m.n-eee where m,n and e are decimal digits: | ||
+ | |||
+ | m - The major version: 2, begining Sep 2015 | ||
+ | n - A minor version, currently 0 | ||
+ | eee - and 'edit level' which indicates some minor fixups were performed. | ||
+ | The current value for eee is 004. | ||
+ | |||
+ | In the cookbook recipes below, the directory in which gretina software is | ||
+ | installed (e.g. /usr/opt/gretina/2.0-004) will be called $GRTOP | ||
+ | |||
+ | 2. Setting up environment variables: | ||
+ | |||
+ | A script $GRTOP/bin/gretinaSetup defines several environment variables. | ||
+ | Incorporate those into your shell by: | ||
+ | |||
+ | . $GRTOP/bin/gretinaSetup | ||
+ | |||
+ | (e.g. . /usr/opt/gretina/2.0-004/bin/gretinaSetup) | ||
+ | |||
+ | This script will also source the environment setup script for the version of | ||
+ | NSCLDAQ with with which the gretina software is associated. | ||
+ | |||
+ | All future recipes assume that this script has been sourced. | ||
+ | |||
+ | 3. Using the ReadoutGUI: | ||
+ | |||
+ | 3.1 The ReadoutCallouts.tcl script. | ||
+ | |||
+ | Here is a miniml ReadoutCallouts.tcl script for Gretina: | ||
+ | Comments have been added to describe what is happening at each step: | ||
+ | |||
+ | |||
+ | #------------------- Begin ReadoutCallouts.tcl --------------------------- | ||
- | 1. Where things live: | + | ## |
- | + | # This section of the script adds the GRETINA and NSCLDAQ Tcl libraries to the | |
- | Gretina support software is installed in /usr/opt/gretina in a directory of the | + | # Tcl package load path. Key points: |
- | form m.n-eee where m,n and e are decimal digits: | + | # - VERSION is the version of the GRETINA software you are using. This |
- | + | # needs to be changed if the GRETINA software version changes. | |
- | m - The major version: 2, begining Sep 2015 | + | # |
- | n - A minor version, currently 0 | + | |
- | eee - and 'edit level' which indicates some minor fixups were performed. | + | set daqroot $::env(DAQROOT) |
- | The current value for eee is 004. | + | lappend auto_path [file join $daqroot TclLibs] |
- | + | set TOP /usr/opt | |
- | In the cookbook recipes below, the directory in which gretina software is | + | set VERSION 2.0-004 |
- | installed (e.g. /usr/opt/gretina/2.0-004) will be called $GRTOP | + | lappend auto_path [file join $TOP gretina $VERSION TclLibs] |
- | + | | |
- | 2. Setting up environment variables: | + | |
- | + | ## | |
- | A script $GRTOP/bin/gretinaSetup defines several environment variables. | + | # Sets the window title for the GRETINA run control |
- | Incorporate those into your shell by: | + | # |
- | + | wm title . "S800/Gretina Run control" | |
- | . $GRTOP/bin/gretinaSetup | + | |
- | + | ## | |
- | (e.g. . /usr/opt/gretina/2.0-004/bin/gretinaSetup) | + | # Loads the code associated with the GRETINA/s800 merged readout |
- | + | # | |
- | This script will also source the environment setup script for the version of | + | |
- | NSCLDAQ with with which the gretina software is associated. | + | package require mergedCallouts |
- | + | | |
- | All future recipes assume that this script has been sourced. | + | ## |
- | + | # Loads a package that adds support to record data from 'upstream' ring buffers | |
- | 3. Using the ReadoutGUI: | + | # in the S800 system. This creates a new menu entry in the Readout GUI |
- | + | # | |
- | 3.1 The ReadoutCallouts.tcl script. | + | package require multilogger |
- | + | | |
- | Here is a miniml ReadoutCallouts.tcl script for Gretina: | + | # Set the hosts for stuff: |
- | Comments have been added to describe what is happening at each step: | + | |
- | + | | |
- | + | ## | |
- | #------------------- Begin ReadoutCallouts.tcl --------------------------- | + | # The S800 software runs in this system. Specifically: |
- | + | # - The S800 ReadoutGUI runs in this system. | |
- | ## | + | # - The S800 dataflow ring buffers are in this system. |
- | # This section of the script adds the GRETINA and NSCLDAQ Tcl libraries to the | + | # |
- | # Tcl package load path. Key points: | + | set s800host spdaq19 |
- | # - VERSION is the version of the GRETINA software you are using. This | + | set S800ToGretina::S800Host $s800host |
- | # needs to be changed if the GRETINA software version changes. | + | |
- | # | + | ## |
- | + | # The IMPSYNC button forces GRETINA to perform an imperative sychronization | |
- | set daqroot $::env(DAQROOT) | + | # of the clock. In the normal GRETINA + S800 runs this is done automatically |
- | lappend auto_path [file join $daqroot TclLibs] | + | # when the run begins. In the 'infinity clock' mode, when DDAS systems are |
- | set TOP /usr/opt | + | # added, this is done manually. Set the variable below to 0 to enable |
- | set VERSION 2.0-004 | + | # manual imperative synchronization when the run is active. Otherwise |
- | lappend auto_path [file join $TOP gretina $VERSION TclLibs] | + | # |
- | + | set disableImpSyncButton 1 | |
- | + | | |
- | ## | + | |
- | # Sets the window title for the GRETINA run control | + | ## |
- | # | + | # Intializes the GRETINA extensions to the ReadoutGUI. This also adds the |
- | wm title . "S800/Gretina Run control" | + | # GRETINA specific bits of the user interface. |
- | + | # | |
- | ## | + | mergedCallouts::Initialize |
- | # Loads the code associated with the GRETINA/s800 merged readout | + | |
- | # | + | ## |
- | + | # Begin run actions: | |
- | package require mergedCallouts | + | # |
- | + | proc OnBegin runNumber { | |
- | ## | + | |
- | # Loads a package that adds support to record data from 'upstream' ring buffers | + | |
- | # in the S800 system. This creates a new menu entry in the Readout GUI | + | |
- | # | + | |
- | package require multilogger | + | |
- | + | ||
- | # Set the hosts for stuff: | + | |
- | + | ||
- | + | ||
- | ## | + | |
- | # The S800 software runs in this system. Specifically: | + | |
- | # - The S800 ReadoutGUI runs in this system. | + | |
- | # - The S800 dataflow ring buffers are in this system. | + | |
- | # | + | |
- | set s800host spdaq19 | + | |
- | set S800ToGretina::S800Host $s800host | + | |
- | + | ||
- | ## | + | |
- | # The IMPSYNC button forces GRETINA to perform an imperative sychronization | + | |
- | # of the clock. In the normal GRETINA + S800 runs this is done automatically | + | |
- | # when the run begins. In the 'infinity clock' mode, when DDAS systems are | + | |
- | # added, this is done manually. Set the variable below to 0 to enable | + | |
- | # manual imperative synchronization when the run is active. Otherwise | + | |
- | # | + | |
- | set disableImpSyncButton 1 | + | |
- | + | ||
- | + | ||
- | ## | + | |
- | # Intializes the GRETINA extensions to the ReadoutGUI. This also adds the | + | |
- | # GRETINA specific bits of the user interface. | + | |
- | # | + | |
- | mergedCallouts::Initialize | + | |
- | + | ||
- | ## | + | |
- | # Begin run actions: | + | |
- | # | + | |
- | proc OnBegin runNumber { | + | |
## | ## | ||
# With GRETINA, all data recording is perfromed on GRETINA | # With GRETINA, all data recording is perfromed on GRETINA | ||
Line 123: | Line 123: | ||
.impsync configure -state disabled | .impsync configure -state disabled | ||
} | } | ||
- | + | ||
- | } | + | } |
- | ## | + | ## |
- | # End run actions (called after the s800 has been asked to stop) | + | # End run actions (called after the s800 has been asked to stop) |
- | # | + | # |
- | proc OnEnd runNumber { | + | proc OnEnd runNumber { |
## | ## | ||
# Asks GRETINA to end its run. | # Asks GRETINA to end its run. | ||
Line 145: | Line 145: | ||
set ::EventLog::needFinalization 1 | set ::EventLog::needFinalization 1 | ||
::EventLog::_finalizeRun | ::EventLog::_finalizeRun | ||
- | + | ||
- | } | + | } |
- | #-------------------- End ReadoutCallouts.tcl --------------------- | + | #-------------------- End ReadoutCallouts.tcl --------------------- |
- | + | | |
- | + | | |
- | 3.2 Using the GUI: | + | 3.2 Using the GUI: |
- | + | | |
- | Once your ReadoutCallouts.tcl is installed: | + | Once your ReadoutCallouts.tcl is installed: |
- | + | | |
- | - Ensure the S800 Readout GUI is running in spdaq19. | + | - Ensure the S800 Readout GUI is running in spdaq19. |
- | - Start the GUI with | + | - Start the GUI with |
- | + | | |
- | $DAQBIN/ReadoutShell | + | $DAQBIN/ReadoutShell |
- | + | | |
- | + | | |
- | - Click the 'Start' Button. This takes control of the S800 system. | + | - Click the 'Start' Button. This takes control of the S800 system. |
- | - Once the S800 has been put in remote control, you can start/stop | + | - Once the S800 has been put in remote control, you can start/stop |
- | runs as you would normally do. | + | runs as you would normally do. |
- | + | | |
- | 4. The Big LED. | + | 4. The Big LED. |
- | + | | |
- | This is an application that displays the GRETINA global alarm state as | + | This is an application that displays the GRETINA global alarm state as |
- | either a big Green (no alarm) or big Red (alarm) circle or 'led' | + | either a big Green (no alarm) or big Red (alarm) circle or 'led' |
- | + | | |
- | + | | |
- | To run it: | + | To run it: |
- | + | | |
- | $GRTOP/bin/bigled [size-in-pixels] | + | $GRTOP/bin/bigled [size-in-pixels] |
- | + | | |
- | The optional size-in-pixels parameter controls the size of the led. | + | The optional size-in-pixels parameter controls the size of the led. |
- | If omitted a 'reasonable' default size is used. | + | If omitted a 'reasonable' default size is used. |
- | + | | |
- | 5. GRETINA Emergency stop button. | + | 5. GRETINA Emergency stop button. |
- | + | | |
- | If the s800 readout or GUI fail, or for some reason the GRETINA GUI becomes | + | If the s800 readout or GUI fail, or for some reason the GRETINA GUI becomes |
- | unresponsive, it may be necessary to stop the GRETINA. | + | unresponsive, it may be necessary to stop the GRETINA. |
- | + | | |
- | $GRTOP/bin/emstop | + | $GRTOP/bin/emstop |
- | + | | |
- | Displays the current global GRETINA state and provides a button | + | Displays the current global GRETINA state and provides a button |
- | that allows you to request GRETINA to end its run. | + | that allows you to request GRETINA to end its run. |
- | + | | |
+ | |