Data Acquisition at TUDA

 

 

V.F.E.Pucknell

July 2003

 

1           Introduction

1.1           Getting Started

 

On a Sun system (the preferred system is tuda0) login using the id tuda which has the password ********.

If you login from the tuda0 console.

From the CDE desktop click on the virtual screen labeled Servers or switch to an empty virtual screen.

Start a Terminal window and start the MIDAS tape server by typing the command /MIDAS/TapeServer/SunOS/master. This should only be done once at the beginning of the session.

Warning The server should only be started once.  The recommended method is to login to tuda0 from the console using the tuda id at the start of the experimental campaign and start the server then Do Not logout until the end of the campaign.  Logging out will kill the server. If you later login via tuda1 the server will already be running and so you should not repeat these instructions.

You can currently ONLY run Sortshell in online mode from tuda0 (or wherever the tape server is running) but you can however if you wish run multiple copies. You can run Sortshell in offline mode from any workstations taking data from tape or disc.

If you login to tuda0 from anywhere else (for example from tuda1) you can start here.

To login to tuda0 from the console of tuda1.  Ensure that you are at the Login Screen (logout if needed) of tuda1. You should now see a login prompt Welcome to tuda1.  Select Options => Remote Login => Enter Host Name and type in tuda0. You should now get a login prompt Welcome to remote host tuda0. Login using the id tuda in the normal way.

 

From the CDE desktop click on the virtual screen labeled MIDAS or switch to an empty virtual screen. Start a Terminal window and execute the command tuda-session. The MIDAS session startup is automatic and takes about 15 seconds on tuda0. Wait until all activity on the screen has ceased. During this startup period the data acquisition servers are contacted and your session updated to reflect the current settings.

 

All control and monitoring of your experiment is carried out using  tuda-session.

 

You may run as many copies of tuda-session on a screen as you wish (normally this means per login session) and there may be as many copies of  tuda-session running as you wish on different screens/login sessions and these may all control and monitor the experiment. The data acquisition software servers will reply to whichever session makes requests and the system allows for changes made from one session to be seen by all others. It is the responsibility of the users to ensure that they do not concurrently carry out conflicting actions.

 

The on-line sort function is performed within tuda0 using the Sortshell package taking its data source from the tape server shared memory buffer pool.

 

When you start a MIDAS session from the tuda ID you must run the experiment tuda.  As the session starts look in the Session Log window for the message You are now working with the experiment tuda. If you see anything else or do not see this message at all then

                Go to the TUDA Main Menu window

                Click on Access Control

                Select Experiment Access from the list

                Go to the Accessing an Experiment window

                Click on the button Leave

                Select tuda from the list

                Click on the button Join

Now look for the message You are now working with the experiment tuda in the Session Log window.

 

This setting can be saved as the default value.

2           Midas

 

The window titled MIDAS Main Frame contains the main menu for  tuda-session. This window can easily be identified when closed by the gold coloured background of its icon. The TUDA Data Acquisition System is built from a package of software components and techniques originally developed for Eurogam but now considerably extended and used for a wide range of applications. The package has the name  MIDAS which stands for  Multiple  Instance  Data  Acquisition  System although you may substitute the word  Analysis for  Acquisition when appropriate. (If you program in C++ you may follow the joke in the name - if you don’t you probably won’t.) The  Instances of MIDAS currently include Eurogam, Euroball, Exogam, Megha, Charissa, GREAT, TIARA and others.

 

3           Graphics and the GUI

 

The Midas GUI is based on a script language known as Tcl/Tk. Although Sun have sponsored this development in recent years the package is available on a wide range of hardware platforms including Sun Solaris and Microsoft Windows. Tcl/Tk has a Motif-like Graphical User Interface (GUI) which makes it fully compatible with the CDE window manager used on Sun Solaris systems.

Recently Tcl/Tk support and development has moved to Ajuba Solutions.

3.1           menus

