Data Acquisition at ANU

 

 

V.F.E.Pucknell

November 2000

Reviewed November 2001 for Megha electronics

Revised April 2003

 

1           Important changes April 2003

 

1.1           Data format

 

The raw data received from the MEGHA electronics via the f2vb  is processed in the data acquisition processor (vme1) and reformatted using the standard MIDAS data format (see http://npg.dl.ac.uk/documents/edoc073/edoc073.html) before writing to tape. Sunsort now has a data format MIDAS which can handle this data.  You should now find that Sunsort reports zero errors when processing this data.

 

1.2           Data transfer

 

The method of sending data from the data acquisition processor (vme1) to the tape server has been changed to use a TCP network  connection which allows much higher data rates.  In online mode (data source = REMOTE) Sunsort must run in the same workstation as the tape server (charissa1).

 

1.3           Network at ANU

 

All the Charissa equipment at ANU is now connected to a secure network and accesses the Internet via a firewall. This should make no difference to outgoing connections but incoming connections are restricted by the firewall to a limited set of permitted connections. See the network connection section in the Charissa Computers at ANU document.

 

2           Introduction

2.1           Getting Started

 

On a Sun system (the preferred system is charissa1) or Xterminal  login using the id charissa which has the password chari$ma. From the Xterminal startup menu select the host charissa1.

If you login from the charissa1 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.

The sort-spy daemon for Sunsort is no longer required.

Warning The server should only be started once.  The recommended method is to login to charissa1 from the console using the charissa 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 servers. If you later login via a Xterminal the servers will already be running and so you should not repeat these instructions.

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

If you login to charissa1 from anywhere else (for example one of  the Xterminals) you can start here.

 

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 megha-session [or MIDAS-session megha]. The MIDAS session startup is automatic and takes about 15 seconds on charissa1. 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 megha-session.

 

You may run as many copies of megha-session on a screen as you wish (normally this means per login session) and there may be as many copies of  megha-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 charissa1 using the Sunsort package taking its data source from the tape server shred memory  by using the source REMOTE (rather than Exabyte, DLT or disc).

 

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

                Go to the Megha 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 ANU from the list

                Click on the button Join

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

 

This setting can be saved as the default value.

3           Midas

 

The window titled  Megha Main Frame contains the main menu for  megha-session. This window can easily be identified when closed by the gold coloured background of its icon. The Megha 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 and others.

 

4           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.

4.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.

4.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 megha-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 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 Megha Main Menu select the Help menu item and then the Online Manual option. This will display the Megha 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.

 

5           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 charissa then the experiment ANU is automatically connected. You should look for the message in the Session Log window You are now working with experiment ANU. If you do not see this then you will manually have to Join the ANU experiment.

 

To use - select the experiment (ANU) 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  megha-session starts by selecting the  Save as default button.

 

6           Experiment Control

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

6.1           System Control

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

 

·         Camac  -  These control all the CAMAC modules. Stop will perform the STOP action for all CAMAC modules in your configuration. Mostly this implies a hardware disable or reset and the Catch module is disabled.  Go will perform the GO action for all the modules. This will enable all modules and enable the Catch module. The current state of the CAMAC hardware (as determined by the state of the Crate Controller in Crate 1) 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).

 

·         F2VB  -  These controls the software which drives the f2vb module. Go will cause it to be enabled and Stop will cause it to be disabled. In the enabled (GO) state data will flow from the CAMAC into the f2vb memory. The current state of the f2vb hardware 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) by the data acquisition program running in the VME processor.

 

·         Data Transfer Enabled  - This checkbox determines if data  from the f2vb is to be  written to the Tape Server and to be available to Sunsort program(s) running in the workstation charissa1. 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 also control writing of the event data to tape (see section Tape SubSystem). When the tape subsystem is in the Go state then it is guaranteed that 100% of the data read from the f2vb 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 (CAMAC), 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 Sunsort in online mode data must be transferred from the data acquisition system (vme1) 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 when you are ready to write to tape.

 

6.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  Electronics: 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:

·         All CAMAC crates are inhibited

·         The CAMAC 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 CAMAC hardware is RESET and a CAMAC parameter restore is performed if necessary. This is performed when the VME processor has been restarted and the CAMAC status uncertain. The CAMAC RESET will reinitialize all CAMAC Crate Controllers in case any CAMAC crate has been recently power cycled.

·         If histogramming is enabled all spectra are created and histogramming is enabled in the VME processor

If you have power cycled a CAMAC crate and wish only to reinitialize the CAMAC crates the CAMAC RESET can also be performed via the CAMAC Reset item in  the Advanced menu.

 

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