Some menus have a dashed line at the top. This is the tearoff strip. A mouse hit on this area will transform the menu into a separate window.

3.2           buttons

There are three types of button used within the GUI.

Simple buttons which when you release mouse button 1 while over the button initiate an action.

Menu buttons which contain a small indicator (raised rectangular shape) on the button which when you release mouse button 1 (the left hand one) while over the button cause a menu to be displayed. You then move the mouse to the option you require in the menu and click mouse button 1 again. This then initiates the selected action. If you release mouse button 3 (the right hand one) while over the original menu button then the menu is not displayed but the action related to the first option in the menu is initiated.

 

Option buttons which are rather like a simple button but each click with mouse button 1 causes the next option to be selected and displayed on the button.

 

The tuda-session consists of a number of software tasks each of which creates at least one and possibly more windows. If you are having problems with a particular window you can kill the software task in the GUI by placing the mouse over the task window and pressing the Ctrl+Delete keys together. This action will delete the software task and all its associated windows. You can then restart the task from the Main Menu and get the automatic setup action for that task.

 

Warning - When starting an item from the MIDAS Main Menu click once and wait. If you click twice the window gets created twice. If this happens you will have to kill it and try again.

For more information. From the MIDAS Main Menu select the Help menu item and then the Online Manual option. This will display the MIDAS Online Home Page. Select the about the graphical user interface (GUI) hyperlink. You will then obtain a page giving further details about the various graphical widgets used and a list of the special keyboard bindings common to all MIDAS windows.

 

4           Access Control

Normally you will not have to use this item. The default item from the menu starts the Accessing an Experiment window. This allows you to select which experiment (collection of software components) you wish to use. If you login using the ID tuda then the experiment tuda is automatically connected. You should look for the message in the Session Log window You are now working with experiment tuda. If you do not see this then you will manually have to Join the tuda experiment.

 

To use - select the experiment (tuda) from the list; select the  Leave button if you have a  Current Experiment and then select the  Join button. The selected experiment now becomes your Current Experiment and this can be made the default which you are automatically connected to when  tuda-session starts by selecting the  Save as default button.

 

5           Experiment Control

This item from the  MIDAS Main Menu starts the MIDAS Data Acquisition System Control  window.

5.1           System Control

There are 6 sets of buttons which allow control of the major components of the data collection system.

 

·         VME  -  These control all the VME modules. Stop will perform the STOP action for all VME modules in your configuration. Mostly this implies a hardware disable or reset and the SAC module is disabled.  Go will perform the GO action for all the modules. This will enable all modules and enable the SAC module. The current state of the VME hardware (as determined by the state of the SAC module) is shown by the button which is depressed or golden in colour. Normally you should not need to use these buttons (see Data Acquisition Control).

 

·         Readout  -  These controls the software which reads the data from the various data sources. Go will cause it to be enabled and Stop will cause it to be disabled. The current state of the data acquisition program  is shown by the button which is depressed or golden in colour. Normally you should not need to use these buttons (see Data Acquisition Control).

 

·         Histogramming Enabled  -  This checkbox enables generation of software “singles” histograms for each data source (adc/tdc) by the data acquisition program running in the VME processor.

 

·         TS Transfer Enabled  - This checkbox determines if data  from the electronics is to be  written to the data ethernet in order to be available to the Tape Server and to Sortshell program(s) running in the workstation(s). If you do not require to write to tape or require an online sort this can unchecked (Off); otherwise it must be checked (On).

·          

·         Tape Server Enabled  -  This checkbox enables control of the Tape Server via the system STOP and GO buttons. It also enables monitoring of the Tape Server by the statistics task. It is not necessary for the Tape Server to be enabled by this checkbox for data to be written  to tape as long as the Tape Server state is GO.

·         Tapes  -  These are active only if Tape Server Enabled is true. They control writing of the event data to tape (see section Tape SubSystem) and have the same function as the STOP/GO buttons in the Tape Drive Control window. When the tape subsystem is in the Go state then it is guaranteed that 100% of the data read from the electronics will be written to tape. The current state of the Tape Server is shown by the button which is depressed or golden in colour. Normally you should not need to use these buttons (see Data Acquisition Control).

 

You will see that the flow of data is thus controlled from the top of the screen (VME), to the bottom (Tapes). It is sensible to have a subset of the controls in the GO state particularly when setting up. You may set the Tapes to STOP if for example you are having problems with the beam (and thus do not want possibly rubbish data written to your tape file) while leaving the rest GO in order to monitor the situation possibly using the online sort.

In order to run Sortshell in online mode data must be transferred from the data acquisition system to the tape server which must be in the GO state. If you do not require that the data is written to tape (for example while setting up) then enable the “No Storage” option in the tape server window (see later).

Remember to disable the No Storage option when you are ready to write to tape.

5.2           Data Acquisition Control

 

 

The large STOP and GO buttons to the right hand side of the window enable all components of the data acquisition system to be STOPped and GOed with one action.  The GO action enables starting at  Tapes: and working up  while the STOP action disables starting at  VME: and working down.

The large SETUP button will get your experiment into a state ready to GO.  An attempt is first made to STOP your experiment and hence the SETUP button can be used at any time!

Actions performed are:

·         The SAC module is disabled.

·         The VME configuration is reloaded if necessary. This is needed when the VME processor has been restarted.

·         The STOP function is carried out.

·         The data acquisition software running in the VME processor is RESET and SETUP.

·         The VME hardware is RESET and a VME parameter restore is performed if necessary. This is performed when the VME processor has been restarted.

·         All histograms are created dependent on the current Histogram option.

This is the preferred way to control the Data Acquisition system.

5.3           Histogram

You can choose the level of histograms to be created. Either None (no histograms at all) or All (histograms for all ADC and TDC channels).

 

In addition 2 histograms (Stat & Rate) are created which show the activity on a data item basis.

The Rate histogram shows the increment rate / sec for the Stat histogram and so is a very useful check on the adcs/tdcs.

5.4           Scalers

This button has a pop-down menu with  2 options. Show which starts the VME window for the CAEN V560 Scaler Modules and Clear which causes all CAEN V560 Scaler Modules to be cleared.

5.5           Tape Control

This button starts the Tape Control Window. From here you can control how your data is written to tape.

5.6           Monitoring

This button has a pop-down menu with 2 options.

The first option Statistics starts the  System Statistics window. This window shows a number of software counters from the data acquisition system and a  rate associated with each count. There is a Clear button to zero the counts and an option to autoupdate the counts at regular intervals.

5.7           Spectra

This button has a pop-down menu with 2 options.

The first starts the Spectrum Directory Browser window. From here you can select spectra to be displayed. The second starts the Spectrum Viewer window.

5.8           Setup Registers

This button recreates the registers needed for basic control of the data acquisition system.  This is needed only if the VME processor has been restarted.  It is envoked automatically by the data acquisiton SETUP .

5.9           Redisplay

This button causes the system states to be updated if you suspect they may be out of date. This can happen if another session has STOPped the system or the VME processor has been restarted.

5.10       Advanced

If you don’t know what this is all about DON’T touch. You will be required to confirm any action requested.

 

6           Tape SubSystem

6.1           Getting Started

To access the tape control system from the  MIDAS Main Menu click-on the button Tape Control. This will start the main  Tape Drive Control window or open it if it was already running somewhere.

The Version 2 GUI has been designed to give a much simpler interface to the Tape Server.

 

 

Help and instructions on what you can or should do next is displayed in a panel in the centre of the window.

6.1.1           Drive Allocation

Click on the Allocated? button next to each Available Drive to toggle between Yes and No.  This is equivalent to original Claim Drive function. All drives for which you wish to receive a copy of your data should be allocated.

6.1.2           Load Tape