6.3           Histogram

You can choose the level of histogramming to be performed. Either None (no histograms at all except Stat and Rate); E (only Energy histograms); T (only Time histograms) or E&T (both Energy and Time histograms).

 

At the present time the system cannot create all 640 8K channel histograms required and so all options are equivalent to None. However 2 histograms (Stat & Rate) are created which show the activity on a data item basis.

Megha crate 1 increments into channels 64 -> 127; Megha crate 2 increments into channels 128 -> 191 etc.

Within a crate block the order is Ch0 E, Ch0 T, Ch1 E etc.

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

6.4           Scalers

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

6.5           Tape Control

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

6.6           Statistics

This button 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.

6.7           Spectrum Browser

This button starts the Spectrum Directory Browser window. From here you can select spectra to be displayed.

6.8           Spectrum Viewer

This button starts the Spectrum Viewer window.

6.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.

6.10       Advanced

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

 

7           Megha Control

This button starts the Megha Amplifier Setup & Monitor window. 

When you start the Megha Amplifier Setup & Monitor window the software goes through an automatic procedure which starts the RS485 interface and then probes for Amplifier crates.  Only those crates which show as selected (the button is depressed and the background a golden colour) have been contacted and can be used. All other crates will have a blue background colour and are either not connected or most likely powered off.

You will see progress messages at the bottom of the MEGHA Amplifier Setup & Monitor Window and finally the message Ready when finished.

The Megha Amplifier Setup & Monitor window has online help linked to the components of the GUI. As you move the mouse around the window the use of the item currently pointed at will be shown at the foot of the window. If you point the mouse at an item and press the F1 key or Shift+F1 key you will obtain help on that item. The Help button will generate a complete guide to the tape subsystem GUI.

The main amplifier adjustments are now shown in "physical units". The Threshold in millivolts; the Gate Time in microsecs and the Fine Gain as a number (range 0.8 - 2.5). Using the online help (F1) you can obtain details of the method of conversion to and from the hardware units.

Hint.  To obtain a printout of the amplifier settings for your run book. Select Act on Crates? All; click on Show Settings and then use Ctrl+P to print the contents of the window containing the settings display.

Hint. If you get the warning message Repeated bad response from amplifier try clicking on the Reset Interface button and then the Probe for crates button. This will hardware reset the RS485 interface and check that the crates are responding correctly.

Hint. The amplifiers can “lose” their settings.  You can force reset the amplifiers by using the Reload current Amp settings button. This reads the current settings from the Amplifier Crate Controller; changes the settings to something different and then rewrites the saved values to force reload of the amplifier.

A few words of warning. The RS485 interface to the Amplifier Crate Controllers does not run very fast. Thus it can take up to 10-15 seconds to set a parameter if both the Act on all crates and Act on all amplifiers checkboxes are selected. Also there is no feedback from the actual amplifier modules to the amplifier crate control module. This means that there is no means of knowing for sure that a particular amplifier setting has in fact been written to the amplifier. The GUI can only display the settings read back from the amplifier crate control module.

8           Tape SubSystem

8.1           Getting Started

To access the tape control system from the  Megha 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.

Ensure any drive you use has a tape inserted and is online (DLT – Tape In Use yellow led on). [Solaris takes 30 seconds to respond if an attempt is made to access a  tape drive which has no online tape]

8.2           Version 2 GUI

The Version 2 GUI has been designed to give a much simplier 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.

8.2.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.

8.2.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).

8.2.3           Unload Tape

Unloads the selected tape.

8.2.4           Run Number, Run Name Prefix and Experiment Name

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

8.2.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.

 

9           CAMAC

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

While correct control of the CAMAC hardware is important for the correct operation of the MEGHA data acquisition electronics there are no user adjustable parameters and so much of this section can be skipped once the CAMAC hardware configuration has been supplied.

9.1           Control

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

In order that the CAMAC control works correctly it is essential that the Megha session uses the same CAMAC configuration that was used when the configuration was downloaded into the CAMAC server (see later).  The configuration loaded into the CAMAC server is written to the file /MIDAS/experiments/ANU/camac_current_configuration. This configuration is automatically loaded when the CAMAC 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 CAMAC 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 CAMAC modules. The file /MIDAS/experiments/ANU/camac_current_configuration is updated.

 

 

 

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

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

The settings of all adjustable parameters for all modules in your CAMAC 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 CAMAC module either from the CAMAC menu in the Main Menu or by double clicking on the module in the CAMAC configuration window.

 

Note that while the CAMAC electronics is in the GO state the status display for some modules (in particular Silena 4418 ADC modules) is unpredictable. The module status and VSN are not returned correctly while the ADC is busy – so be warned!

 

The button RESET electronics in the CAMAC Configuration & Control window will set all CAMAC modules into a default state. This will include setting all thresholds and discriminators in ADC modules to default values and setting the VSN for all FERA data sources. Note that the main system SETUP in the Megha Experiment Control window (the big yellow button) halts the CAMAC electronics but does not perform the RESET operation. Hence any custom setting of modules is preserved.

Note – The RESET operation checks that all modules perform a certain CAMAC cycle correctly. If a module in your configuration is missing or not operating correctly you will get a warning message. The normal response is that the CAMAC command did not get X (or sometimes Q and X) returned. This is the only time that CAMAC modules are checked for correct operation.

 

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

 

The  GO button in the Megha Experiment Control  (or the GO Electronics button in the CAMAC Configuration & Control window) will set all CAMAC electronics into the GO state. For FERA data sources this will

                Reset the module

                Write the VSN

                Set the module status register for ECL (FERA) readout

 

The  STOP button in the Megha Experiment Control  (or the HALT Electronics button in the CAMAC Configuration & Control window) will set all CAMAC electronics into the STOPPED state. For FERA data sources this will

                Reset the module

9.2           LC2551

This starts the window which controls the LeCroy 2551 Scaler Modules and allows access to the scaler values. It is exactly the same as the  Show Scalers button in the  Megha System Control window.

9.3           LC2277

This starts the window which controls the LeCroy 2277 TDC modules. This is essentially a diagnostic window and the module setup should not normally be changed.

9.4           RS232 CC

This starts a window which allows control of the RS232 CAMAC crate controllers used by the Megha electronics. The status of the currently selected CAMAC Crate is displayed.

If you have for any reason to power off and on a CAMAC crate or if a CAMAC crate has lost power for some reason then you can reinitialise the crate by the Initialise Controller button. The Control/Status register should normally show 0x00040C.

9.5           Other CAMAC Modules

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

 

10       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.

 

11       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.

 

12     Diagnostics

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

However a useful diagnostic is started by the F2VB… menu item. This enables you to spy on the buffer RAM of the F2VB module and see your raw data. Very useful when the electronics is not working to its normal efficiency.

Ensure the option button shows display data RAM and click on the read button. 64 32 bit words of the data RAM are displayed. You can set the start address offset or enable the increment RAM address checkbox to step through the data RAM.

A useful button is Dump using current addresses which reads the data ram at the buffer address currently being written. [be careful if the data rate is VERY slow or stopped as the dump may show old data]

The format data RAM button will generate a formatted display of the last block of the data RAM displayed using the selected format option (make sure this is correct for your hardware but the default is for MEGHA electronics).

No data? - Check that you have beam!!  Check that you are GOING!!  If you are sure check the F2VB state.

Check that event storage active is enabled (ticked)

                If not – check that you really are Going

                If it is then

If List ended and Memory full are not on permanently (ticked) [use redisplay to update] and FIFO empty is ticked then the electronics is not sending data to the f2vb

                If it is and  List ended is set permanently and FIFO empty is not ticked then you may have a data acquisition system problem.

If the VME system is restarted while this window is open you will need to click on the define registers button to reestablish access to the F2VB.

 

13       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.

 

14       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.

15       Running Sunsort (on-line)

Login to charissa1 and start Sunsort in the usual way. Select format MIDAS (not megha) and select sort media Remote.

To get data for Sunsort – 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.

16       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 word skipped to total data words or the ratio of events not acceptable to events is high then the electronics should be checked. It may be useful to use the f2vb diagnostic option.

 

Data buffers                          number of (16 Kbyte) buffers read from the f2vb

 

Total data words                   number of data words (16 bit) read from the f2vb

 

Events                                    number of good events found

 

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

 

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

 

Null events                            events discarded because they contain no data

 

Event word count too big     number of start event tokens received which have a word count greater than 1282

 

Bad flag bits                         a data word which is not a end of block or event header in which the label part flag bits are not 001 and the data part flag bits are not 100 [ie data word is not 0x2xxx8xxx]

 

Missing start token            all data words received when a start event token is expected

 

Missing stop token             all data words discarded when the end of data buffer is reached but there is a current partial event.

 

Data after stop token          all data words discarded when the end of block token is received but there is still data in the data buffer

 

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.

 

Bad length                            the buffer length received from the f2vb is outside the correct range  -  the whole data buffer is discarded unprocessed – this is a f2vb firmware error

 

Waiting for Tx                     this is not an error and no data is discarded.  Data is being received from the f2vb faster than it can be sent to the tape server.