You can choose between Initialise (when loaded a new tape); Mount (when adding data to an existing tape) and Reinitialise (when reusing an existing tape).

6.1.3           Unload Tape

Unloads the selected tape.

6.1.4            Run Number, Run Name Prefix and Experiment Name

Shows the current value which you can change when the Tape Server is not Going.

6.1.5           Server State

Permits the Tape Server state to be changed.  The current state of the Tape Server is shown by the button which is  depressed or golden in colour.

 

Click on the drive name to obtain detailed information about the status of the drive.

 

Using /dev/file. The tape data base is a configuration option which is currently the directory /data0/TapeData on tuda0.

Allocate in the normal way by clicking on the Allocated? button. Status becomes allocated. Next click on Load Tape and select the Initialise option.  Enter the required  Volume Name or accept the default which is the Experiment Name.  This will create a directory (Virtual Tape) using the Volume Name in /data0/TapeData. Status now becomes mounted. When you GO a file is created in this directory using the Run Name Prefix and Run Number.

So if the Volume Name is EXPT1; the Run Name Prefix is RUN and the Run Number is 8 then a file /data0/TapeData/EXPT1/RUN8 is used.  In fact the tape server is normally configured to limit event data files to 2Gbytes and so the files would be RUN8_0 etc.

 

7           VME

The VME Module Control item in the MIDAS Main Menu gives access to a menu which contains a entry for every type of VME module in your configuration. The default action opens  the main  VME Configuration and Control Frame.

7.1           Control

The  VME  Control window is the most important of the VME windows. It  contains a simple means of generating the VME hardware setup.

In order that the VME control works correctly it is essential that the TUDA session uses the same VME configuration that was used when the configuration was downloaded into the VME server (see later).  The configuration loaded into the VME server is written to the file /MIDAS/experiments/TUDA/vme_current_configuration. This configuration is automatically loaded when the VME Control window is first started.

 

If an item is selected from the configuration window its parameters are transferred to the 2 rows of choices just below the list. The selected item can be deleted by using the  Delete button. (Note this causes renumbering of the modules). Parameters of the selected item can be changed by first  selecting the new value using the menus and then using the  Replace button. Additional items can be added (to the end of the list) using the  Add button. The whole configuration is deleted using the  Clear button.

Once you have edited the VME configuration as desired then it is necessary to download it into the VME processor. This is performed using the button  Load Configuration into Register Server. At the same time as downloading the configuration the module definitions are downloaded. This action supplies the software loaded into the VME processor with its knowledge as to how to control the specific VME modules. The file /MIDAS/experiments/TUDA/vme_current_configuration is updated.

 

 

 

The VME configuration can be saved to or restored from a disc file using the Save/Restore Configuration button.

The current VME configuration can normally be restored from the file latest.

The settings of all adjustable parameters for all modules in your VME configuration can be saved to or restored from a disc file using the Save/Restore Setup button.

You can start the control window for any VME module either from the VME menu in the Main Menu or by double clicking on the module in the VME configuration window.

 

The button RESET electronics in the VME Configuration & Control window will set all VME modules into a default state. This will include, for example, setting all thresholds and RTPs in ADC modules to default values.

Note – The RESET operation checks that all modules perform a certain VME access correctly. If a module in your configuration is missing or not operating correctly you will get a warning message. This is the only time that VME modules are checked for correct operation.

 

The  button Save/Restore Setup in the VME Configuration & Control window will start a  window (Saving and Restoring VME Module Setups) which enables all the adjustable parameters for the VME modules in the configuration to be saved or enables a previously saved set of parameters to be restored.

 

The  GO button in the MIDAS Experiment Control  (or the GO Electronics button in the VME Configuration & Control window) will set all VME electronics into the GO state.

 

The  STOP button in the MIDAS Experiment Control  (or the HALT Electronics button in the VME Configuration & Control window) will set all VME electronics into the STOPPED state.

7.2           CAEN V560

This starts the window which controls the CAEN V560 Scaler Modules and allows access to the scaler values. It is exactly the same as the  Show Scalers button in the Experiment Control window.

7.3           Silena S9418

This starts the window which controls the Silena 9418 modules. This enables the parameters of the module to be adjusted.

7.4           CAEN V767

This starts the window which controls the CAEN V767 TDC modules.  Because of the nature of the CAEN microcontroller this is essentially a diagnostic window and the module setup should not normally be changed.

7.5           SAC

This starts the window which controls the SAC (Silena Acquisition Control).  This is essentially a diagnostic window and the module setup should not normally be changed.

7.6           Other VME Modules

There is a specific window for every type of VME module which allows access to all functions of the module. These are almost exclusively for diagnostic purposes.

8           Sort Tool

This is a new sort package which will eventually replace Sortshell.  More later

 

9           Exception Monitor

Creation and control of the  Exception Monitor window is largely automatic. This window will be used to display messages from the MIDAS system which are of significance - such as fatal tape errors - in addition to routine logging information.

 

10       Spectrum Viewer

This button starts a directory browser window which allows you to select spectra stored in the standard MIDAS format. You can then view these spectra in a large number of ways and perform simple analysis functions on the data.

 

11     Diagnostics

Unless you really know what you are doing DON’T touch.

 

12       Preferences

This menu item gives access via the  Colours item in the menu to the  Colour Selection Frame which allows user specific selection of the colours used for each of the widget types and components. The selection can be saved as the default for that user. Note that use of this option may cause problems  with other windows which also use a large number of colours due to hardware limitations.

There is also a Printers item which allows selection of the default printer for the session from those available to the system. It is also possible to select a pseudo-printer FILE which will write data to a disc file. This is useful if you want permanent hardcopy of windows on disc for further applications.

 

13       Hard Copy

You may make a hard copy of the whole screen or a single window. The hard copy is printed to the currently selected printer (which could be FILE). When making a hard copy of a window you will be required to select the window by clicking on it with the mouse. You will be asked to confirm the print operation.

14       Quit

This button initiates the preferred way to terminate  tuda-session because it ensures that all applications are given the chance to tidy up first. Any other method may leave  tasks running in your workstation which can cause problems latter. You are asked to confirm or cancel the QUIT action.

14       Running Sortshell (on-line)

Login to tuda0 and start Sortshell in the usual way.

To get data for Sortshell – start the experiment writing to tape OR if tape output is not required then while in STOP state go to the Tape Control window and select No Storage. Then GO.

15       Statistics

 

Useful data quality statistics are available by selecting the Statistics menu item from the Monitoring menu on the Experiment Control window. If the ratio of data items flushed to data items or the ratio of events not acceptable to events is high then the electronics should be checked.

 

Looking for data                  the data acquisition program is checking the SAC for an event to occur

 

Events                                    number of good events found

 

Event not acceptable            total number of events that contain some type of serious error and are discarded

 

Buffers transmitted            number of (32 Kbyte) formatted data buffers sent to the tape server

 

Null events                            events discarded because they contain no data

 

V767 no START item         data was received from a V767 module on channels 1-128 but no data was received on channel 0.  The data is discarded.

 

Bad data                                 when attempting to increment a histogram the offset was outside of the range of the histogram. Channel 0 is incremented.

 

SAC EvCnt read error        SAC event counter corrected after retry.

 

SAC multiple events           Even after a retry the SAC event counter has incremented by more than 1.

 

**** data items flushed     data items discarded during error recovery.  All module data fifos are flushed following a detected serious error.

 

**** data items                   good data items read.  Can be compared with data items flushed.

 

**** events                          events read

 

Data word skipped               a count of the total number of  data words discarded for any of the reasons given. This can be compared with the Total data words received.

 

Transfer Error                    there has been a network error sending to the tape server. The data is discarded. An attempt will be made to recover the connection.