FAST ComTec MPA4 User Manual

Page 1
MPA4
8(4) Channel Multiparameter Data Acquisition System
User Manual
Copyright FAST ComTec GmbH
Grünwalder Weg 28a, D-82041 Oberhaching
Germany
Version 1.30 June 26, 2017
Page 2
Software Warranty
ComTec GmbH II
Software Warranty
FAST ComTec warrants proper operation of this software only when used with software and hardware supplied by FAST ComTec. FAST ComTec assumes no responsibility for modifications made to this software by third parties, or for the use or reliability of this software if used with hardware or software not supplied by FAST ComTec. FAST ComTec makes no other warranty, expressed or implied, as to the merchantability or fitness for an intended purpose of this software.
Software License
You have purchased the license to use this software, not the software itself. Since title to this software remains with FAST ComTec, you may not sell or transfer this software. You must get FAST ComTec's written permission for any exception to this license.
Backup Copy
This software is protected by German Copyright Law and by International Copyright Treaties. You have FAST ComTec's express permission to make one archival copy of this software for backup protection. You may not otherwise copy this software or any part of it for any other purpose.
Copyright  1998 - 2017 FAST ComTec GmbH
D-82041 Oberhaching, Germany
All rights reserved
This manual contains proprietary information; no part of it may be reproduced by any means without prior written permission of FAST ComTec, Grünwalder Weg 28a, D-82041 Oberhaching, Germany. Tel: ++49 89 66518050, FAX: ++49 89 66518040.
The information in this manual describes the hardware and the software as accurately as possible, but is subject to change without notice.
Page 3
Table of Contents
ComTec GmbH III
Table of Contents
1. Introduction ..............................................................................................................................1-1
2. Installation Procedure ..............................................................................................................2-1
2.1. Hard- and Software Requirements ............................................................................. 2-1
2.2. Driver Installation ........................................................................................................ 2-2
2.3. Software Installation.................................................................................................... 2-4
2.4. Hardware Installation .................................................................................................. 2-4
2.5. Getting Started ............................................................................................................ 2-5
2.5.1. Getting Started with a basic SINGLE measurement...................................... 2-5
2.5.2. Getting Started with a basic COINCIDENCE measurement.......................... 2-8
2.5.3. Basic Usage of the RealTimeClock Option .................................................. 2-13
2.6. Installing more than one MPA4(T) modules ............................................................. 2-16
2.7. Models and Upgrade Options ................................................................................... 2-17
3. Hardware Description .............................................................................................................. 3-1
3.1. Overview ..................................................................................................................... 3-1
3.2. General Functionality .................................................................................................. 3-2
3.2.1. ‘GO’-Line ........................................................................................................3-2
3.2.2. FEATURE (Multi-) I/O Connector................................................................... 3-3
3.2.3. 100MHz Counters .......................................................................................... 3-3
3.2.4. Time Base / Reference Clock ........................................................................ 3-6
3.3. Multiparameter Section ............................................................................................... 3-7
3.3.1. ADC Port Connectors..................................................................................... 3-7
3.3.2. Auxiliary / Reject I/O Connectors ................................................................... 3-8
3.3.3. ADC GATE Inputs ..........................................................................................3-9
3.3.4. 48Bit Realtime Clock ...................................................................................... 3-9
4. Functional Description ............................................................................................................. 4-1
4.1. Introduction ................................................................................................................. 4-1
4.2. MPA Modes of Operation............................................................................................ 4-1
4.2.1. SINGLE Mode ................................................................................................4-1
4.2.2. COINCIDENCE Mode .................................................................................... 4-1
4.3. FIFO Concept.............................................................................................................. 4-2
5. Software Description ................................................................................................................ 5-1
5.1. Server functions ..........................................................................................................5-1
5.1.1. Initialization files ............................................................................................. 5-1
5.1.2. Action menu ................................................................................................... 5-3
5.1.3. File menu........................................................................................................ 5-3
5.1.4. Setting dialogs................................................................................................ 5-5
5.1.5. ADC Settings dialog ....................................................................................... 5-6
5.1.6. Coincidence Definition dialog......................................................................... 5-7
5.1.7. Auxiliary Connectors dialog............................................................................ 5-8
5.1.8. Scaler Settings dialog..................................................................................... 5-9
5.1.9. System definition dialog ...............................................................................5-10
5.1.10. Dual-parameter and Calculated spectra dialog............................................ 5-12
5.1.11. Dual-parameter spectra with a scaler parameter ......................................... 5-19
5.1.12. File formats................................................................................................... 5-20
5.2. Control Language...................................................................................................... 5-23
5.3. Controlling the MPA4 Windows Server via DDE ...................................................... 5-30
5.3.1. Open Conversation ...................................................................................... 5-30
5.3.2. DDE Execute................................................................................................ 5-30
5.3.3. DDE Request ............................................................................................... 5-31
5.3.4. Close Conversation ...................................................................................... 5-32
5.3.5. DDE Conversation with GRAMS/386........................................................... 5-33
5.4. Controlling the MPA4 Windows Server via DLL ....................................................... 5-34
Page 4
Table of Contents
ComTec GmbH IV
6. MPANT Software ..................................................................................................................... 6-1
6.1. File Menu .................................................................................................................... 6-2
6.2. Window Menu ............................................................................................................. 6-4
6.3. Region Menu............................................................................................................... 6-5
6.4. Options Menu.............................................................................................................. 6-9
6.5. Action Menu .............................................................................................................. 6-22
7. Programming and Software Options........................................................................................ 7-1
8. Appendix .................................................................................................................................. 8-1
8.1. Performance Characteristics....................................................................................... 8-1
8.1.1. MPA General.................................................................................................. 8-1
8.1.2. Time base....................................................................................................... 8-1
8.2. Specifications ..............................................................................................................8-1
8.2.1. Absolute Maximum Ratings ........................................................................... 8-1
8.2.2. Recommended Operating Conditions ............................................................ 8-2
8.2.3. Signal Connectors .......................................................................................... 8-2
8.3. Diagrams ..................................................................................................................... 8-5
8.3.1. SYNC_2 Output.............................................................................................. 8-5
8.3.2. ADC port DRDY / DACC handshake ............................................................. 8-6
8.3.3. ADC GATE setup and hold time .................................................................... 8-7
8.4. Power Requirements................................................................................................... 8-9
8.5. Metal Case ..................................................................................................................8-9
8.6. Accessories.................................................................................................................8-9
8.7. Trouble Shooting ....................................................................................................... 8-11
8.8. Personal Notes.......................................................................................................... 8-12
Page 5
Table of Figures
ComTec GmbH V
Table of Figures
Fig. 1.1: MPA4 unit........................................................................................................................ 1-1
Fig. 2.1: Device manager .............................................................................................................. 2-2
Fig. 2.2: Driver installation............................................................................................................. 2-2
Fig. 2.3: Choosing the right folder................................................................................................. 2-3
Fig. 2.4: Device Manager after successfull driver installation....................................................... 2-3
Fig. 2.5: MPA4 rear panel ............................................................................................................. 2-4
Fig. 2.6: MPA4 / MPANT startup screen....................................................................................... 2-5
Fig. 2.7: MPA4 Settings and 'Coincidence Definition' dialogs ...................................................... 2-6
Fig. 2.8: Set ADC range to 1k range.............................................................................................2-6
Fig. 2.9: START a SINGLE measurement with one ADC ............................................................. 2-7
Fig. 2.10: Spectrum of a basic SINGLE measurement................................................................. 2-8
Fig. 2.11: Setup two ADCs for a COINCIDENCE measurement.................................................. 2-9
Fig. 2.12: Setup ADC range and coincidence resolving time ..................................................... 2-10
Fig. 2.13: Add a two-dimensional spectrum................................................................................ 2-10
Fig. 2.14: New spectrum defined ................................................................................................ 2-11
Fig. 2.15: Two single and one multiparameter spectra display................................................... 2-12
Fig. 2.16: Basic RTC Experiment................................................................................................ 2-13
Fig. 2.17: ADC Coincidence Definition for RTC Experiment....................................................... 2-14
Fig. 2.18: Auxiliary Connectors for RTC Experiment .................................................................. 2-14
Fig. 2.19: RTC Spectrum Definition ............................................................................................ 2-15
Fig. 2.20: Basic Time Spectra of a Single ADC .......................................................................... 2-15
Fig. 2.21: Editing MPA4.INI ......................................................................................................... 2-16
Fig. 2.22: Testing and identifying three MPA4 modules ............................................................. 2-16
Fig. 3.1: MPA4 front panel ............................................................................................................ 3-1
Fig. 3.2: Thermal picture of the metal case................................................................................... 3-2
Fig. 3.3: Schematic of FEATURE I/O connector........................................................................... 3-3
Fig. 3.4: Connector assignment for the 100MHz counters ........................................................... 3-4
Fig. 3.5: 100MHz counters control logic........................................................................................ 3-6
Fig. 3.6: Simplified ADC port timing .............................................................................................. 3-7
Fig. 3.7: ADC Port connectors' pin assignment ............................................................................ 3-8
Fig. 3.8: AUX / REJECT I/O logic ................................................................................................. 3-9
Fig. 3.9: ADC GATE input connector ............................................................................................ 3-9
Fig. 4.1: Coincidence processing and timing ................................................................................4-2
Fig. 4.2: FIFO concept .................................................................................................................. 4-3
Fig. 5.1: MPA4 Server Window ..................................................................................................... 5-1
Fig. 5.2: MPA4.ini File ................................................................................................................... 5-2
Fig. 5.3: Data Operations dialog for MPA data (left) and selected spectra (right) ........................ 5-3
Fig. 5.4: Replay Settings dialog .................................................................................................... 5-4
Fig. 5.5: About MPA4 dialog box .................................................................................................. 5-4
Fig. 5.6: Settings overview............................................................................................................ 5-5
Fig. 5.7: Inspect MPA4 dialog ....................................................................................................... 5-5
Fig. 5.8: ADC Settings and Presets dialog box, right: with expanded ports
enabled .......................................................................................................................... 5-6
Fig. 5.9: Coincidence Definition dialog box................................................................................... 5-7
Fig. 5.10: Auxiliary Connectors dialog box.................................................................................... 5-8
Fig. 5.11: Scaler Settings dialog box ............................................................................................ 5-9
Fig. 5.12: Left: MPA4-Scaler Status utility, right: as ratemeter ................................................... 5-10
Fig. 5.13: System Definition dialog box....................................................................................... 5-11
Fig. 5.14: System Definition dialog box, three MPA4(T) modules .............................................. 5-11
Fig. 5.15: Remote control dialog ................................................................................................. 5-12
Fig. 5.16: Dualparameter and Calculated spectra dialog box..................................................... 5-13
Fig. 5.17: Multi Display Setting ................................................................................................... 5-13
Fig. 5.18: Multi Time Display Setting .......................................................................................... 5-14
Fig. 5.19: Calculated Spectrum Setting ...................................................................................... 5-15
Fig. 5.20: Sum of Counts Dialog .................................................................................................5-16
Page 6
Table of Figures
ComTec GmbH VI
Fig. 5.21: Sum of counts spectra before and after calibration .................................................... 5-16
Fig. 5.22: Conditions ...................................................................................................................5-17
Fig. 5.23: ROI Conditions dialog ................................................................................................. 5-17
Fig. 5.24: Combine Conditions dialog ......................................................................................... 5-18
Fig. 5.25: Test acquisition with calculated spectra ..................................................................... 5-18
Fig. 5.26: Creating a dualparameter Scaler spectrum ................................................................ 5-19
Fig. 5.26: Opening the DDE conversation with the MPA4 in LabVIEW ...................................... 5-30
Fig. 5.27: Executing a MPA4 command from a LabVIEW application........................................ 5-31
Fig. 5.28: Getting the total number of data with LabVIEW ......................................................... 5-31
Fig. 5.29: Getting the data with LabVIEW................................................................................... 5-32
Fig. 5.30: Closing the DDE communication in LabVIEW ............................................................ 5-32
Fig. 5.31: Control Panel of the demo VI for LabVIEW ................................................................ 5-33
Fig. 6.1: MPANT main window...................................................................................................... 6-1
Fig. 6.2: MPANT Map and Isometric display................................................................................. 6-2
Fig. 6.3: File New Display dialog box............................................................................................ 6-3
Fig. 6.4: Print dialog box ............................................................................................................... 6-4
Fig. 6.5: Slice and rectangular ROI Editing dialog box ................................................................. 6-7
Fig. 6.6: Polygonal ROI Editing dialog box ................................................................................... 6-7
Fig. 6.7: Single Gaussian Peak Fit................................................................................................ 6-8
Fig. 6.8: Log file Options for the Single Gaussian Peak Fit .......................................................... 6-9
Fig. 6.9: Colors dialog box .......................................................................................................... 6-10
Fig. 6.10: Color Palette dialog box.............................................................................................. 6-10
Fig. 6.11: Single View dialog box................................................................................................ 6-11
Fig. 6.12: Custom-transformed spectra dialog............................................................................ 6-12
Fig. 6.13: MAP View dialog box ..................................................................................................6-12
Fig. 6.14: Isometric View dialog box ...........................................................................................6-13
Fig. 6.15: Axis Parameter dialog box .......................................................................................... 6-14
Fig. 6.16: Scale Parameters dialog box ...................................................................................... 6-15
Fig. 6.17: Calibration dialog box ................................................................................................. 6-16
Fig. 6.18: Comments dialog box .................................................................................................6-17
Fig. 6.19: Settings dialog box...................................................................................................... 6-17
Fig. 6.20: Data Operations dialog box ........................................................................................ 6-18
Fig. 6.21: System Definition dialog box....................................................................................... 6-18
Fig. 6.22: Spectra dialog box ...................................................................................................... 6-19
Fig. 6.23: Slice dialog box........................................................................................................... 6-19
Fig. 6.24: Replay dialog box ....................................................................................................... 6-20
Fig. 6.25: Tool Bar dialog box ..................................................................................................... 6-20
Fig. 6.26: Function keys dialog box ............................................................................................ 6-21
Fig. 8.1: SYNC_2 output signals: rise time, fall time..................................................................... 8-5
Fig. 8.2: SYNC_2 10 MHz clock output signal .............................................................................. 8-5
Fig. 8.3: SYNC_2 100 MHz clock output signal ............................................................................ 8-5
Fig. 8.4: ADC port handshake....................................................................................................... 8-6
Fig. 8.5: ADC port handshake with 2 simultanously firing ADC's ................................................. 8-6
Fig. 8.6 : Handshake with 2 ADC's at a rate of 1MHz each.......................................................... 8-7
Fig. 8.7: ADC GATE setup time .................................................................................................... 8-7
Fig. 8.8: ADC GATE hold time ...................................................................................................... 8-8
Fig. 8.9: Counter cable................................................................................................................ 8-10
Page 7
WARNINGS
ComTec GmbH VII
WARNINGS
The metal case of the MPA4 might be hot.
Beware of burning yourself!
The whole metal case works as a passive cooler for the device.
It can reach surface temperatures of well over 50°C.
The metal case of the MPA4 works as a passive cooler. Please provide ample airflow around the device. Do not cover the case. Do not place it inside a closed cabinet etc.
Static electricity discharges can severely damage the MPA4. Use strict antistatic procedures when connecting cables and during handling of the device.
Take care not to exceed the maximum input voltages as described in the technical data.
Page 8
Introduction
ComTec GmbH 1-1
1. Introduction
The MPA4 Multiparameter System is an ultra fast listmode multichannel data acquisition system featuring performance and measurement capabilities previously not known in commercially available multiparameter systems.
2 highspeed USB connections provide for easy connection to a computer and asure maximum data transfer rates into the PC.
The MPA4 Multiparameter System actually is a comprehensive set of 2 different data acquisition devices in one unified package.
First there is an 8(4) input classical multiparameter system section providing very flexible acquisition combinations of upto 8 external NIM ADC port devices like ADC's, TDC's.
Secondly there are 8 independent 32bit 100MHz counters/scalers (option).
An onboard DDR2 memory with a capacity of 1 or optionally 2 GB functions as large FIFO for buffering high event rates. The FIFO memory buffers enable to MPA4 to continuously transfer data rates of approximately 35 MByte/s to the connected computer.
If you intend to use 2 USB ports for higher data transfer rates also connect “USB 2”.
The MPA4 system allows to simultaneously acquire single and coincidence ADC data (e.q. energy spectra) from upto 8 input channels.
A range of versatile additional features enables easily adapting the MPA4 system to a large variety of experimental requirements, complicated or almost impossible to fulfill with other systems.
Eight 32 bit counters with a maximum countrate of 100MHz each are provided (option). Each counter is presettable and can also be configured to free run at 100MHz. 2 of the counters provide a carry output for cascading and 2 can switch from UP to DOWN counting by external signal application. All of them can be gated as well.
An open-drain 'GO'-line (compatible to other products of FAST ComTec) enables overall experiment synchronization.
A versatile 8 bit digital I/O
1
port may further satisfy your experimental needs.
The MPA4 is designed with “state-of-the-art” components, which offer excellent performance and reliability. The high-performance hardware is matched by sophisticated WINDOWS™-based software (delivered with each MPA4) providing a powerful graphical user interface for setup, data transfer and spectral data display.
1
I/O: Input / Output
Fig. 1.1: MPA4 unit
Page 9
Introduction
ComTec GmbH 1-2
For dependent multiparameter data acquisition coincidence resolving times from low 20ns to
1.3ms can be selected in steps of 20ns. A programmable timeout counter (also 20ns to 1.3ms) for the maximum time to wait for a conversion being finished after a DEADTIME signal of the ADC was detected further helps to optimize the data throughput for a specific experiment.
With the MPA4 multiparameter system, FAST introduces a most flexible and versatile method to setup coincidence mode data acquisition. Coincident events may be defined as almost any combination of the 8(4) ADC ports and also the auxiliary connectors might be involved. Several different combinations may be defined as coincidence conditions at a time. Besides, it is possible to define the ADC ports that can actually start a coincidence independently. Thus, random coincidences and therefore the base level noise in the spectra is further reduced.
For special external data units the ADC ports can be configured to allow even 32, 48 or 64 bit wide interfaces.
An optional realtime clock with a 6.4ns resolution a variety of additional information can be captured. E.g. timestamps may be inserted into the datastream to obtain detailed information on the time particular events have occurred. Each ADC can be individually marked with a time stamp. Also scaler, multi spectra scaling, multiscaling, Time-of-Flight applications etc. may be realized since a large variety of load, reset, capture, readout options is available.
Livetime correction on all ADC input ports is also provided.
The easy to use multiparameter operating software MPANT allows to fully control the complete system setup. A monitoring facility provides to on-line view single and dual parameter spectra.
Some of MPANT´s features are high-resolution graphics displays with zoom, linear and logarithmic (auto) scaling, grids, ROIs
2
, Gaussian fit, calibration using diverse formulas and
FWHM
3
calculations. Macro generation using the powerful command language allows task
oriented batch processing and self-running experiments.
Almost any thinkable combination of time, single and multiparameter spectra may be acquired and displayed while also writing the data in listmode to a hard disk for later analysis.
List data can be stored on the local harddisk drive or any other directly accessible mass storage device.
Several single and multiparameter spectra may also be accumulated in the RAM of the PC. Multiple windows of dual and single parameter spectra can be simultaneously displayed. Any combination of ADCs can be selected thus, it is possible to define several single and dual parameter spectra which can be acquired and displayed.
A DLL (Dynamic Link Library) is available for operation in a Laboratory Automation environment. Drivers for LINUX are also available.
2
ROI: Region Of Interest
3
FWHM: Full Width at Half Maxim um
Page 10
Installation Procedure
ComTec GmbH 2-1
2. Installation Procedure
2.1. Hard- and Software Requirements
For operating the MPA4 you need a standard PC with USB 2.0 port and Microsoft Windows XP or higher. USB 1.0 ports do not work. The MPA4 works well using only one USB 2.0 port. The maximum throughput then is 30 Mbyte/sec. This throughput can be somewhat increased by using two USB ports. USB port 1 will then be used for controlling and parameter transfer, USB port 2 will be used for data transfer only using two pipes acting interleaved in parallel switching 1 kbyte buffers between two different endpoints. The maximum throughput then is typically 35 Mbyte/sec but we have seen a record of about 40 Mbyte/sec on one computer.
The large 1 or 2 GB FIFO is able to buffer data recorded at 33 million events/sec. Of course it will take some time after stopping an acquisition to empty a full FIFO, 2 Gbyte / 30Mb/sec is about a minute. The filling status of the FIFO is shown in the software. There is also an indicator showing if any data is lost. The fast FIFOs on each 100ps TOF input channel can buffer data recorded with 10 GHz without loss up to 6.5 mikrosec. See chapter 4.2 in this manual.
We do not expect any problems with host compatibility as we do not use something else than any USB hard disk or memory stick. Of course, it is necessary that the PC has a true USB 2.0 port. Older PC's that do not have USB 2.0 on the motherboard can use a PCI card providing USB 2.0 ports. We have no good experience with such PCI cards, the throughput will be much lower, typically only 15..20 Mbyte/sec, and some cards may not work at all. So we recommend a PC with true USB 2.0 ports on the motherboard, as is now standard even for laptops.
First check you have all shipped equipment available:
Transport case
MPA4 module
Power supply module 100…240 V
AC
/ 12 V
DC
Power line cord
(6x) SMA – BNC cable, RG316, 2 m
(2x) USB 2.0 (A/B) cable, 3 m
User manual
CD or USB stick with operating software
Page 11
Installation Procedure
ComTec GmbH 2-2
2.2. Driver Installation
To install the driver, please start the device manager. You can do it by right-clicking the computer shortcut on the desktop and selecting “Manage” from the drop-down-menu, then “Device Manager”. Another way is to select in the Start Menu Settings..Control Panel, then System..Device Manager.
Fig. 2.1: Device manager
The new device is displayed as “S7889” in a class “Other devices”. Please right-click it and select “Update driver” from the drop-down menu.
Fig. 2.2: Driver installation
Page 12
Installation Procedure
ComTec GmbH 2-3
Windows offers to search automatically for updated driver software or browse the computer for the driver software. Don’t try the automatic installation, it will probably not work. Select to browse manually for the driver and select for example for Windows 7 or 8 the wdmdriv\win7 folder on the CD or Software stick.
Fig. 2.3: Choosing the right folder
Please don’t go deeper into the folder structure, the processor type (x86 , x64, etc.) is found automatically. After pressing “OK” the driver installation will proceed. The device manager will then show a “FAST ComTec MCS6 USB Driver” in a class “FAST ComTec USB Device” as shown in Fig. 2.4
Fig. 2.4: Device Manager after successfull driver installation
Please check the Power Saving Options in the PC Settings. If the PC goes to sleep during a running acquisition and shuts the USB port down, the software will hang up. So it is recommended to disable automatic going to sleep in the energy options.
Page 13
Installation Procedure
ComTec GmbH 2-4
2.3. Software Installation
To install the MPA4 software on your hard disk insert the MPA4 installation medium (CD or USB­Stick) and start the installation program setup.exe for the 32-bit software or setupx64.exe for the native 64-bit software.
A directory called C:\MPA4 for the 32-bit software or C:\MPA4(x64) for the native 64-bit software is created on the hard disk and all MPA4 and MPANT files are transferred to this directory. Drive C: is taken as default drive and \MPA4 as default directory. It is not mandatory that the MPA4 operating software is located in this directory. You may specify another directory during the installation or may copy the files later to any other directory.
The Setup program has installed a shortcut on the desktop. The icon starts directly the MPA4.EXE. The server program will automatically call the MPANT.EXE program when it is executed. The MPA4 Server program controls the MPA4T module but provides no graphics display capability by itself. By using the MPANT program, the user has complete control of the MPA4 along with the MPANT display capabilities.
To run the MPA4 software, simply double click on the “MPA4 Server Program“ icon. To close it, close the MPA4 server in the Taskbar.
2.4. Hardware Installation
Installation of the MPA4 is as easy as connecting a cable. Connect the power supply to the “POWER” connector and a USB 2.0 cable to the “USB 1” port. At the host computer plug in the USB cable into a high-speed capable USB 2.0 port. Since USB is a hot-pluggable interface the sequence of applying power and connecting the USB port is not important.
NOTE:
At the host computer a high-speed (480 Mbit/s4) capable USB 2.0 interface must be used.
When power is applied the “POWER ON” LED on the rear of the MPA4T should be lit and a second later “POWER GOOD” as well.
If you intend to use 2 USB ports for higher data transfer rates also connect “USB 2”.
4
The USB 2.0 specification includes low-speed (1.5 Mbit/s), full-speed (12 Mbit/s) and high-speed (480 Mbit/s) signaling rates
Fig. 2.5: MPA4 rear panel
Page 14
Installation Procedure
ComTec GmbH 2-5
IMPORTANT:
All setup and control data exchange is handled over “USB 1”. Thus, “USB 1” must always be connected to the host computer.
When the software and driver are already installed the computer will detect the MCS6 automatically as soon as it is connected.
2.5. Getting Started
2.5.1. Getting Started with a basic SINGLE measurement
What we are going to setup now is a simple SINGLE measurement using one external ADC. The acquired spectrum will have a range of 1k channels corresponding to a 1k ADC conversion gain setting.
First step is to start the MPA4 software by double clicking the corresponding icon. This will automatically start the MPANT program. On startup the MPA4 Server is iconized and one does not have to worry about it since all hardware settings are also accessible from the MPANT program which actually is the graphical user interface and which will appear now on your screen (ref. Fig. 2.6).
Now we have to change the system settings to one ADC (default is four or eight) only. Click on
Options – H
ardware Settings… or to find the MPA4 Settings window pop up (see Fig. 2.6).
Fig. 2.6: MPA4 / MPANT startup screen
Page 15
Installation Procedure
ComTec GmbH 2-6
Fig. 2.7: MPA4 Settings and 'Coincidence Definition' dialogs
Click the ADC Coincidences button to open the ADC Coincidence Definition window. It should look like Fig. 2.7. Click the <<All button below the „Singles no coinc.“ box to remove all ADCs out of the list, then click the >> button to enter ADC1 again. Close the window with OK.
No we must set the range of the ADC to 1k. For this, click ADC Settings... Change the ADC Settings – Range to 1k = 1024 (ref. Fig. 2.8) and click OK. The spectrum display of ADC1 in the MPANT window changes to a full scale range of 1024 channels.
Be sure you connected an external pulse height analyzing ADC (set to 1k conversion gain) to the ADC1 port. Input analog signals to that ADC, e.g. from a pulser.
Now start data acquisition by a click on the START button
(ref. Fig. 2.9). Recognize that when you move the mouse pointer over a button a help message appears in the lower left corner of the MPANT window. In this case it is 'Erases and starts a measurement' meaning that the contents of
Fig. 2.8: Set ADC range to 1k range
Page 16
Installation Procedure
ComTec GmbH 2-7
the histograms is erased and then a new acquisition is started. Click OK in the message window that appears after clicking the START button.
See that the Status changes to ON. The Real time will begin to run also indicating that data acquisition is ON. Depending on your input signals a histogram should start to be accumulated
(ref.Fig. 2.10). When you want to finish data acquisition click on the STOP button
. The
corresponding help message is 'Halts a measurement'.
Fig. 2.9: START a SINGLE measurement with one ADC
Page 17
Installation Procedure
ComTec GmbH 2-8
2.5.2. Getting Started with a basic COINCIDENCE measurement
What we are going to do is to setup a basic COINCIDENCE measurement using two ADCs. The ADCs will be set to a conversion gain of 4k. The on-line displays are set to a single spectrum for each ADC and a two-dimensional spectrum of ADC1 x ADC2 with a resolution of 256 x 256 channels.
First open the Coincidence Definition window by a click on ADC Coincidences in the MPA4 Settings dialog. Use the << All buttons to move all ADCs to the Not active box and then move ADC1 and ADC2 to the Coinc. with any box with the >> button below this field. By default they are displayed with a 'S' appended indicating that they are allowed to start a coincidence resolving time window. If the 'S' is not appended check the Start enable check box for each ADC. The Coincidence Definition window should look like Fig. 2.11 now.
Fig. 2.10: Spectrum of a basic SINGLE measurement
Page 18
Installation Procedure
ComTec GmbH 2-9
Set the ADC ranges to 4096 using the ADC Settings... button ADC Settings and Preset window. Set the Coinc time to 10.00µs using the scrollbar. Then click into the data field of D
RDY Timeout
and type in 50.00 to set the DRDY timeout to 50.00µs. This is in accordance to a 100MHz Wilkinson type ADC (4k x 10ns 40µs + 10µs overhead for safety) like our model 7074 Quad ADC. The DRDY timeout is the maximum time the system waits for converted data (DRDY goes true) after the coincidence time window is closed. For a 7072 ADC a short DRDY timeout of about 10 µs is reasonable. Click OK to accept the new settings and to close the ADC Settings and Preset window.
Fig. 2.11: Setup two ADCs for a COINCIDENCE measurement
Page 19
Installation Procedure
ComTec GmbH 2-10
Now we will still have to define a two-dimensional spectrum of ADC1 x ADC2. Open the spectra definition window Dualparameter and Calculated spectra by a click on the Spectra button
.
In the Map and Calculated spectra window click on Add Multi… button to add a new multiparameter spectrum. The Multi Display Setting window opens.
Fig. 2.12: Setup ADC range and coincidence resolving time
Fig. 2.13: Add a two-dimensional spectrum
Page 20
Installation Procedure
ComTec GmbH 2-11
Set the x-axis of the new spectrum to ADC1 with a range of 256 and the y-axis to ADC2 with also range 256. Type in a name for the spectrum, e.g. 'ADC 1 x ADC 2' like in Fig. 2.9 Click OK. In the Dualparameter and Calculated spectra window the new map appears (ref. Fig. 2.14).
Close Dualparameter and Calculated spectra and the MPANT display should show up with two single spectra (ADC1 and ADC2) and one multiparameter map (ref. Fig. 2.15).
Fig. 2.14: New spectrum defined
Page 21
Installation Procedure
ComTec GmbH 2-12
Connect input signals to the ADCs. In case of a pulser being the signal source split the pulser output to both ADCs since only pulses that reach ADC1 and ADC2 within a 10µs time window (the coincidence time) are counted. Actually in this case not coincident signals are also counted but in the map display they will show up on the base of x- and y-axis (zero) since the respective other ADC is read as a 'ZERO'.
Start data acquisition with the START button
. Depending on your signals spectra are shown.
End data acquisition by a click on STOP
.
Fig. 2.15: Two single and one multiparameter spectra display
Page 22
Installation Procedure
ComTec GmbH 2-13
2.5.3. Basic Usage of the RealTimeClock Option
To familiarize with the usage of the 48 bit RealTimeClock / Timer / Counter option a simple experiment is setup. The intention is to measure the arrival time of single ADC events relatively to a start (trigger) signal like it might be done in Time-of-Flight or similar experiments. To do so a variable delay is used to shift analog output pulses relatively to the TTL trigger pulse that on the other hand resets (reloads) the 48 bit counter via the AUX 1 input. Thus, in terms of TOF, the trigger signal acts as start and the ADC deadtime signal as stop input. The delay time is then measured with a resolution of 50ns and a time spectrum of the very ADC is accumulated.
First, ADC 1 is defined as a SINGLE mode ADC (ref. Fig. 2.17). Now the RTC / Timer / Counter is set to reload (restart) with the auxiliary input AUX 1 (ref. Fig. 2.18). The timer value capture command is derived from ADC 1 DEADTIME signal. And last but not least, time stamps must be inserted into the datastream to transfer the corresponding time and ADC data together. This is done automatically if you have the RTC option.
Take care that the AUX 1 interface is used as input (ouput disabled – ref. Fig. 2.18). Since the here used analog pulser triggers on the falling edge the AUX 1 input polarity is 'active Low' to reload the timer when the TTL signal is high and let the timer free run when it is low. Select 'AUX1 ' in the 'RTC Reset‘ box to reset the RTC.
To visualize the timing relationship a spectrum is defined that shows the arrival time on the x-axis, the adc pulse height on the y-axis and the countrate in z-direction (ref. Fig. 2.19). Also a one dimensional spectrum is defined (set ADC range to 1) to show just a time spectrum (projection onto the x-axis).
In Fig. 2.20 the resulting spectra can be seen. Watching the map display (window (4)) amplitude variations show up as vertical lines whereas delay time variations result in horizontal lines. Window (6) is the corresponding three-dimensional view, window (5) the pulse height analysis and (3) the time spectrum.
Fig. 2.16: Basic RTC Experiment
Page 23
Installation Procedure
ComTec GmbH 2-14
Fig. 2.17: ADC Coincidence Definition for RTC Experiment
Fig. 2.18: Auxiliary Connectors for RTC Experiment
Page 24
Installation Procedure
ComTec GmbH 2-15
Fig. 2.19: RTC Spectrum Definition
Fig. 2.20: Basic Time Spectra of a Single ADC
Page 25
Installation Procedure
ComTec GmbH 2-16
2.6. Installing more than one MPA4(T) modules
The software is able to operate up to three MPA4(T) modules with a single computer (if you need more, contact us and we will expand the software). Each may be connected either by one or two USB cables. When using only one USB line per MPA4 module, it is simple: just connect them at USB1, switch on the power, and install the driver when you are prompted. When starting the software, you will be asked to edit the MPA4.INI file as more than one MPA4 modules are found, and the notepad editor will be automatically started with MPA4.INI loaded. Edit the line "devices=1" accordingly and save the file.
That is all you have to do, next time when you start the software all modules will be found and can be operated.
Fig. 2.21: Editing MPA4.INI
Fig. 2.22: Testing and identifying three MPA4 modules
Page 26
Installation Procedure
ComTec GmbH 2-17
When connecting 2 USB cables to one or more MPA4 modules, it is more complicated. The software cannot automatically identify which USB2 and USB1 ports belong together. So it is recommended to use the built-in test pulser and set different signals for each module, for example a pulse train with 5 pulses for module A, 2 pulses for module B and three pulses for module C. The data are transfered via the USB2 line, so the pattern may be exchanged between different modules to what you expect. In this case exchange the corresponding cables connected at USB2 and restart the software, until you get a picture as shown in Fig.2.22.
To get a quick identification which physical MPA4 module belongs to a module shown in the software, you can use the "ID" button in the status window shown at the left beside the spectra in MPANT. The LED's at the front panel will blink and the internal serial number will be shown beside the ID button.
2.7. Models and Upgrade Options
The MPA4 has eight ADC interfaces, but not all may be useable. The size of the FIFO can be 1 GB or 2 GB. The number of useable ADC interfaces can be four or eight. The counters, up/down counters and Replay function may be active or not. See the following table showing available models and options that can be activated by a new licence key.
Model Description
MPA4-4 Multiparameter-4 system, 4 ADC interfaces, 1GB Fifo, USB interface, MPA-NT Softw.
MPA4-8 Multiparameter-4 system, 8 ADC interfaces, 1GB Fifo, USB interface, MPA-NT Softw
MPA4-+4ADC Option: 4 additional ADC interfaces for "-4" systems: converts to a "-8" system
MPA4-FIFO2 Option 1 GB Fifo extra (2 GB total)
MPA4RTC Real Time Clock for MPA4, 48 bits, 6.4 ns resolution
MPA4COUNT Octal Counter / Scaler option for MPA4 / MPA4T, 32 bit, 8 channels, 100 MHz
MPA4UP-DN Dual Up / DOWN option for MPA4 / MPA4T, requires MPA4COUNT
MPA4RPlay MPA4 / MPA4T Replay progr. for off-line reconstr. of spectra from listmode, internal
It is very easy to upgrade an MPA4 with these options. Buy a new Licence key and select in the start menu under Programs.. FAST ComTec MPA4.. the item “Upgrade MPA4 Licence”. The software starts and you will be asked to enter the new licence key. Just enter the new key and after restarting the software the new option will be available. In the “About” box of the server program the installed options are visible. The next table shows some additional options that include hardware or software.
Model Description
MPA4OV Option oven controlled oscillator for MPA4
MPA4AT Option atom controlled oscillator for MPA4
MPA4RPlayEx MPA4 / MPA4T Replay progr. for off-line reconstr. of spectra from listmode, Dongle
MPA4RPlay+Ex MPA4 / MPA4T Replay progr. for off-line reconstruction, Dongle + int.
MPA4DLL32 DLL for LabVIEW /"C"/ Visual Basic (32 and 64 bit) for the MPA4
MPA4LINUX LINUX driver for MPA4
MPA4-C1 TAG / Counter Cable, converts D-SUB to 18 separate BNC cables.
MPA4-C2 TAG / Counter Cable, converts D-SUB to 18 separate LEMO cables.
Page 27
Hardware Description
ComTec GmbH 3-1
3. Hardware Description
3.1. Overview
This section describes the MPA4 hardware. The MPA4 is similar to the MPA4T but has no TOF inputs.
The MPA4 is a USB 2.0 device with two high-speed USB 2.0 ports.
The MPA4 allows to acquire data from upto 8 external devices
5
like ADC's, multiscalers, position analyzers etc. that provide a standard NIM ADC interface. Furthermore a coincidence time window can reduce the acquired ADC data to specific coincident events only.
The acquired ADC data can be time stamped with a 6.4ns real time clock. Thus, timely developments of experimental behaviour can be easily analyzed.
Additionally eight 32 bit 100 MHz counters are provided that can be used for scaling, normalization or other purposes.
Furthermore a very versatile 8 bit digital I/O port allows for a whole bunch of experimental control, monitoring or whatsoever tasks. It can be easily setup to control external equipment like sample changers etc. or to detect external status information.
And there is the optional 2 GB large FIFO that extends the onboard storage capabilities.
The MPA4 contains many very high-speed logic circuits, which usually need large supply currents and thus, produce high thermal power loss. To dissipate this thermal energy the complete metal case is used for passive cooling. This improves reliability since no mechanically moving devices like fans are involved. The downside is that the case can get quite warm or even hot. Refer Fig.
3.2, which is taken in a standard laboratory environment with a MPA4T placed on a table and no other devices nearby. The crosses indicate local temperatures. The upper left cross shows the ambient temperature of 22.9°C. The middle left cross indicates 45.3°C. With increasing ambient temperature the maximum case temperature will increase as well. And also reduced airflow will
5
Referred to as ADC's or ADC data in the following
Fig. 3.1: MPA4 front panel
Page 28
Hardware Description
ComTec GmbH 3-2
result in higher case temperature. In the software a temperature monitor feature is provided that shows the internal FPGA and PCB temperatures.
WARNING:
The metal case can get very warm or even hot. Beware of burning yourself.
IMPORTANT NOTE:
Provide ample airflow around the device for proper cooling. Do not cover the case. Do not place it inside closed cabinets etc.
3.2. General Functionality
3.2.1. ‘GO’-Line
The ‘GO’ line is a system-wide open-drain wired-AND signal that can start and stop a measurement. This line is available on the FEATURE connector and on the specific BNC connector on the rear panel.
The ‘GO’ line may be enabled, disabled, set and reset by the software. The system-wide open­drain ‘GO’ line enables any connected device to enable and to stop all participating measurement equipment simultaneously. This allows for easy synchronization of electronic devices previously often not possible.
When watching of the ‘GO’ line is enabled for the MPA4, a low line voltage will halt the measurement. When output to the ‘GO’ line is enabled, starting a measurement (i.e. the MPA4 is armed) will release the ‘GO’ line (high impedance output) whereas a halt of the measurement will pull-down the ‘GO’ line to a low state. Since it is an open-drain output wired-AND connection with other devices is possible. Also refer Fig. 3.3.
The ‘GO’ line is available on most of the other FAST ComTec products as well.
Fig. 3.2: Thermal picture of the metal case
Page 29
Hardware Description
ComTec GmbH 3-3
3.2.2. FEATURE (Multi-) I/O Connector
A very versatile 8 bit digital I/O port is implemented on the 15-pin high-density female D-SUB connector. The pull-up and series resistors (ref. Fig. 3.3) of the digital I/O ports are socket mounted and thus, can be easily adapted to specific needs.
This I/O port is fully software controllable and each single (1-bit) port is individually configurable. Each individual port can be configured as input only (tri-stated output) or open-drain (pull-up) output with read back capability. Wired-OR/AND connections are also feasible.
It might be used for external alert signals, sample changer control, status inputs / outputs etc.
NOTE:
Please contact factory if changes to the resistors are needed.
Also on the FEATURE connector there is the TTL level SYNC_2 output.
3.2.3. 100MHz Counters
The MPA4T includes eight 32bit synchronous 100 MHz up-counters (2 counters provide an UP/DOWN option).
All inputs are TTL like and are terminated with 50 to ground. For each counter input the polarity is software selectable.
Please refer Fig. 3.5 for details of the control logic of the counters. Also refer "5.1.8 Scaler Settings Dialog".
Count action
The counters actually either count the software selected rising or falling COUNT input edges (counter mode) or work as 100MHz timers.
Fig. 3.3: Schematic of FEATURE I/O connector
Page 30
Hardware Description
ComTec GmbH 3-4
Carry Ouputs
Counters 1 and 2 provide a carry or terminal count output e.g. for cascading. The carry output signals are high as long as the counter value is 0xFFFFFFFF.
When using the carry outputs as count input to another counter you can cascade counters to build 64bit or 96bit deep counters.
The carry outputs are available in the ADC GATE connector (please refer Fig. 3.9 for details).
UP/DOWN counter option
Counters 3 and 4 provide an UP/DOWN input option (replacing the individual GATE) for change of counting direction. In this case the individual GATE inputs no longer work as GATE but as UP/DOWN inputs.
Preset
Each counter is presettable allowing to halt the experiment when a preset value is reached by pulling the GO-Line low.
If PRESET is enabled for an individual counter it will halt the experiment when it actually reaches 0xFFFFFFFF. The software handles the calculation such that in fact 0xFFFFFFF –
1 20 2 21 3 22 4 23 5 24 6 25 7 26 8 27 9 28 10 29 11 30 12 31 13 32 14 33 15 34 16 35 17 36 18 37 19
M1M2
DB37F-B
GND
GND
GND
COMMON_GATE
LOAD_IN
COUNT _ I N 1
GAT E 1
UP/DOWN_IN 3
UP/DOWN_IN 4
GAT E 2
GAT E 5
GAT E 6
GAT E 7
GAT E 8
COUNT _ I N 2
COUNT _ I N 3
COUNT _ I N 4
COUNT _ I N 5
COUNT _ I N 6
COUNT _ I N 7
COUNT _ I N 8
Fig. 3.4: Connector assignment for the 100MHz counters
Page 31
Hardware Description
ComTec GmbH 3-5
PRESET_VALUE is loaded into the counter allowing to count PRESET_VALUE counts until 0xFFFFFFFF is reached.
COMMON and individual GATE
A COMMON GATE input is provided as well as individual GATEs.
Usage of the GATEs is individually settable for each counter in the software.
LOAD input
An external LOAD input allows to reset the counters to their individual start (load) value by an external signal. Usage of the LOAD input is individually selectable for each counter.
The start values are software settable and will typically be either 0x00000000 or "0xFFFFFFF – PRESET_VALUE".
GO line
The system wide GO-Line may also control the counting action. This can be set individually for each counter.
Page 32
Hardware Description
ComTec GmbH 3-6
When the software reads the actual count value during a running measurement all values are simultanously transferred to readout registers. Thus, comparison of rates or values is easily feasible and accurate at any time.
3.2.4. Time Base / Reference Clock
To derive the outstanding temperature and long-term stability the MPA4(T) is equipped with an on-board ovenized crystal oscillator (OCXO). This OCXO stabilizes the 10 GHz PLL (phase locked loop) synthesizer that clocks the TOF sampling circuitry.
The reference is a 10 MHz clock. Either the internal (on-board) or an external reference is software selectable, see section 5.1.1. See in 8.2.3 for the signal impedance and amplitude. Optionally (software selectable) a 20, 40 or 80 MHz input clock maybe used as well.
For highest stability and accuracy Rubidium disciplined oscillators or GPS controlled clock generators are available.
D Q
Edge
Detect ion
Pulse Shape
&
COUNT_IN[ x]
TIMER_MODE[x]
GO_IN
WATCH_GO [ x ]
D Q
COMMON_GATE
GATE_ALL_POLARITY
GATE_ALL_ENABLE
COMMON_ GATE_USE[ x]
D Q
GATE[x]
GATE_POL ARITY[ x ]
GATE_ENABLE[ x]
COUNT_ ARM [ x ]
PRESET_REACHED[x ]
count [x ]
D Q
LOAD_IN
LOAD_POLARI TY
LOAD_ENABLE[ x]
SOFTWARE_LOAD[x]
load[ x]
D Q
UP/ DOWN_IN[y]
UP_POLARITY[y ]
UP_DN_ENABLE[y]
up/dow n[y]
shared b y all count ers
*
**
*
not avail able f or coun ters 2 & 3
*
**
x=1...8, y= 2...3
AAA = Internal Signals
BBB = Ex terna l Input s
Legend:
D Q
Fig. 3.5: 100MHz counters control logic
Page 33
Hardware Description
ComTec GmbH 3-7
3.3. Multiparameter Section
The multiparameter section provides the ability to connect upto 8 external ADC's, Multiscalers, Position Analyzers, Time-of-Flight units etc. with a DataReady / DataAccepted handshake.
3.3.1. ADC Port Connectors
All 8(4) ADC ports normally support upto 16 bit wide (64k channel) ADC's, TOF's etc.
But they provide the ability to be software configured for 32, 48 or 64 bit interfaces by using neighbouring ports. In that case the handshake (DRDY, DACC, DEADTIME etc.) is processed on the lowest ADC port connector only. The associated higher order ADC ports provide the higher order data bits only. E.g. if ADC port 1 is setup with 64 bit then data "bit 0" (LSB) corresponds to "ADC 1 / DATA[0]" and data "bit 63" corresponds to "ADC 4 / DATA[15].
All the corresponding signal polarities are software selectable.
Fig. 3.6: Simplified ADC port timing
Page 34
Hardware Description
ComTec GmbH 3-8
DATA 0…15 – Data inputs
DRDY – Data Ready input signal indicating that valid data is present
DACC – Data Accepted output signal indicating that the input data is registered
DEAD – Dead Time input signal
ENC – Enable Converter output signal to arm the connected device
DENB – Data Output Enable signal to enable tri-state output drivers
NOTE:
When using cables with all pins connected: unused input signals should be tied to a valid level with low impedance since open wires tend to act as an antenna and might disturb proper data acquisition.
The handshake in fact is quite easy. When DRDY is asserted by the external device the MPA4 registers the valid data and then asserts DACC unitl DRDY is removed. Then DACC is also removed.
Always 4 ADC ports in a row (1…4 and 5…8) share a queue for the data transfer to the FIFO. Thus, the response time of each interface may vary by the number of simultaneously firing ADC's (ref. chapter 8.3.2 "ADC port DRDY / DACC handshake").
3.3.2. Auxiliary / Reject I/O Connectors
3 BNC type connectors provide additional flexibility particularly in COINCIDENCE mode.
1 14 2 15 3 16 4 17 5 18 6 19 7 20 8 21 9 22 10 23 11 24 12 25 13
M1M2
DB25F-B
GND
GND
DATA 0
DATA 1
DATA 2
DATA 3
DATA 4
DATA 5
DATA 6
DATA 7
DATA 8
DATA 9
DATA 10
DATA 11
DATA 12
GND
DRDY
DACC
ENC
DEAD
DENB
DATA 13
DATA 14
DATA 15
Fig. 3.7: ADC Port connectors' pin assignment
Page 35
Hardware Description
ComTec GmbH 3-9
The AUX/REJECT inputs can be used for additional coincidence conditions (also refer the corresponding software chapters).
The AUX I/O's also provide some software selectable output signals (ref. chapter 5.1.7).
3.3.3. ADC GATE Inputs
Each ADC port has an individual GATE input associated and a Common GATE as well.
These allow to selectively switch data acquisition on and off during a running measurement.
3.3.4. 48Bit Realtime Clock
A 48 bit Real Time Clock with a resolution of 6.4ns allows to investigate the timely development of ADC events.
It provides the ability to tag any SINGLE or COINCIDENCE event with its corresponding arrival time.
The active going edge of DEAD is used for realtime capture.
IOBUF
AU X_ I O
GND
33
AUX
10k
+3.3V
AU X_ I N
AU X_ OU T
AU X_ OE
Fig. 3.8: AUX / REJECT I/O logic
1
9
2
10
3
11
4
12
5
13
6
14
7
15
8
M1M2
DB15HDF
GND
GND
GND
ADC _GAT E_I N 1
ADC_GATE_ALL
COUNT_CARRY_OUT 1 COUNT_CARRY_OUT 2
ADC _GAT E_I N 2 ADC _GAT E_I N 3 ADC _GAT E_I N 4 ADC _GAT E_I N 5 ADC _GAT E_I N 6 ADC _GAT E_I N 7 ADC _GAT E_I N 8
Fig. 3.9: ADC GATE input connector
Page 36
Functional Description
ComTec GmbH 4-1
4. Functional Description
4.1. Introduction
The MPA4 includes two major sections that will be described separately.
1) External ADC interfaces with MPA functionality
2) Additional 100MHz counters / scalers (option) and Digital I/O's
The measured ADC data is transferred into the computer in list-mode, i.e. as they are acquired per each input channel.
4.2. MPA Modes of Operation
There are two basic modes available with the external ADC interfaces: SINGLE and COINCIDENCE mode and any combination of them. Each interface may be simultaneously used in both modes.
For Livetime correction every 1ms the DEADTIME signals of each port are sampled and transferred to the PC.
4.2.1. SINGLE Mode
In SINGLE mode of operation each ADC data is simply transferred to the PC as it arrives.
The data maybe tagged with 32 bit of the Real Time Clock. Thus, the timely development of the events maybe analyzed.
And 9 least significant bits of the TOF sweep counter value maybe included which is important in the combined TOF and MPA mode of operation.
4.2.2. COINCIDENCE Mode
The basic purpose of introducing COINCIDENCE mode is to acquire only data that meets some predefined timing relationship.
Events that will be accumulated must occur inside the coincidence resolving time window. Thus, events that do not fall in this coincidence time window will be discarded and do not show up in the acquired histograms.
The versatility of the coincidence definitions in the MPA4 system allows to select various combinations of ADC events that either have to occur within the coincidence time window or where just some have to occur to accumulate them.
In COINCIDENCE mode of operation the active going edge (programmable rising or falling edge) of the ADC's DEADTIME signal is used as time-of-arrival of an ADC event. This is done because the DEADTIME signal usually is the most accurate time information obtainable from an ADC.
On detecting an active going edge of a DEADTIME signal a coincidence resolving time window is opened. While a coincidence window is open all arriving DEADTIME edges are stored. After the coincidence time has elapsed the system waits for all DRDY signals of the corresponding ADC ports (meaning that the port contains valid data) to become true. The maximum time to wait for this is software selectable (ref. DRDY timeout chapter 5.1.5). When all expected DRDYs have arrived - or at the latest when the DRDY timeout elapsed – the corresponding data is transfered to the PC in listmode. If a port has no new data (DRDY did not go active until the timeout occurred) a zero is transfered for this port.
Page 37
Functional Description
ComTec GmbH 4-2
The ADC ports that are allowed to open a coincidence time window are software selectable as well (ref. chapter 5.1.6). This enables for further data reduction.
In COINCIDENCE mode of operation the corresponding ADC ports accept new data only when a coincidence time window is open. This is usefull to reduce the system deadtime caused by not coincident or unwanted ADC events.
The corresponding timing signals as in Fig. 4.1 are available on the auxiliary IOs (ref. chapter
5.1.7).
The transferred concidence data block may also include the real time of the coincidence window being opened. And, the values of the 100MHz counter 1, 3 and 4 at that time may be included. And also the TOF sweep counter value which is important in the combined TOF and MPA mode.
4.3. FIFO Concept
In the MPA4 the START and STOP input channels are not present but the rest is identical as in the MPA4T which has the additional capability to measure 100ps time events in 5(6) channels.
A multi-stage FIFO concept is used to optimize for the two main difficulties of those data acquisition systems. On the one hand ultra high burst count rates (here 10 Gevents/s for the TOF section of the MPA4T) should be acceptable for a period of time as long as possible.
Fig. 4.1: Coincidence processing and timing
Page 38
Functional Description
ComTec GmbH 4-3
Since the maximum ADC data rate is comparably slow a smaller ADC event FIFO of 320 events is sufficient.
On the other hand a high average count rate must be stored without loss of events. The decoding and binary time coding of the raw data as buffered in the first FIFO stage is accomplished at a rate of over 33 MHz. Since the bandwidth of the USB 2.0 transmission is limited to something like 35 MB/s a large second FIFO is provided that is able to store a high number of data.
NOTE:
Since September 2015 a new Firmware v 14 can be downloaded from www.fastcomtec.com that uses 3 decoding machines parallel and increases the rate to fill the large FIFO from 33 MHz to 100 MHz !
The optional up to 2 GB large DDR2 FIFO is designed to be used in an optimized way depending on the number of bytes that is transferred for each single event. I.e. for 64 bit = 8 byte data words up to 2 GB / 8 = 256 Mevents can be buffered. The same is true for 48 bit = 6 byte words. For 32 bit = 4 byte data up to 512 Mevents, for 16 bit = 2 byte data up to 1 Gevents can be stored in a 2 GB DDR2 module.
Fig. 4.2: FIFO concept
Page 39
Software Description
ComTec GmbH 5-1
5. Software Description
The window of the MPA4 server program is shown here. It enables the full control of the MPA4 to perform measurements and save data. This program has no own spectra display, but it provides ­via a DLL (“dynamic link library“) - access to all functions, parameters and data. The server can be completely controlled from the MPANT software that provides all necessary graphic displays. The view of the server window depends on the number of active input channels, here all 8 ADC channels are active.
5.1. Server functions
To start the software, just double click a shortcut icon linking to the server program. The server program performs a test whether the hardware works well on this computer, then starts MPANT and gets iconized. Usually you will control everything from MPANT, but it is possible to work with the server alone and independently from MPANT.
5.1.1. Initialization files
At program start the configuration files MPA4.INI and MPA4A.SET are loaded.
Fig. 5.1: MPA4 Server Window
Page 40
Software Description
ComTec GmbH 5-2
Parameters that can be set by editing the MPA4.INI file are the update rate in msec for the refresh of the status, and it can be specified whether 2GB or 1GB RAM is built in. Set DDR_2GB=0 for 1GB.
Expanded ADC ports: set expandedports=1 if you have a device with more than 16 bits that you want to connect to combined ADC ports.
External clock: If you have a good external 10 MHz reference signal, for example a Rubidium or GPS clock, you can use it the following way:
Change the MPA4.INI file and insert a line
extclk=1
After power up always the internal clock is used, so you should not yet connect the external clock signal. Start the software. You will be prompted by a Messagebox to connect the external 10 MHz signal to the BNC connector labeled "10 MHz" at the back side. If you later exit and restart the software, let it connected. But after power down please disconnect it. When using the internal clock the same connector outputs the internal 10 MHz signal.
The ADC port handshake signal polarities are defined also in this file. Several standard ADC’s are already predefined and can be enabled simply by removing the semicolon at the beginning of the respective line. Lines starting with such a semicolon are just used as comments.
The file MPA4A.SET contains the default settings. It is not necessary to edit this file since it is saved automatically. Instead of this .SET file any other setup file can be used if its name without the appendix ‘A.SET’ is used as command line parameter (e.g. MPA4 TEST to load TESTA.SET).
Fig. 5.2: MPA4.ini File
Page 41
Software Description
ComTec GmbH 5-3
5.1.2. Action menu
The server program normally is shown as an icon in the taskbar. After clicking the icon it is opened to show the status window. Using the „Start“ menu item from the action menu a measurement can be started. In the status window every second the acquired events, the counting rate and the time are shown. Clicking the „Halt“ menu item the measurement is stopped and via „Continue“ proceeded.
5.1.3. File menu
Clicking in the File menu on the Data... item opens the Data Operations dialog box.
This dialog allows to edit the data format settings and perform operations like Save, Load, Add, Subtract, Smooth and Erase. The Radio Buttons MPA, Selected Spectra and New Spectra provide a choice between handling of the complete data set (MPA) or selected spectra, or to load new selected spectra for compare. Mark the checkbox Save at Halt to write a MPA file containing the configuration and all spectra at the stop of a measurement. The filename can be entered. If the checkbox auto incr. is crossed, a 3-digit number is appended to the filename that is automatically incremented with each saving. The format of the data can be ASCII (extension for separated spectra .ASC), binary (.DAT), CSV (.CSV). If Separate Header is not checked, the Header and data is saved together in a file with extension .MP, otherwise the file with extension .MP contains only the header and the data is written separately into a file with appropriate extension. The buttons Save, Load, and Erase perform the respective operation. With Add and Sub spectra can be added or subtracted from the present data. The checkbox calibr. can be checked to use a calibration and to shift the data then according to the calibration. The Smooth button performs an n-point smoothing of selected single spectra. The number of points to average can be set with the Pts edit field between 2 and 21. Check the Write Listfile checkbox to write a listfile during a run. No Histogramming prevents calculating any spectra to save computing time and concentrate the system on writing the listfile.
The menu item File – R
eplay... opens the Replay dialog. The Replay software is an option, the
licence is either programmed into the MPA4 module or you need an USB dongle.
Fig. 5.3: Data Operations dialog for MPA data (left) and selected spectra (right)
Page 42
Software Description
ComTec GmbH 5-4
Enable Replay Mode using the checkbox and specify a Filename of a list file (extension .LST) or search one by pressing Browse... With the radio buttons it is possible either to choose the complete list file by selecting All or a selected Time Range. Specify the range by editing the respective edit fields from: and Preset: . The Replay Speed can be specified in units of 100 kB per sec. To Use Modified Settings enable the corresponding checkbox; otherwise the original settings are used. To start Replay press then Start in the Action menu or the corresponding MPANT toolbar icon.
The menu item File – A
bout... opens the About MPA4 window where some information of the System can be found. Particularly the serial number is important for support purposes. This serial number is unique for each MPA4(T) system.
The MPANT menu item in the file menu starts the MPANT program if it is not running.
Fig. 5.4: Replay Settings dialog
Fig. 5.5: About MPA4 dialog box
Page 43
Software Description
ComTec GmbH 5-5
5.1.4. Setting dialogs
The Hardware... item in the Settings menu opens the MPA4 Settings dialog box. It contains several buttons that open special setting dialogs.
Via the Sync2 out - combo box you can specify the signal you want to observe. The Sync Out can deliver 10 MHz, 78.125 MHz, 100 MHz. The level can be logical inverted by checking the
invert checkbox. A List file can be written by checking the corresponding checkbox Write Listfile. The data format can be ASCII or binary depending on the format settings in the data
operations dialog.
By pressing the "Test, Inspect..." button a special dialog is opened that allows to inspect voltages and temperatures of the FPGA and the MPA4 board. Pressing the Read button can refresh that information.
Fig. 5.6: Settings overview
Fig. 5.7: Inspect MPA4 dialog
Page 44
Software Description
ComTec GmbH 5-6
5.1.5. ADC Settings dialog
Clicking in the Settings overview the ADC Settings... button opens the ADC Settings and Presets dialog box. Here parameters like presets, range parameters, coincidence time, etc. can be set.
If expanded ADC ports are enabled in the MPA4.INI file, additional controls for Port width and Binwidth appear as shown right in Fig. 5.8.
In the edit field Range the length of the spectrum can be chosen in binary steps. Set All sets the range for all ADCs, otherwise each ADC can be selected from the drop down list and changed seperately. If the checkbox ROIpreset is marked, the measurement will be stopped after acquiring more events than specified in the corresponding edit field. The events are counted only
if they are within the ROI
6
limits, i.e. >= the lower limit and < the upper limit. Another possibility is to acquire data for a given run time via the RTimepreset or a given live time via the LTimepreset. A measurement will be stopped if the corresponding checkbox is marked. The
width of the coincidence window can be set between 0.15 and 3276 µsec in steps of 50 nsec by entering the number or using the scroll bar. The Data Ready Timeout can be set within the same limits. It must be large enough to cover the ADC conversion time. OK takes all settings. Cancel cancels all changes. Pressing Save Settings writes all settings into the file MPA4A.SET resp. the entered setup name.
6
ROI: Region Of Interest
Fig. 5.8: ADC Settings and Presets dialog box, right: with expanded ports enabled
Page 45
Software Description
ComTec GmbH 5-7
5.1.6. Coincidence Definition dialog
Clicking in the MPA4 Settings dialog on ADC Coincidences... opens the Coincidence Definition dialog box. Here the several ADCs can be combined to be used either in single mode, i.e. without regarding any coincidence, to be not activated, or to use it in coincidence mode. The Button <<All removes all ADCs from the respective list above it. To insert an ADC into a list, first select it in the list where it is and then press the >> button below the list where you want to insert it. To change an ADC from single mode into coincidence mode, first deactivate it and then insert it into the list Coinc. with any. Any ADC inserted into that list by default has the ability to start a coincidence time window. If you want to disable it, uncheck the checkbox Start enable. An 'S' after an ADC name in the list indicates whether the Start of coincidence window is enabled or not. You can then define Dependent coincidence groups by inserting selected ADCs from the 'Coinc. with any' list into one of the four available groups. ADCs in one of the groups must all have data within the same coincidence window, otherwise the event is dropped. The same ADC may be in several groups, therefore it is possible either to move >> or copy >> it into a Dependent coincidence group. It is possible to use an ADC as well in Single as in Coincidence mode. In this case the histogram length will be twice the ADC range, in the lower half the single data is shown and in the upper half the coincidence data. In the Event Stamp box there are checkboxes to insert 32 or 48 timer bits, and scalers 1, 3 and 4 into coincidence event data. (Scalers 3 and 4 can be optionally up / down counters that could for example direclty indicate the x, y position controlled by two stepping motors.)
Click OK to accept all settings. Cancel cancels all changes. Clicking „Save Settings“ stores all settings in the file MPA4A.SET.
Fig. 5.9: Coincidence Definition dialog box
Page 46
Software Description
ComTec GmbH 5-8
5.1.7. Auxiliary Connectors dialog
The Aux conn... button opens the Auxiliary Connectors dialog to define the use of the auxiliary connectors. The AUX1 and AUX2 and also the REJ connector can be used either as an input or an output. In input mode AUX1 and either AUX2 or REJ can be used. Coincidence Mode must be checked to get it into the 'coinc. with any' list. Start Coincidence can be checked to allow starting a coincidence resolving time window from the input connector. The Polarity of the TTL signal can be set by checking or unchecking Pol. active HIGH (means rising edge). For use as an output, check Enable Output and choose any of the signals from the drop down list.
Available output signals are:
coinc_time active while a coincidence resolving time window is open
coinc_runs active while a coincidence resolving time window is open plus the Data
Ready Timeout
coinc_finish active during cleanup after coincidence handling
coinc_active total coincidence processing time
sweep_on sweep is active (MPA4T only)
sweep_start sweep start (MPA4T only)
dead_1 ADC 1 is busy
dead_2 ADC 2 is busy
... ...
dead_8 ADC 8 is busy
0LOW level
1HIGH level
Refer "Fig. 4.1: Coincidence processing and timing" for details on the coincidence timing signals.
The REJECT Input connector can be used similar to the AUX inputs. Check Coincidence Mode to have /REJ in the 'Coinc. with any' list. A signal to the Reject input then drops any coincidence
Fig. 5.10: Auxiliary Connectors dialog box
Page 47
Software Description
ComTec GmbH 5-9
event in the corresponding coincidence group, either Instantly or At End of Coincidence window. One of the three auxiliary connectors can be used as a trigger to reset the RTC, this is selected in the RTC Reset box.
Note: AUX1 can be used independently of the other auxiliary connectors in coincidence mode. AUX2 and REJ share the same coincidence entry, so only one of them can be used in coincidence mode.
5.1.8. Scaler Settings dialog
The Scaler Settings... button opens the respective dialog to define the use of the 8 100 MHz Scaler/Counters. This is an option, see chapter 3.2.3. A utility program mpa4scal.exe is started automatically and shows the scaler values, optionally as a ratemeter. The scalers can be individually named, the values are saved into the data file. For an exact synchronizing of start and stop of the scalers with the acquisition it is recommended to enable Count gated with GO and Remove GO when Preset reached. Furthermore, the three checkboxes concerning the GO-line in the system definition dialog should be crossed, see chapter 5.1.9.
Fig. 5.11: Scaler Settings dialog box
Page 48
Software Description
ComTec GmbH 5-10
5.1.9. System definition dialog
The „System...“ item in the settings menu opens the System Definition dialog box. The use of the Digital Input / Output and the GO-Line can be defined: It can be used either to show the status of the MCA if the checkbox Status Dig 0 (0..3 for more modules) is marked. At the respective pins +5 Volt are output if an acquisition is running and 0 V if not. The polarity can be inverted by checking Invert. Alternatively, it can be used for example with a sample changer by checking "Value inc. at Stop". Here, the 8-bit value entered in the edit field (a number between 0 and 255) is output at the Dig I/O port. This value will always be incremented by 1 if the MCS6 is stopped. The Invert checkbox allows inverting the logical level. See also the commands pulse and waitpin how to handshake a sample changer. The output mode of the Dig I/O ports is Open Drain.
It is also possible to use the digital input 4 as an external trigger for starting the system (DESY control line). If the corresponding checkbox is marked, a start command for the respective system will not immediately start the system. After the start command, the digital input will be permanently checked for its logical level. If the level changes from high to low, the data for the system is cleared and it will then be started. It will stop if the level returns to high (or vice versa if Invert is marked) and can again be restarted with the next level change. A stop command for the system will finish the digital input checking. By checking Clear before Start the spectra is cleared before the start. As an alternative to controlling Start/stop via digital input 4 also the GO-line can be used by checking GO High in the “Start with” box.
The Use of the GO-Line is controlled via the 3 checkboxes Watch, High when ON, and Low at Stop. The GO line gates directly the hardware. "Low at Stop" means that the GO line is immediately pulled down by the hardware when a sweep preset is reached, or as fast as possible by the software at any other stop.
Fig. 5.12: Left: MPA4-Scaler Status utility, right: as ratemeter
Page 49
Software Description
ComTec GmbH 5-11
If more than one MPA4(T) modules are used, the system definition dialog box comes up as shown in Fig. 5.14. Here the several units can be combined into a single system or different systems that can be started, stopped and erased by one command. A checkbox "Any Preset stops all" allows to automatically stop all modules combined in a system when in any individual MPA4(T) a preset is reached.
In the shown setting a single system is formed. The modules A, B and C are combined. System 1 can be started, stopped, erased, and continued with the respective commands in the Action 1 menu. It is also possible for example to form two independent systems 1 and 2: Click on the button labeled <<All below the list box „System1“ to remove all units from system 1. They are then shown in the „Not active“ list box. Then select unit A and click on the button labeled >> below the „System 1“ list box to include it into system 1 and perform the respective action for unit B and System 2.
Fig. 5.13: System Definition dialog box
Fig. 5.14: System Definition dialog box, three MPA4(T) modules
Page 50
Software Description
ComTec GmbH 5-12
OK accepts all settings. Cancel rejects all changes. Pressing „Save Settings“ stores all settings in the file MPA4A.SET using the control language (see the following section). This file is loaded at program start automatically and the parameters set.
The Remote... button opens the Remote control dialog box. Here all settings can be made for the control of the MPA4 server program via a serial port. If the Checkbox Use Remote Control is marked and the MPA4COM.DLL is available (i.e. you have bought the optional MPANT external Control software), the specified COM port will be used for accepting commands (see Control language). If Echo command is marked, the input line will be echoed after the newline character was sent. Echo character, on the other hand, immediately echoes each character.
5.1.10. Dual-parameter and Calculated spectra dialog
The MPA4 software allows to create dual-parameter and calculated spectra from coincident events arising from different channels. By clicking "Map Spectra..." in the Settings menu or the corresponding MPANT toolbar icon the Dualparameter and Calculated Spectra dialog box of the MPA4 server is called. Here additional dual parameter and calculated spectra can be added, modified and deleted from the list.
Fig. 5.15: Remote control dialog
Page 51
Software Description
ComTec GmbH 5-13
Press Add Multi to define a new multi parameter spectra in the Multi Display Settings dialog. ADC’s must be used in coincidence mode.
For the x Axis and y Axis a Parameter and Range must be chosen from the respective drop down list. You can edit a Name of the new multi spectra, or you can left the 'Name' edit field untouched to choose an automatically generated name like a_1 x a_2. If Conditions are defined, one can be selected as a necessary Condition for incrementing a channel in this dual-parameter spectra. For zoomed Maps check the x Offset and y Offset checkbox and enter a value for the respective Offsets and Compression. The Offset point marks the lower left corner of the zoomed
Fig. 5.16: Dualparameter and Calculated spectra dialog box
Fig. 5.17: Multi Display Setting
Page 52
Software Description
ComTec GmbH 5-14
map, and the Compr. by 2^n means the power of two by which the spectra are compressed. A value of zero means full resolution.
Press Add Time to define a new Time spectra in the Multi Time Display Settings dialog.
For the x Axis and y Axis a parameter and range must be chosen from the respective drop down list. The time axis can be either the x Axis or the y Axis, select the respective radio button. The time parameter can be either the 1 msec Real time from the standard real / live timer or the 6.4 nsec RTC clock when the respective option is available. Define the Time Offset and Time Bin size in the corresponding edit fields and Unit selection boxes. A Name can be entered for the new time spectra, or you can left the 'Name' edit field untouched to choose an automatically generated name like RTC x a_1. The checkbox Time Differences enables using an absolute time for each event while recording time spectra relative to an event in any selected ADC. If Conditions are defined, one can be selected as a necessary Condition for incrementing a channel in this spectra. For zoomed Maps check the x Offset or y Offset checkbox and enter a value for the respective Offsets and Compression. The Offset point marks the lower left corner of the zoomed map, and the Compr. by 2^n means the power of two by which the spectra are compressed. A value of zero means full resolution. For a one-dimensional time spectrum just use 1 for the ADC range.
Press Add Calc from the Map and Calculated Spectra dialog to define a new calculated single spectrum in the Calculated Spectrum Setting dialog.
Fig. 5.18: Multi Time Display Setting
Page 53
Software Description
ComTec GmbH 5-15
You have a choice between several formulas to combine two parameters: Sum = left + right makes a sum spectrum, and Diff = Range + left - right can be used to subtract two spectra. The Range and Name can be defined in the edit fields or default values will be taken. Any such calculated spectrum can be used as a parameter for a new dual parameter spectrum. If Conditions are defined, one can be selected as a necessary Condition for incrementing a channel in this spectra. The COPY type of spectra allows to set conditions for copies of primary spectra. Of course this "copy" can be quite different from the primary spectra, as only the first stop event after the time threshold is selected. For ADC inputs in addition the Pos = Range * right / (left + right) formula is available, that is often used for position dependent detectors read out from both sides, and the Division formula Div = Range * left / right can be used to divide two spectra. The Range and Name can be defined in the edit fields or default values will be taken. Any such calculated spectrum can be used as a parameter for a multi parameter spectrum. If Conditions are defined, one can be selected as a necessary Condition for incrementing a channel in this spectra. The COPY type of spectra allows to set conditions for copies of primary ADC spectra. HISTORY allows to display a history plot of an ADC as a new spectra, i.e. you can see the data of the ADC as they come in versus the event number. The length of the history plot can be defined free, just edit the Range number.
Spectra containing the sum of counts from several ADC's can be used to create a "superdetector" from multiple smaller detectors. It doesn't matter if the ADC's are used in single or coincidence mode, the sum spectra is calculated from the complete single spectra. Select the "Or = Sum of
counts" radio button.
Fig. 5.19: Calculated Spectrum Setting
Page 54
Software Description
ComTec GmbH 5-16
In the "Sum of counts" dialog you can select which ADCs will contribute to the superdetector. It is recommended to enable "Use Calibration" and to perform a careful calibration of all selected ADC's:
Make a short acquisition using a pulser or a calibration source so you get a peak in each used ADC. In each ADC zoom into the spectra, then by keeping the right mouse button pressed drag from left to right over the peak to mark a fit region and click on the "Fit" toolbar icon to make a Gaussian peak fit. Note the position value of the peak in the first ADC. For the first ADC you can just enable "Use Calibration" in the calibration dialog and use the standard parameters p0=0, p1=1. In the next ADC enter two calibration points: for the first point enter 0 for the Channel and 0 for the value and click "Add>>". For the second calibration point use the result of the fit: Click "Fit" to enter the Channel value of the fitted peak position. For the "Value" enter the fit result of the peak position in the first ADC. Click "Calibrate" and enable "Use Calibration", then click "OK". Proceed this way until all used ADCs are calibrated. You will immediately get the effect: Instead of a peak multiplet you will see a single sharp peak in the sum spectra.
Fig. 5.20: Sum of Counts Dialog
Fig. 5.21: Sum of counts spectra before and after calibration
Page 55
Software Description
ComTec GmbH 5-17
The automatic generated spectra name is for example "OR_3_C". The 3 is here an hexadecimal bit pattern indicating that ADC1 (bit 0) and ADC2 (bit 1) contribute to the OR sum. The C at the end of the name means that "Use Calibration" is enabled.
Press Conditions... from the "Dualparameter and Calculated Spectra" dialog to define or edit ROI Conditions in the Conditions dialog.
To define a new condition, press Add... to open the ROI Condition dialog.
Here it is possible to define a Condition as an event inside or outside of an ROI in any parameter spectra i.e. a calculated parameter or a "copy" of a primary spectra. There are two drop-down list boxes for the Parameter and ROI. Of course the ROI must be defined before by using the MPANT program, it is not possible here to add any new ROI. A checkbox labeled NOT in ROI allows to define a condition as an event outside the ROI. Using the edit field Name it is possible to define a name for the Condition. A default name built by the parameter name and ROI number will be set automatically.
Press Combine... to open the Combine Conditions dialog.
Fig. 5.22: Conditions
Fig. 5.23: ROI Conditions dialog
Page 56
Software Description
ComTec GmbH 5-18
Here it is possible to define a Condition as a combination using the Boolean operators NOT, OR or AND of already defined conditions. The OR will be symbolized in the automatically generated name by a plus sign "+", the AND by an asterisk "*".
Fig. 5.24 shows an acquisition with calculated spectra using the built-in test pulser of the MPA4T. The settings could be used as an example for a two-dimensional position dependent detector.
Fig. 5.24: Combine Conditions dialog
Fig. 5.25: Test acquisition with calculated spectra
Page 57
Software Description
ComTec GmbH 5-19
5.1.11. Dual-parameter spectra with a scaler parameter
If the scaler option is installed, it is possible to have scaler data of scalers 1, 3 and 4 in the event stamp, see chapter 5.1.6. If such scaler data and ADCs in coincidence mode are are enabled, it is also possible to create dualparameter spectra of an ADC versus a scaler parameter. The dialog for creating dualparameter spectra contains then a button labeled “Add Scaler...”, see Fig. 5.26.
There is a choice of Scalers S1, S3, S4, and S3xS4 as scaler parameters. Especially interesting is selecting S3xS4, if for these scalers the Up/Down counting option is enabled. “S3xS4” means actually that the x-parameter is calculated as S3 + S4 * Sx-range. S3 and S4 could be connected to counters that are incremented or decremented if the x- or y-coordinate of a beam position on a target is moved. So it is then possible together with setting conditions on peaks in the ADC spectrum to create images of element distributions on a target, using PIXE or similar methods. In the dialog the image dimensions can be chosen as Sx range and Sy range. Press Apply to make changes actual. The default beam position can be defined with Sx Offset and Sy Offset.
Fig. 5.26: Creating a dualparameter Scaler spectrum
Page 58
Software Description
ComTec GmbH 5-20
5.1.12. File formats
The .mpa format is used to save all spectra in a single file. It starts with an ASCII header containing the settings and then the spectra follow one after the other, each proceeded with a header line like
[TDAT0,4096]
(This means the first single spectra with a length of 4096 channels.)
[TDAT1,4096]
(This means the second single spectra...)
[CDAT0,16384]
(This is the first dual parameter or calculated spectra with a length of 16384 channels. The enumeration starts again at zero after all "physical" spectra.)
The format of the data itself can be ASCII, binary, or CSV (see below). Individual spectra can also be saved into single files. If "separate header" is checked in the data operations dialog, such spectra data is written into two separate files, one with extension .mp containing configuration data and one containing pure spectra data with an extension indicating the chosen format. The .mp file contains the settings in ASCII format using the control language described in section 5.2
Spectra data files with extension .asc contain in each line one decimal number in ASCII containing the corresponding count value in the histogram.
Binary data files with extension .dat are written with 4 bytes per data value, as usual in the Intel world in reverse order i.e. the least significant byte comes first.
Another ASCII file format is the x y format with extension .csv. It can be read for example with Excel and contains the channel number and content as two decimal numbers in ASCII per line separated by a TAB character.
List files have the extension .lst and start with a header containing the usual report and configuration data in ASCII as in the .mpa or .mp files. The header ends with a line containing [DATA]. Immediately before the [DATA] label there is a line time_patch= and some comment lines that describe the data length and the meaning of the data bits.
Then follows the data, depending on the format chosen for the data file either in ASCII or binary. In ASCII format one data word is written in hex format per line. In binary format each stop event is written with 2, 4, 6 or 8 bytes as specified in the comment lines. As usual in the Intel world in the reverse order, i.e. the least significant byte comes first.
Page 59
Software Description
ComTec GmbH 5-21
The following table shows the possible data formats for TDC list data characterized by the time_patch parameter, together with the maximum possible sweep length. Bit 0..3 contain for all data formats the channel number 1..6, where 6 means the start channel. Bit 3 is the edge information, 1 means falling edge. In some combinations a "Data lost" bit provides information if the fast FIFO was full (relevant only for MPA4T).
Time_patch value (hex)
Data length
Data lost bit
Tag bits Sweep counter Time
bits
Max. sweep length
0 2 bytes - - - 12 0.4096 µs
5 4 bytes - - 8 (Bit[24:31] =
Sweeps[0:7])
20 0.105 ms
1 4 bytes - - - 28 0.027 s
1a 6 bytes - - 16 (Bit[32:47] =
Sweeps[0:15])
28 0.027 s
2a 6 bytes - 8 (Bit[40:47] = Tag[0:7] 8 (Bit[32:39] =
Sweeps[0:7])
28 0.027 s
22 6 bytes - 8 (Bit[40:47] = Tag[0:7] - 36 6.872 s
32 6 bytes 1 (Bit[47]) - 7 (Bit[40:46] =
Sweeps[0:6])
36 6.872 s
2 6 bytes - - - 44 1759.2 s = 0.49 h
5b 8 byte 1 (Bit[63]) 15 (Bit[48:62] =
Tag[0:14])
16 (Bit[32:47] = Sweeps[0:15])
28 0.027 s
Db 8 byte - 16 (Bit[48:63] =
Tag[0:15])
16 (Bit[32:47] = Sweeps[0:15])
28 0.027 s
f3 8 byte 1 (Bit[47]) 16 (Bit[48:63] =
Tag[0:15])
7 (Bit[40:46] = Sweeps[0:6])
36 6.872 s
43 8 byte 1 (Bit[63]) 15 (Bit[48:62] =
Tag[0:14])
- 44 1759.2 s = 0.49 h
c3 8 byte - 16 (Bit[48:63] =
Tag[0:15])
- 44 1759.2 s = 0.49 h
3 8 byte 1 (Bit[63]) 5 (Bit[58:62] = Tag[0:4]) - 54 500.4h = 20.85 d
If ADCs are enabled, only 8 byte data length or multiples of 8 byte for coincidence data are possible. In the table for TDC list data only the last 6 rows can then occur. Bit 0..2 of an 8 byte data word signals if it is TDC data, then it is the channel number 1..6, if it is a timer event, then it is zero, or ADC data, then it is seven.
A timer event is inserted every millisecond, if ADCs are enabled. Bit 0..3 is 1000 for a timer event. Bit 4 signals a counter preset reached, bit 5 signals armed TOF logic, bit 6 signals an active TOF sweep, bit 7 signals real time preset reached. Bits 8..15 signal if ADC1..8 are busy (corresponding bit is zero) or not. So the number of timer events with corresponding ADC busy bits of 0 gives the live time of the ADC. By comparing it with the real time, that is the number of timer events, the dead time is calculated and displayed in the software. Bits 16..31 are the lowest 16 bits of the sweep counter, bits 32..63 is the counter 1.
A 64-bit single ADC data word has the bit pattern 111 in the three lowest bits, the ADC number
0..7 in bits 3..5, and a zero in bit 6. Bits 6..15 are the lowest 9 bits of the sweep counter. Bits
16..31 is the 16 bit ADC data. Bits 32..63 is the time of the ADC single event in units of 6.4 ns.
Page 60
Software Description
ComTec GmbH 5-22
Coincidence ADC data start with a 16 bit word defining the structure and length of the data belonging to a coincidence event. It has again the bit pattern 111 in bits 0..2. In bit 3 and bit 4 is marked if AUX1 and AUX2 had a signal, bit 5 is zero, bit 6 is 1 (this is the unique difference to a single ADC event), bit 7 is 0. Bits 8..15 indicate if the corresponding ADC1..8 had valid data within the coincidence time window. Then follow for each respective ADC 16 bit data words, then eventually a 32 or 48 bit time stamp for the coincidence event, 16 or 48 bit sweep counter, and scaler data of counters 1..3, as defined in the coincidence settings dialog. The event data is filled with dummy words to hold the boundary of multiples of 8 bytes.
The data structure is documented as a comment in each list file, an example for single ADC data in a listfile is shown here:
time_patch=5b ;datalength=8 bytes ; bit0..2: 0 == 1ms timer event, 7 == ADC event ; 1ms timer: bit0..3 == 0x8 ; bit4 = count preset reached ; bit5 = ARMED ; bit6 = SYSON ; bit7 = timer preset reached ; bit8..15: 0 == ADC busy ; bit16..31 == sweep(16 bit) ; bit32..63 == counter_1(32 bit) ; single ADC: bit6 = 0 ; bit3..5 == ADC# ; bit7..15 sweep(9 bits) ; bit16..31: data ; bit32..63: time ; coinc ADC: bit6 = 1 ; bit3..4 == (AUX2,AUX1) ; bit8..15: ADC# ; following 16bit ADC data ; then up to 3 16bit dummy words to fill up 8 bytes [DATA] 000000000000fc28 00000e4815b90007 00000e4715a7000f 00004b5715b40007 00004b5515a5000f 0000886015b60007 0000885f15a8000f 0000c56d15b80007 0000c56c15a6000f 0001027935be0007 0001027715a9000f 00013f8415b80007 00013f8315a5000f 00017c8f15b90007 00017c8e15a6000f 0001b99d15ba0007 0001b99c15a8000f 0001f6a615b80007 0001f6a415a6000f 000233b115b90007 000233b015a6000f 000000000000fc28
Page 61
Software Description
ComTec GmbH 5-23
5.2. Control Language
A sequence of commands that are stored in a file with extension .CTL can be executed by the MPA4 server program or MPANT with the „Load “ command. Also the configuration files MPA4A.SET or the header files with extension .MP contain such commands to set the parameters. Each command starts at the beginning of a new line with a typical keyword, the case is ignored. Any other characters in a line may contain a value or a comment.
Following methods are available to execute commands:
Load the command file using the Load command in the file menu.
Enable remote mode in the server and send commands via the serial connection. A special
DLL is necessary which is part of the optional available MPANT EXTERNAL CONTROL software.
Open a DDE connection and send the commands via DDE as described in section 5.3. The
application name for opening the DDE connection with the standard MPA4T server program MPA4.EXE is MPA4, the topic is MPA4-. Implemented are the DDE Execute to perform any command, and the DDE Request with items RANGE and DATA.
Send the commands over a TCP/IP net using a remote shell and the optional available
MPANT EXTERNAL CONTROL software. It is necessary to have a TCP/IP Winsock installed and that the remote shell daemon program MPA4NET is running. See the readme file on the installation disk.
Send the commands via the DLL interface from LabVIEW, a Visual Basic program or any
other application (software including the complete source code of the DLL and examples optional available).
From your own Windows application, register a Windows message and then send the
command as can be seen in the DLL source code.
The file MPA4A.SET contains a complete list of commands for setting parameters. An example is:
range=8192 ; Spectrum length
fstchan=0 ; sets acquisition delay = number of first bin / 64
holdafter=0 ; sets hold after sweep in units of 64 basic dwelltimes
sweepmode=ffdeb080 ; (hex) sweepmode & 0xF: 0 = normal, 4=sequential
; 1=differential (relative to first stop in sweep) ; 5=seq.+diff (Ch1), bit0 = differential mode ; 9=differential to stop in Ch2, bit3 = Ch2 ref (diff.mode) ; 0xD = seq.+diff (Ch2) ; bit 4: Softw. Start ; bit 6: Endless ; bit 7: Start event generation ; bit 8: Enable Tag bits ; bit 9: start with rising edge ; bit 11: pulse width mode for any spectra with ; both edges enabled ; bit 12: abandon Sweepcounter in Data ; bit 13: "one-hot" mode with tagbits ; bit 14: ch6 ref (diff.mode) ; bit 15: enable ch6 input ; bit 16..bit 20 ~(input channel enable)
swpreset=1000 ; Sweep-Preset value
Page 62
Software Description
ComTec GmbH 5-24
pr_ena=0 ; Presets enabled (hex)
; bit 0: realtime preset enabled ; bit 2: sweep preset enabled ; bit 3: ROI1 preset enabled ; bit 4: Starts preset enabled ; bit 5: ROI2 preset enabled ; bit 6: ROI3 preset enabled ; bit 7: ROI4 preset enabled ; bit 8: ROI5 preset enabled ; bit 9: ROI6 preset enabled
syncout=0 ; sync out (hex): bit 0..5 NIM sync out, bit 8..13 TTL sync out
; bit7: NIM syncout_invert, bit15: TTL syncout_invert
fdac=0 ; (hex) feature dac 0..16383 --> 0..2.5V
rxdelay=0 ; (hex) additional delay to all 6 TOF inputs in steps of 3.2 ns, 0..15
cycles=1 ; cycles for sequential mode
sequences=1 ; for sequential mode (default 1)
; specifies how often to repeat ; after performing cycles acquisitions
tagbits=8 ; number of tagbits
dac0=2664 ; (hex) dac0 value (START)
; bit 16: Start with rising edge ; (bit 14,15) : 0=falling, 1=rising, 2=both, 3=both+CFT
dac1=2664 ; (hex) dac1 value (STOP1)
; (bit 14,15) : 0=falling, 1=rising, 2=both, 3=both+CFT
dac2=2664 ; (hex) dac2 value (STOP2)
dac3=2664 ; ..
dac4=2664
dac5=2664 ;..(STOP5)
bitshift=0 , Binwidth (0: 1, 1:2, 2:4, 3:8,...)
timepreset=50 ; Timepreset (seconds)
digio=0 ; Use of Digital I/O (hex):
; bit 0: DIG I/O bit 7 output status ; bit 1: Output digval and increment digval after stop ; bit 2: Invert Polarity ; bit 4: Input pin 4 Trigger System 1 ; bit 8: GOWATCH ; bit 9: GO High at Start ; bit 10: GO Low at Stop ; bit 11: Clear before external triggered start ; bit 12: Only triggered start
digval=0 ; 0..255 DIG I/O Output value
sen=0 ; Start coincidence window enable word (hex).
; Bit 0 means Start enable for ADC1, Bit 1 for ADC2...
coi=0 ; Coincidence enable word (hex).
; Bit 0 means Coinc. Enable for ADC1...
sct=3 ; Single Control regster.
; 1 in Bit 0 Enable 32 bit TOF time storage with each single event ; 1 in Bit 1 Enable 9 bit Sweep counter storage with each single event
Page 63
Software Description
ComTec GmbH 5-25
ctm2=200 ; Coincidence time in units of 20 nsec.
; A value of 200 means 4 mikrosec
dtm2=400 ; Data Ready timeout in units of 20 nsec.
aux1=0 ; Aux1 Control
; Bit 0: AUX1 polarity, 1=active high ; Bit 1: AUX1 enable to start a coincidence window ; Bit 2: AUX1 coinc. mode like a Dead time signal ; Bit 3: AUX1 output enable ; Bit 4..7: AUX1 output: ; 0 = coinc_start ; 1 = coinc_runs ; 2 = coinc_ok ; 3 = coinc_not_ok ; 4 = system_on ; 5 = sweep_start ; 6 = dead_1 ; 7 = dead_2 ; 8 = dead_3 ; 9 = dead_4 ; A = dead_5 ; B = dead_6 ; C = dead_7 ; D = dead_8
aux2=0 ; Aux2 Control, see AUX1..
rej=0 ; REJ control
; Bit 0: REJ polarity, 1=active high ; Bit 1: REJ enable like a Dead time signal ; (ORed with AUX2 coinc mode) ; Bit 2: REJ mode 0=instant, 1=at end of coinc.time ; (Bit 7, Bit6): Clear RTC Timer: 0=not used, 1=AUX1, 2=AUX2, 3=REJ
stamp=0 ; timer / sweepcnt / scaler stamp in coincidence data set
; bit 0: TIM_0 lowest 16 bit of timer ; bit 1: TIM_1 bits 16-31, high word of timer ; bit 2: TIM_2 bits 32-47 ; bit 3: SWP_0 16 bit sweep counter in data stream ; bit 4: SWP_1 32 bit ; bit 5: CNT_1 32 bit scalers in data stream ; bit 6: CNT_2 32 bit ; bit 7: CNT_3 32 bit
gate=0 ; bit0..7: individual gate enable, bit 8..15 polarity, 1 = ANTICOINC
commongate=0 ; bit0..7: common gate enable, bit 8 polarity, 1 = ANTICOINC
aux1sys=0 ; System definition words for AUX1
; active & 0xFF ==0 not used ; ==2 coinc with any ; bit 4..7 in group 1..4
aux2sys=0 ; System definition words for AUX2
rtpreset=20.000 ; realtime preset in seconds, using 1 ms timer
autoinc=0 ; 1=Enable Auto increment of filename
savedata=0 ; 1=Save at Halt
mpafmt=dat ; data format used in MPA files
; (dat=binary, asc=ASCII, csv=CSV, spe=GANAAS, emsa=EMSA)
Page 64
Software Description
ComTec GmbH 5-26
sephead=0 ; 1=Seperated Header file (extension MP) and
; Data file (extension dat, asc or spe) for separated spectra
fmt=dat ; data format used in separated spectra (extension MP)
; (dat=binary, asc=ASCII, csv=CSV, spe=GANAAS, emsa=EMSA)
mpacaluse=0 ; 1 if calibration should be used for shifted summing data from a file
smoothpts=5 ; Number of points to average for a smooth operation
wndwidth=237 ; Sets width of server window
wndheight=263 ; Sets height of server window
sysdef=0 ; Defines which module belongs to a system, relevant only for more
; modules
[CHN1] ; The following section concerns parameters of CHN1 (= STOP1)
range=8192 ; Spectrum length
active=1 ; System definition word for ADCs and spectra (hex):
; active & 0xFF ==0 not used ; ==1 single, System 1
cftfak=12c0100 ; CFT parameter in hex:
; Low Word: 256 * time_after_peak / time_to_peak ; High Word: Max. Width
evpreset=10000 ; ROI preset value
roimin=1 ; Lower ROI limit
roimax=8192 ; Higher ROI limit
caluse=0 ; bit 0=1: Use calibration, higher bits: calibration formula
calch0=0.00 ; First calibration point channel
calvl0=0.000000 ; First calibration point value
calch1=100.00 ; Second calibration point channel
calvl1=100.000000 ; Second calibration point value
caloff=0.000000 ; Calibration parameter: Offset
calfact=1.000000 ; Calibration parameter: Factor
calunit=keV ; Calibration unit
[CHN2] ; The following section concerns parameters of CHN2 (= STOP2)
...
[ADC1] ; The following section concerns parameters of ADC1
range=8192 ; Spectrum length
active=1 ; Definition word for ADCs
; active & 0xFF ==0 not used ; ==1 single ; ==2 coinc with any ; bit 4..7 in group 1..4
; Definition words for calculated spectra: ; active & 0xF ==3 MAP, ((x-xoffs)>>xsh) x ((y-yoffs)>>ysh) ; ==0xB TIM, MAP with RTC or RT as x or y ; ((x-xoffs)>>xsh) x ((y-timeoffs)>>timesh) ; or((x-timeoffs)>>timesh x ((y-yoffs)>>ysh) ; bit4==1: x zoomed MAP
Page 65
Software Description
ComTec GmbH 5-27
; bit5==1; y zoomed MAP ; ==4 POS, (y<<xsh) /(x + y) ; ==5 SUM, (x + y) ; ==6 DIV, (x<<xsh) / y ; ==7 ANY, (for compare) ; ==8 COPY, x ; ==9 DLL, fDLL(x,y,z) ; ==0xA HISTORY, x ; ==0xC DIFF, (x+range-1-y)>>xsh ; bit 8..11 xsh, bit 12..15 ysh or bit 8..15 xsh ; ==0xF OR, Sum of counts; ; LOWORD(param) is the mask for spectra to sum up, ; param & 0x80000 use calibration ; HIWORD(active) = 1+condition no. (0=no condition)
prena=0 ; bit0=1: Livetime preset enabled
; bit1=1: ROI preset enabled
ltpreset=1000.000 ; Livetime preset value
roipreset=10000 ; ROI preset value
roimin=0 ; Lower ROI limit
roimax=8192 ; Higher ROI limit
[ADC2] ; The following section concerns parameters of ADC2
The following commands perform actions and therefore usually are not included in the MPA4A.SET file:
start ; Clears the data and starts a new acquisition of system 1.
; Further execution of the .CTL file is suspended until any ; acquisition stops due to a preset.
halt ; Stops acquisition of system 1 if one is running.
cont ; Continues acquisition of system 1. If a time preset
; is already reached, the time preset is prolongated ; by the value which was valid when the „start„ command ; was executed. Further execution of the .CTL file ; is suspended (see start).
erase ; Clears all spectra of system 1.
savecnf ; Writes the settings into MCS6A.SET
savempa ; Saves all configuration and spectra data.
; An existing file is overwritten.
pushname ; pushes the actual mpa filename on an internal stack that can
; hold 4 names.
popname ; pops the last mpa filename from the internal stack.
loadmpa ; Loads mpa data; the filename
; must be specified before with a command mpaname=...
addmpa ; Adds mpa data to actual spectra; the filename
; must be specified before with a command mpaname=...
submpa ; Subtracts mpa data from actual spectra; the filename
; must be specified before with a command mpaname=...
MC_A ; Sets actual input channel to MC_A (STOP1) for the rest of
; the control file.
Page 66
Software Description
ComTec GmbH 5-28
MC_B ... MC_F ; Sets actual multichannel analyzer to MC_B (STOP2)
; ... MC_F (ch6) for the rest of the control file.
savedat ; Saves data of actual channel as separated
; spectrum (extension .MP) An existing file ; is overwritten.
loaddat ; Loads data of actual channel, the filename
; must be specified before with a command datname=...
adddat ; Adds data into actual spectra; the filename
; must be specified before with a command datname=...
subdat ; Subtracts data from actual spectra channel; the filename
; must be specified before with a command datname=...
smooth ; Smoothes the data in actual spectra
erasedat ; Clears the data of actual spectra.
exit ; Exits the server (and MPANT) programs
alert Message ; Displays a Messagebox containing Message and an OK
; button that must be pressed before execution can continue.
waitinfo 5000 Message; Displays a Messagebox containing Message, an OK
; and an END button. After the specified time (5000 msec) ; the Messagebox vanishes and execution continues. OK ; continues immediately, END escapes execution.
beep * ; Makes a beep. The character '*' may be replaced with '?', '!' or
; left empty. The corresponding sound is defined in the WIN.INI ; file in the [sounds] section.
delay 4000 ; Waits specified time (4000 msec = 4 sec).
pulse 100 ; Outputs a pulse of 100 ms duration at dig 3.
waitpin 4000 ; Waits 4000 ms for going the level at dig 5 going low.
; After a timeout a Messagebox warns and waits for pressing OK ; Can be used for connecting a sample changer.
loadcnf configfile ; Loads a configuration stored in a configfile like mcs6a.set.
run controlfile ; Runs a sequence of commands stored in controlfile. This
; command cannot be nested, i.e. it is not possible to execute ; a run command from the controlfile called with a run command, ; only if it was called with a load command.
onstart command ; The command is executed always after a start action when the
; acquisition is already running. The command can be any valid ; command, also 'run controlfile' is possible.
onstart off ; Switches off the 'onstart' feature. Also a manual Stop command
; switches it off.
onstop command ; The command is executed always after a stop caused by a
; preset reached or trigger. This can be used to program measure ; cycles. For example the command 'onstop start' makes a ; loop of this kind.
onstop off ; Switches off the 'onstop' feature. Also a manual Stop command
; switches it off.
lastrun=5 ; Defines the file count for the last run in a measure cycle. After a
; file with this count or greater was saved with autoinc on, instead ; of the 'onstop command' the 'onlast command' is executed.
Page 67
Software Description
ComTec GmbH 5-29
numruns=5 ; Defines the file count for the last run in a measure cycle. The
; last count is the present one plus the numruns number. After a ; file with this count was saved with autoinc on, instead of the ; 'onstop command' the 'onlast command' is executed.
onlast command ; The command is executed after a stop caused by a preset
; reached or trigger instead of the 'onstop command', when the ; last file count is reached with autoinc on. This can be used to ; finish programmed measure cycles.
onlast off ; Switches off the 'onlast' feature. Also a manual Stop command
; switches it off.
exec program ; Executes a Windows program or .PIF file.
; Example: exec notepad test.ctl ; opens the notepad editor and loads test.ctl.
fitrois ; Makes a single peak Gaussian fit for all ROIs in the active
; Display of MPANT and dumps the result into a logfile. This is ; performed by the MPANT program and therefore can be ; made only if this application is running.
fitrois MC_1 ; Similar to the fitroi command, but using the argument allows to
; specify which spectrum should be evaluated independently of ; which child window is activated in MPANT. MC_1 means CHN1 ; (=STOP1)
autocal ; Makes a single peak Gaussian fit for all ROIs in the active
; Display of MPANT for which a peak value was entered in the ; MPANT Region Edit dialog and uses the results for a ; calibration. This is performed by the MPANT program and ; therefore can be made only if this application is running.
autocal MC_1 ; Similar to the autocal command, but using the argument allows
; to specify which spectrum should be evaluated independently of ; which child window is activated in MPANT
deleteallrois ; deletes all ROIs in the active MPANT window.
deleteallrois MC_# ; allows to delete all ROIs of a specified spectra (1 for # means
; A1..).
The following commands make sense only when using the serial line or TCP/IP control or DLL control interface:
MC_A? ; Sends the status of A1 (STOP1) via the serial port and make
; CHN1 actual.
...
MC_F? ; Sends the status of ch6 via the serial port and
; make it actual.
? ; Send the status of the actual ADC
sendfile filename ; Sends the ASCII file with name ‘filename’ via the serial line.
The execution of a control file can be finished from the Server or MPANT with any Halt command.
Page 68
Software Description
ComTec GmbH 5-30
5.3. Controlling the MPA4 Windows Server via DDE
The MPA4 program can be a server for DDE (Dynamic Data Exchange). Many Windows software packages can use the DDE standard protocols to communicate with other Windows programs, for example GRAMS, FAMOS or LabVIEW. In the following the DDE capabilities of the MPA4 program are described together with a demo VI („Virtual Instrument“) for LabVIEW. It is not recommended to use the DDE protocol for LabVIEW, as also a DLL interface is available that is much faster. The following should be seen as a general description of the DDE conversation capabilities of the MPA4 program.
5.3.1. Open Conversation
application: MPA4 topic: MPA4-
Any application that wants to be a client of a DDE server, must open the conversation first by specifying an application and a topic name. The application name is MPA4 and the topic is MPA4-.
5.3.2. DDE Execute
The DDE Execute command can be used to perform any action of the MPA4 program. Any of the Control command lines described in section 5.2 can be used. For example a sequence of control commands saved in a file TEST.CTL can be executed by specifying the command
RUN TEST.CTL
The MPA4 program then executes the command and, after finishing, it sends an Acknowledge message to the DDE client. This can be used to synchronize the actions in both applications.
Fig. 5.27: Opening the DDE conversation with the MPA4 in LabVIEW
Page 69
Software Description
ComTec GmbH 5-31
5.3.3. DDE Request
The DDE Request is a message exchange to obtain the value of a specified item. Only two items are defined for DDE request up to now: RANGE and DATA. The value is obtained as an ASCII string, i.e. it must be converted by the client to get the numbers. All other parameters concerning the setup can be obtained by the client application by reading and evaluating the configuration file.
RANGE
The RANGE item can be used to obtain the total number of data.
DATA
With the DATA item the data is obtained. The value of this item is a multiline string that contains in each line a decimal number as an ASCII string.
Fig. 5.28: Executing a MPA4 command from a LabVIEW application
Fig. 5.29: Getting the total number of data with LabVIEW
Page 70
Software Description
ComTec GmbH 5-32
5.3.4. Close Conversation
After finishing the DDE communication with the server program, it must be closed.
The following figure shows the „Panel“ of the described VI for LabVIEW.
Fig. 5.30: Getting the data with LabVIEW
Fig. 5.31: Closing the DDE communication in LabVIEW
Page 71
Software Description
ComTec GmbH 5-33
5.3.5. DDE Conversation with GRAMS/386
The following file GRAMS889.CIF can be used to get the MPA4 data into GRAMS/386 via DDE using the „Collect“ menu:
MPA4 DDE Test Query MPA4 MPA4­DATA
save
end spc 1 second
Fig. 5.32: Control Panel of the demo VI for LabVIEW
Page 72
Software Description
ComTec GmbH 5-34
5.4. Controlling the MPA4 Windows Server via DLL
The MPA4 server program provides access to all functions, parameters and data via a DLL („dynamic link library“). So the server can be completely controlled by the MPANT software that provides all necessary graphic displays.
In the following some parts of the header and definition files of the DMPA4.DLL are listed, that may help an experienced programmer to use the DLL for own applications.
NOTE:
The complete documented sourcecode of the DLL including fundamental VI’s and an example VI for LabVIEW and an example Visual Basic and C program is available as an option.
#define ST_RUNTIME 0 #define ST_OFLS 1 #define ST_TOTALSUM 2 #define ST_ROISUM 3 #define ST_ROIRATE 4 #define ST_SWEEPS 5 #define ST_STARTS 6
typedef struct{
unsigned long started; // aquisition status unsigned long maxval; // maxval double cnt[7]; // status: runtime in msec, ofls,
// total sum, roi sum, roi rate, sweeps, starts } ACQSTATUS;
typedef struct {
long savedata; // bit 0: auto save after stop
// bit 1: write listfile
// bit 2: listfile only, no evaluation long autoinc; // 1 if auto increment filename long fmt; // format type (seperate spectra):
// 0 == ASCII, 1 == binary,
//2==CSV long mpafmt; // format used in mpa datafiles long sephead; // seperate Header long smpts; long caluse; char filename[256]; char specfile[256]; char command[256];
} DATSETTING;
typedef struct {
long use; // 1 if Replay Mode ON long modified; // Bit 0: 1 if different settings are used long limit; // 0: all,
// 1: limited sweep range long speed; // replay speed in units of 100 kB / sec double startsfrom; // first start# double startsto; // last start# double startspreset; // last start - first start char filename[256];
} REPLAYSETTING;
typedef struct{
long range; // spectrum length
Page 73
Software Description
ComTec GmbH 5-35
long cftfak; // LOWORD: cft factor (256 * t_after_peak /
// t_to_peak)
// HIWORD: Max. Width long roimin; // lower ROI limit long roimax; // upper limit: roimin <= channel < roimax long nregions; // number of regions long caluse; // bit0: 1 if calibration used,
// higher bits: formula long calpoints; // number of calibration points long param; // for MAP and SUM/DIF:
// LOWORD=x, HIGHWORD=y long offset; // zoomed MAPS:
// LOWORD: xoffset, HIGHWORD, yoffset long xdim; // x resolution of maps long bitshift; // LOWORD: Binwidth=2^(bitshift)
// HIWORD: Time threshold for Coinc. long active; // Spectrum definition words for CHN1..6:
// active & 0xF ==0 not used
// ==1 enable
// bit 8: enable Tag bits
// bit 9: start with rising edge
// bit 10: time under threshold for pulse width
// bit 11: pulse width mode for any spectra with
both edges enabled
// Spectrum definition words for calc. spectra:
// active & 0xF ==3 Dualparameter MAP,
// ((x-xoffs)>>xsh) x ((y-yoffs)>>ysh)
// bit4=1: x zoomed MAP
// bit5=1: y zoomed MAP
// ==5 SUM, (x + y)>>xsh
// ==6 DIFF,(x-y+range)>>xsh
// ==7 ANY, (for compare)
// ==8 COPY, x
// HIWORD(active) = condition no. (0=no condition) double eventpreset; // ROI preset value double dummy1; // (for future use..) double dummy2; // double dummy3; //
} ACQSETTING;
typedef struct {
long sweepmode; // sweepmode & 0xF: 0 = normal,
// 1=differential // (relative to first stop in sweep) // 4=sequential // 5=seq.+diff (Ch1), bit0 = differential mode // 9=differential to stop in Ch2, // bit3 = Ch2 ref (diff.mode) // 0xD = seq.+diff (Ch2) // bit 4: Softw. Start // bit 6: Endless // bit 7: Start event generation // bit 8: Enable Tag bits // bit 9: start with rising edge // bit 10: time over threshold for pulse width // bit 11: pulse width mode for any // spectra with both edges enabled // bit 12: abandon Sweepcounter in Data // bit 13: "one-hot" mode with tagbits // bit 14: ch6 ref (diff.mode) // bit 15: enable ch6 input // bit 16.. // bit 20 ~(input channel enable) // bit 24: require data lost bit in data // bit 25: don't allow 6 byte datalength
long prena; // bit 0: realtime preset enabled
Page 74
Software Description
ComTec GmbH 5-36
// bit 2: sweep preset enabled // bit 3: ROI preset enabled // bit 4: Starts preset enabled // bit 5: ROI2 preset enabled // bit 6: ROI3 preset enabled // bit 7: ROI4 preset enabled // bit 8: ROI5 preset enabled
// bit 9: ROI6 preset enabled long cycles; // for sequential mode long sequences; // long syncout; // LOWORD: sync out;
// bit 0..5 NIM syncout, bit 8..13 TTL syncout
// bit7: NIM syncout_invert,
// bit15: TTL syncout_invert
// 0="0", 1=10 MHz, 2=78.125 MHz, 3=100 MHz,
// 4=156.25 MHz, 5=200 MHz, 6=312.5 MHz,
// 7=Ch0, 8=Ch1, 9=Ch2, 10=Ch3,
// 11=Ch4, 12=Ch5, 13=GO,
// 14=Start_of_sweep, 15=Armed,
// 16=SYS_ON, 17=WINDOW, 18=HOLD_OFF,
// 19=EOS_DEADTIME
// 20=TIME[0],...,51=TIME[31],
// 52...63=SWEEP[0]..SWEEP[11] long digio; // LOWORD: Use of Dig I/O, GO Line:
// bit 0: status dig 0..3
// bit 1: Output digval and
// increment digval after stop
// bit 2: Invert polarity
// bit 4: Input pins 4 Trigger System
// bit 8: GOWATCH
// bit 9: GO High at Start
// bit 10: GO Low at Stop
// bit 11: Clear at triggered start
// bit 12: Only triggered start long digval; // digval=0..255 value for samplechanger long dac0; // DAC0 value (START) long dac1; // DAC1 value (STOP 1) long dac2; // DAC2 value (STOP 2) long dac3; // DAC3 value (STOP 3) long dac4; // DAC4 value (STOP 4) long dac5; // DAC5 value (STOP 5)
// bit (14,15) of each word:
// 0=falling, 1=rising, 2=both, 3=both+CFT int fdac; // Feature DAC 0..16383 --> 0..2.5V int tagbits; // number of tagbits int extclk; // use external clock long maxchan; // number of input channels (=6) long serno; // serial number long ddruse; // bit0: DDR_USE, bit1: DDR_2GB long active; // module in system double holdafter; // Hold off double swpreset; // sweep preset value double fstchan; // acquisition delay double timepreset; // time preset
} BOARDSETTING;
typedef struct{
unsigned long HUGE *s0; // pointer to spectrum unsigned long far *region; // pointer to regions unsigned char far *comment0; // pointer to strings double far *cnt; // pointer to counters HANDLE hs0; HANDLE hrg; HANDLE hcm; HANDLE hct;
} ACQDATA;
Page 75
Software Description
ComTec GmbH 5-37
typedef struct {
int nDevices; // Number of channels = number of modules * 6 int nDisplays; // Number of histograms = nDevices
// + Positions + Maps int nSystems; // Number of independent systems = 1 int bRemote; // 1 if server controlled by MPANT unsigned int sys; // System definition word:
// bit0=0, bit1=0: dev#0 in system 1
// bit0=1, bit1=0: dev#0 in system 2
// bit0=0, bit1=1: dev#0 in system 3
// bit0=1, bit1=1: dev#0 in system 4
// bit2..bit6:
// bit6=1, bit7=1: dev#3 in system 4 int sys0[16]; // System definition words for CHN1..16:
// bit 0 CHN active
// bit 1 =1 CHN coinc, =0 single
// bit 2..4 CHN in system1..7 int sys1[16]; // (reserved:) CHN in System
} ACQDEF;
/*** FUNCTION PROTOTYPES (do not change) ***/ BOOL APIENTRY DllMain(HANDLE hInst, DWORD ul_reason_being_called,
LPVOID lpReserved);
VOID APIENTRY StoreSettingData(ACQSETTING FAR *Setting, int nDisplay);
// Stores Settings into the DLL
int APIENTRY GetSettingData(ACQSETTING FAR *Setting, int nDisplay);
// Get Settings stored in the DLL
VOID APIENTRY StoreExtSettingData(EXTACQSETTING FAR *Setting,
int nDisplay);
// Stores extended Settings into the DLL
int APIENTRY GetExtSettingData(EXTACQSETTING FAR *Setting,
int nDisplay);
// Get extended Settings stored in the DLL
VOID APIENTRY StoreStatusData(ACQSTATUS FAR *Status, int nDisplay);
// Store the Status into the DLL
int APIENTRY GetStatusData(ACQSTATUS FAR *Status, int nDisplay);
// Get the Status
VOID APIENTRY Start(int nSystem); // Start VOID APIENTRY Halt(int nSystem); // Halt VOID APIENTRY Continue(int nSystem); // Continue VOID APIENTRY NewSetting(int nDevice);
// Indicate new Settings to Server
UINT APIENTRY ServExec(HWND ClientWnd);
// Execute the Server MCS6.EXE
VOID APIENTRY StoreData(ACQDATA FAR *Data, int nDisplay);
// Stores Data pointers into the DLL
int APIENTRY GetData(ACQDATA FAR *Data, int nDisplay);
// Get Data pointers
long APIENTRY GetSpec(long i, int nDisplay);
// Get a spectrum value
VOID APIENTRY SaveSetting(void); // Save Settings int APIENTRY GetStatus(int nDevice);
// Request actual Status from Server
VOID APIENTRY Erase(int nSystem); // Erase spectrum VOID APIENTRY SaveData(int nDisplay, int all); // Saves data VOID APIENTRY GetBlock(long FAR *hist, int start, int end, int step,
int nDisplay);
// Get a block of spectrum data
VOID APIENTRY StoreDefData(ACQDEF FAR *Def);
// Store System Definition into DLL
int APIENTRY GetDefData(ACQDEF FAR *Def);
// Get System Definition VOID APIENTRY LoadData(int nDisplay, int all); // Loads data VOID APIENTRY AddData(int nDisplay, int all); // Adds data
Page 76
Software Description
ComTec GmbH 5-38
VOID APIENTRY SubData(int nDisplay, int all); // Subtracts data VOID APIENTRY Smooth(int nDisplay); // Smooth data VOID APIENTRY NewData(void);
// Indicate new ROI or string Data
VOID APIENTRY HardwareDlg(int item);
// Calls the Settings dialog box
VOID APIENTRY UnregisterClient(void);
// Clears remote mode from MPANT VOID APIENTRY DestroyClient(void); // Close MPANT UINT APIENTRY ClientExec(HWND ServerWnd);
// Execute the Client MPANT.EXE int APIENTRY LVGetDat(unsigned long HUGE *datp, int nDisplay);
// Copies the spectrum to an array VOID APIENTRY RunCmd(int nDisplay, LPSTR Cmd);
// Executes command int APIENTRY LVGetRoi(unsigned long FAR *roip, int nDisplay);
// Copies the ROI boundaries to an array int APIENTRY LVGetOneRoi(int nDisplay, int roinum, long *x1, long *x2);
// Get one ROI boundary int APIENTRY LVGetCnt(double far *cntp, int nDisplay);
// Copies Cnt numbers to an array int APIENTRY LVGetStr(char far *strp, int nDisplay);
// Copies strings to an array VOID APIENTRY StoreMCSSetting(BOARDSETTING *Defmc, int ndev);
// Store BOARDSETTING Definition into DLL int APIENTRY GetMCSSetting(BOARDSETTING *Defmc, int ndev);
// Get BOARDSETTING Definition from DLL VOID APIENTRY StoreDatSetting(DATSETTING *Defdat);
// Store Data Format Definition into DLL int APIENTRY GetDatSetting(DATSETTING *Defdat);
// Get Data Format Definition from DLL VOID APIENTRY StoreReplaySetting(REPLAYSETTING *Repldat);
// Store Replay Settings into DLL int APIENTRY GetReplaySetting(REPLAYSETTING *Repldat);
// Get Replay Settings from DLL int APIENTRY GetDatPtr(int nDisplay, long *xmax, long *ymax, LPSTR *pt);
// Get a temporary pointer to spectra data int APIENTRY ReleaseDatPtr(void);
// Release temporary data pointer long APIENTRY GetSVal(int DspID, long xval);
// Get special display data like
// projections or slices from MPANT
EXPORTS ; Functions in lmcs6.dll
StoreSettingData @2 GetSettingData @3 StoreStatusData @4 GetStatusData @5 Start @6 Halt @7 Continue @8 NewSetting @9 ServExec @10 StoreData @11 GetData @12 GetSpec @13 SaveSetting @14 GetStatus @15 Erase @16 SaveData @17 GetBlock @18 StoreDefData @19 GetDefData @20 LoadData @21 NewData @22 HardwareDlg @23
Page 77
Software Description
ComTec GmbH 5-39
UnregisterClient @24 DestroyClient @25 ClientExec @26 LVGetDat @27 RunCmd @28 AddData @29 LVGetRoi @30 LVGetCnt @31 LVGetOneCnt @32 LVGetStr @33 SubData @34 Smooth @35 StoreExtSettingData @36 GetExtSettingData @37 StoreMCSSetting @38 GetMCSSetting @39 StoreDatSetting @40 GetDatSetting @41 StoreReplaySetting @42 GetReplaySetting @43 GetDatPtr @44 ReleaseDatPtr @45 LVGetOneRoi @46 GetSVal @47
Page 78
MPANT Software
ComTec GmbH 6-1
6. MPANT Software
The window of the MPANT program is shown here. It enables the full control of the MPA4(T) via the server program to perform measurements and save data, and shows the data on-line in several windows.
The server program MPA4.EXE automatically starts MPANT. If you try to start MPANT before the server is started, a message box warns that you should start the server first.
MPANT has viewing capabilities for single- and two-dimensional spectra. For ROI's the ROISum, Net sum and now also the mean counts per channel (i.e. ROISum divided by number of channels) and the centroid is displayed (<x> for single spectra, <x> and <y> for two dimensional). A single spectrum can be converted into a two-dimensional one by specifying the x dimension in the display option dialog. It is possible to drag a rectangle and zoom into this rectangle. Rectangular ROI's can be set and the ROISum and Net ROISum is displayed. The Net Sum is calculated the same way like in the single view, by subtracting a linear interpolated background from the both outmost channels in x-direction. This Net sums are then summed up in y-direction. The ROI editing dialog is changed into a Rectangular Editing dialog for MAP and ISO displays. The Cursor can be moved in x and y direction using the mouse and the arrow keys, in ISO display only using the arrow keys.
A status window at the left side gives all information about the status of the MPA4. Below the different counting rates you can see the present temperature of the board and main FPGA. It is refreshed every minute. A "Data Lost" indicator shows if the FIFO was full at any time during an acquisition, a progress bar shows how full the large FIFO presently is.
Fig. 6.1: MPANT main window
Page 79
MPANT Software
ComTec GmbH 6-2
A toolbar provides fast access to many used functions in the menu. A status bar at the bottom gives help about the meaning of the toolbar icons. A cursor appears when clicking the left mouse button inside the graphics area. The cursor can be moved using the arrow keys. To get rid of the cursor, make a double click with the right mouse button outside the graphics area. To define a region, press the right mouse button, and while keeping the button pressed, drag a rectangle. In zoomed state a scrollbar appears that allows scrolling through the spectrum.
In the following the several menu functions are described together with the corresponding toolbar icons.
6.1. File Menu
Load..., Add..., Save Display As..., Save MPA As...
These menu items provide the usual functions for loading and saving data, either a complete data set when loading or saving a .MPA data file, or separated spectra when loading or adding a .MP data file. The 'Load' function creates then a new spectrum for compare, whereas the 'Add' functions adds the data to the spectrum selected by the active window. For saving a selected spectrum into a seperate file, click on the respective display window and select “Save Display As...” from the MPANT File menu. If you want to have the data file seperated from the header containing the configuration, first open the data operations dialog using the toolbar icon showing the 4 yellow diskettes, select “”Selected Spectra” and check “Seperate Header” as shown in chapter 5.1.3. When saving data, you have the choice between binary (.DAT), ASCII (.ASC), and CSV (.CSV) format by selecting it from “Save type As...”. To read a CSV file with Excel, load it as a text file and configure TAB characters as seperators.
When you load data, select a header file (extension .MP). This file contains the information about the size and format of the data file, which is then automatically read. With „Add“ the data is added to the present data. The data read from a file is shifted according to the calibration, if it is available and 'Use Calib' is checked in the MCS6A Data Operations dialog.
Fig. 6.2: MPANT Map and Isometric display
Page 80
MPANT Software
ComTec GmbH 6-3
New Display...
With the Open New menu item or the corresponding icon a new Display window can be created and shown as the active window. In the „Open New Display“ dialog box the spectra for the new display can be selected.
Open All
By selecting the Open All menu item, all available Displays are shown. The windows of the last opened Display become active.
Close All
By selecting the Close All menu item, all Display windows are closed.
Print...
The Print menu item opens the print dialog. It allows to arrange several pictures on a page into zones. The number of zones in vertical and horizontal direction can be specified. The Color can be black/white, RGB (colored) or Gray scale. RGB is recommended also for black laser printers. Some info lines containing date, filename and title can be added. For each page a temporary file PRINT1.WMF, PRINT2.WMF... will be created. This file is in Windows Metafile format and can be exported into some other Windows applications.
Fig. 6.3: File New Display dialog box
Page 81
MPANT Software
ComTec GmbH 6-4
Setup Printer...
The Setup Printer menu item allows to configure the printer.
Exit
The Exit menu item exits the MPANT.
6.2. Window Menu
The Window menu allows to arrange the Display windows.
Tile
With the Tile menu item or clicking the corresponding icon, all opened and displayed MPANT Display windows are arranged over the full MPANT client area trying to allocate the same size for each window.
Cascade
The Cascade menu item or respective icon arranges all windows in a cascade display.
Arrange Icons
By the Arrange Icons menu item, the minimized MPANT Display windows are arranged in a series at the bottom of the MPANT client area.
Fig. 6.4: Print dialog box
Page 82
MPANT Software
ComTec GmbH 6-5
Window list
At the end of the Window menu, all created Display windows are listed with their names, the current active window is checked. By selecting any of the names, this window becomes the active window and is displayed in front of all the others.
6.3. Region Menu
The Region menu contains commands for Regions and ROI's (Regions of Interest). A Region can be defined by marking it in a display, with the mouse using the right mouse button and dragging a rectangle over the area one is interested in. A ROI, i.e. an already defined region in a single spectrum can be shown zoomed by double-clicking with the left mouse button on the corresponding colored area in the bar at the bottom of the spectra display. A single mouse click with the left button on the corresponding colored area makes this to the selected ROI and lets the counts contained in this ROI be displayed in the information lines of the respective window. Advance the selected ROI to the next or previous one using the "+" or "-" key from the numeric keypad.
Polygonal and curved ROI's in MAP displays are now implemented in addition to the rectangular ROI's. The boundaries can be polygonal, circular, annular or pie. Make a choice of the shape using the Menu Region...Shape or the corresponding toolbar icon. Define the ROI using the right mouse button, the TAB and the END key (please read the help in the status bar) and save the ROI using the toolbar icon "Create new ROI". Advance the selected ROI to the next or previous one using the "+" or "-" key from the numeric keypad. The ROI boundary is displayed by lines or circles and the ROI area can in addition be displayed in inverted color by enabling the checkbox "Invert ROI Pixel" in the MAP Display options dialog. The sum and net sum of counts within the selected ROI is displayed. The net sum is calculated by subtracting a background integral by summing line integrals S(y) for each y coordinate using the mean value of the counts at the lowest and highest x coordinate of the ROI.
Zoom
The Zoom item or respective icon enlarges a Region to the maximum Spectrum Display size.
Back
The Back menu item or clicking the corresponding icon restores the last zoom view. Each time a Back command is clicked the view is stepped back one step.
Zoom Out
The Zoom Out menu item or clicking the corresponding icon enlarges the actual zoom view by a factor 2, if possible.
Home
Clicking the Home menu item or the corresponding icon restores a Display to the basic configuration.
Shape
Selecting the Shape menu item opens a submenu with the items Rectangle, X-Slice Y-Slice and Rectangle, Polygon, Circle, Annular and Pie to choose the ROI shape.
Page 83
MPANT Software
ComTec GmbH 6-6
Rectangle
Sets the region shape to a rectangle with arbitrary dimensions. To enter the rectangular region, press the right mouse button, drag a rectangle, and release the button to define the region.
X-Slice
Sets the Region shape to the rectangle with maximal height.
Y-Slice
Sets the Region shape to the rectangle with maximal width.
Polygon
Sets the Region shape to polygonal. To enter a polygonal Region using the mouse, press the right button for each point, the TAB key for a next polygon and the END key to close it.
Circle
Sets the Region shape to circular. To enter a circular Region using the mouse, click the right button at the center, move the mouse and press the END key to finish.
Annular
Sets the Region shape to annular. To enter an annular Region using the mouse, click the right button at the center and first circle and press the END key at the second circle.
Pie
Sets the Region shape to pie. To enter a pie Region using the mouse, click the right button at the center and first radial end-point, press the END key at the second radial line end-point.
Create
The Create menu item creates a new ROI from the current marked Region.
Delete
By selecting the Delete menu item or the respective icon, the current active ROI is deleted and the previously defined ROI is activated.
Edit...
With the Edit item, a dialog box is opened which allows to edit the ROI list, i.e. create a new or delete, change and activate an existing ROI. Also the peak values for an automatic calibration
Page 84
MPANT Software
ComTec GmbH 6-7
can be entered here. A ROI can be edited and added to the list. It can also be made to the „Active ROI“, that is the special ROI that is used by the server program to calculate the events within this ROI and look for an event preset. The ROI list can be cleared and it can be written into a file with extension .CTL, which can be directly loaded into the server to restore the ROI list.
Clicking on it in the ROI list can change the selected ROI. In the MPANT spectrum display the total and net sum of the selected ROI is displayed.
ROI names are implemented. The name can be entered in the ROI editing dialog. Press "Modify" to insert a new name from the edit field of the selected ROI into the list.
For polygonal, circular, annular and pie ROI's there is a special dialog to select and edit all the parameters. The ROI definition parameters can be saved into a .CTL file and reloaded using the File menu like any control file. Note that the selected ROI can be advanced in any activated spectra display by pressing the "+" and "-" key from the numeric keypad.
Fig. 6.5: Slice and rectangular ROI Editing dialog box
Fig. 6.6: Polygonal ROI Editing dialog box
Page 85
MPANT Software
ComTec GmbH 6-8
X-Projection, Y-Projection
Projections of ROI's in dual parameter spectra to the x- and y-axes are now implemented. There are new menu items "X-Projection" and "Y-Projection" in the Region menu. They create new single spectra displays showing the respective projection of the selected ROI in a dual parameter spectrum in the active window.
Fit...
By selecting the Fit... menu item or the respective icon, a single Gaussian peak fit with linear background is performed for the currently marked region. The fitted curve is displayed and a dialog box shows the results:
The full width at half maximum FWHM and Position of the Gaussian can be changed and a New Fit can be performed, they even can be fixed to the entered value by marking the respective checkbox. The Position and FWHM are displayed in channels and also in calibrated units, if a calibration is available. The area of the Gaussian is also shown. For all values also the standard deviations are given. The value of Q is the normalized chi**2. To take into account the systematic error of the line shape, you may multiply the errors with the square root of Q. Click on Save to append a line containing the results to a Log file with the specified name. OK closes the dialog and lets the fitted function in the display also if it is refreshed, whereas after Cancel the curve no longer will be shown in a refreshed display. Options... opens a new dialog box to define the information in the log file:
Fig. 6.7: Single Gaussian Peak Fit
Page 86
MPANT Software
ComTec GmbH 6-9
The several quantities are written in standard text format with Tabs as separators and a Newline character at the end of each line, so the file can be read with standard calculation programs like EXCEL. Click on Print Header to write a header line.
Fit ROIs
With the Fit ROIs item, for all ROI's a Single Gaussian Peak Fit is performed and the results are dumped into the log file.
Auto Calib
Makes a Gauss fit for all ROI's in the active Display for which a peak value was entered, and performs a calibration using the fit results.
6.4. Options Menu
The Options Menu contains commands for changing display properties like scale, colors etc., hardware settings, calibration and comments.
Colors...
The Colors menu item or respective icon opens the Colors dialog box.
Fig. 6.8: Log file Options for the Single Gaussian Peak Fit
Page 87
MPANT Software
ComTec GmbH 6-10
It changes the palette or Display element color depending on which mode is chosen. The current color and palette setup may be saved or a new one can be loaded.
To change on of the colors, select "Palette colors" and click on one of the colors. In the Color Palette dialog box the RGB values can be edited or for a 256 color video driver one of the Physical palette colors can be chosen.
Fig. 6.9: Colors dialog box
Fig. 6.10: Color Palette dialog box
Page 88
MPANT Software
ComTec GmbH 6-11
Display...
The Display menu item or the corresponding icon opens for single spectra the Single view dialog box.
Here the graphic display mode of single spectra can be chosen. The 'Type' combo box gives a choice between dot, histogram, spline and line. The 'Symbol' combo box gives a choice between None, Circle, Triangle down, Triangle up, Cross, Snow-flake and Diamond. The symbols can be filled by checking Fill, error bars can be displayed by checking Error Bar.
'Dot' means that each spectra point is shown as a small rectangle or the specified symbol, the size can be adjusted with the size combo box. 'Histogram' is the usual display with horizontal and vertical lines, 'spline I' means linear interpolation between the points, and 'line' means vertical lines from the ground to each spectra point.
If the displayed spectra range contains more channels as pixel columns are available in the video graphic display, usually only the maximum value of the channels falling into that pixel columns is displayed. But it can also explicitly specified by marking the checkboxes „Max Pixel“, „Mean Pixel“ or „Min Pixel“ which value will be displayed. It is also possible to display all three possible values in different colors that can be chosen in the colors dialog. For the „Mean Pixel“ a Threshold value can be entered; channel contents below this value then aren't taken into account for the mean value calculation.
The button labeled Custom Formula... is visible only if you have a special DLL named FMPA3.DLL. It allows communicating with MPANT for customer- calculated spectra. This DLL including source code is now part of the DLL software interface that is available as an option.
Installation: Copy the FMPA3.DLL into the working directory (usually C:\MPA3). Use: This DLL allows to calculate spectra and to display it with the MPANT program. Select a single spectrum and open the Display options dialog. Press then the button labeled "Custom formula...". A dialog box "Custom-transformed spectra" is opened. Here the formula for the calculation can be selected and the parameters can be edited. A new display window showing the calculated spectra can be created. Error Bars can be activated in the display options dialog, for the calculation of the error bars also the DLL is used. Example: The supplied DLL is for acquisitions marked by a tag bit in a high bit of the ADC interface. It allows to calculate the Sum=x+x', Difference=x-x' and relative difference Delta=F*(x-x')/(x+x') of spectra marked by the tag bit.
Fig. 6.11: Single View dialog box
Page 89
MPANT Software
ComTec GmbH 6-12
It is possible to change to a two dimensional view of the spectrum by specifying the x Dimension and clicking the button ">> MAP" from the Single View dialog.
For MAP displays the Display Options dialog is changed and allows a choice between four Graphic types: bitmap dot, vector dot, bitmap contour and vector contour. Bitmap Dot is recommended as a standard, because it makes a good and fast display. The checkbox Invert Roi Pixel allows changing the color inside ROI's to make it better visible. Vector Contour paints colored contour lines. To calculate the lines takes a lot of time and causes the mouse pointer changing to an hourglass. But it gives very impressive colored pictures suited especially for presentation and when looking carefully at spectra details.
From the MAP View dialog it is possible to change to Single view by clicking ">> Single" or change to Isometric View by clicking ">> Isometric". For pulse width measurements with a y­dimension of two for the two edges a button will be displayed for switching into the "overlapped" single view (MPA4T only).
Fig. 6.12: Custom-transformed spectra dialog
Fig. 6.13: MAP View dialog box
Page 90
MPANT Software
ComTec GmbH 6-13
In isometric mode several single spectra are drawn behind each other. The Precession angle around the vertical axis can be chosen in multiples of 90 degrees. The Tilt angle is between the x and y-axis and can be chosen between 15 and 89 degrees. The Height specifies the percentage of the z-axis length respective to the whole drawing, it can be entered between 0 and 99. With hidden it can be specified whether the hidden parts are not drawn. If "Monochrome" is checked, the spectra are painted monochrome, otherwise in color.
Axis...
By the Axis... menu item or the respective icon, the Axis Parameters dialog box is opened.
Fig. 6.14: Isometric View dialog box
Page 91
MPANT Software
ComTec GmbH 6-14
It provides many choices for the axis of a display. The frame can be rectangular or L-shape, the frame thickness can be adjusted (xWidth, yWidth). The font size can be chosen between Small and Large. A grid for x and y can be enabled, the style can be chosen between Solid, Dash, DashDot and DashDotDot. Ticks on each of the four frame borders can be enabled, the tick length and thickness can be chosen. The style of the axis labeling depends on enabled ticks at the bottom respective left side: If no ticks are enabled there, only the lowest and highest values are displayed at the axis, otherwise the ticks are labeled. 'Use calibration' changes the axis ticks and labels into calibrated values. A checkbox "Start maximized" allows to define if the MPANT main window should start in maximized size. It is necessary to save the MPANT options to make these settings permanent.
Scaling...
The Scaling menu item or the corresponding icon opens the Scale Parameters dialog box.
Fig. 6.15: Axis Parameter dialog box
Page 92
MPANT Software
ComTec GmbH 6-15
It allows to change the ranges and attributes of a Spectrum axis. By setting the Auto scaling mode, the MPANT will automatically recalculate the y-axe's maximum value for the visible Spectrum region only. To keep the same height of the visible region for a longer time, deselect the Auto scaling mode. Then with the scroll bar thumb one can quickly change the visible region scale, otherwise the scale will be changed automatically. The Minimum auto scale mode helps to display weak structures on a large background.
Lin / Log scale
For a Lin scale all data intervals have the same size. With Log scale the intervals will be small for small y values and large for large y values. All options have effect only on the active Display.
Calibration...
Using the Calibration menu item or the corresponding icon opens the Calibration dialog box.
Fig. 6.16: Scale Parameters dialog box
Page 93
MPANT Software
ComTec GmbH 6-16
Choose between several calibration formulas. Enter some cursor positions and the corresponding values. The actual cursor position can be entered by pressing 'Cursor' or the last fitted peak position by pressing 'Fit'. Click on Add to insert the calibration position into the list, then on Calibrate. The obtained coefficients can be inspected together with the statistical error, or they can be changed and entered by hand. If ‘use calibration’ is on, the calibrated values are displayed together with the channel position of the cursor. For MAP spectra the dialog is slightly different and allows to select by two radio buttons between the calibration of x- and y-axis. For a selected parameter there is only one calibration: If any ADC is already calibrated in a single spectrum and it is used also in a MAP spectrum, the calibration is the same here.
Comments...
Up to 13 comment lines with each 60 characters can be entered using the Comments dialog box. The content of these lines is saved in the data header file. The first line automatically contains the time and date when a measurement was started. The second line contains the title of the spectra. Note that editing this line changes the spectra name. This is the only method to change the name of physical ADC spectra. The description of each comment line can be changed by editing the file COMMENT.TXT.
Fig. 6.17: Calibration dialog box
Page 94
MPANT Software
ComTec GmbH 6-17
Hardware...
The Hardware settings dialog box allows to make all the respective settings (ref. chapter 5.1.4).
Fig. 6.18: Comments dialog box
Fig. 6.19: Settings dialog box
Page 95
MPANT Software
ComTec GmbH 6-18
Data...
The Data dialog box allows to edit all the respective MPA4 settings (ref. chapter 5.1.3).
System...
The System Definition dialog box allows to make all the respective settings (See chapter 5.1.9).
Spectra...
The Spectra dialog box allows editing the list of calculated and dual parameter spectra, see chapter 5.1.10.
Fig. 6.20: Data Operations dialog box
Fig. 6.21: System Definition dialog box
Page 96
MPANT Software
ComTec GmbH 6-19
Slice...
The Slice option allows to create new single spectra displays, showing a slice in a dual parameter spectrum. Click on a dual parameter spectra display to make it the active window, then select the Slice menu item or toolbar icon. The Slice dialog box is displayed.
Select “x=const” or “y=const” for the slice direction, and the coordinate. Clicking the "create" button creates the new display window. In the title bar of the new window the name of the dual parameter spectra and the slice coordinate is shown.
The slice position can be changed using the scroll bar in the Slice dialog, or by entering the value in the edit field and pressing the button, which is labeled “Set” after creation of the slice view.
Clicking its close field can close the Slice dialog. Created slice spectra displays remain visible and their coordinates can be changed later using the Slice utility again. The position of the Slice dialog with respect to the MPANT main window can be saved in the MPANT.CFG file. Rectangular ROI's are visible in the slice spectra display and can be created here.
Replay...
The menu item Options – Replay... opens the Replay settings dialog (ref. chapter 5.1.3).
Fig. 6.22: Spectra dialog box
Fig. 6.23: Slice dialog box
Page 97
MPANT Software
ComTec GmbH 6-20
Tool Bar...
Selecting the Tool Bar Menu item opens the Tool Bar Dialog Box. It allows arranging the icons in the Tool Bar.
If it is enabled, an array of icons in the MPANT Menu is shown. Clicking the left mouse button with the cursor positioned on an icon, the user can perform a corresponding MPANT Menu command very quick.
It is also possible to include icons for free programmable function keys F1...F12 into the Toolbar. The function keys can be programmed in the Function keys dialog. It can be accessed either by clicking the "Function keys..." button or directly from the options menu.
Fig. 6.24: Replay dialog box
Fig. 6.25: Tool Bar dialog box
Page 98
MPANT Software
ComTec GmbH 6-21
The functions can be executed by clicking the corresponding icon in the toolbar or by the corresponding function key on the keyboard simultaneously with the CTRL key. The MPANT window must be the active on the desktop and have the focus.
Status bar
With this menu item the Status bar at the bottom of the MPANT main window can be switched on or off. A corresponding check mark shows if it is active or not. The Status bar usually shows if an acquisition is active. When the left mouse button is pressed while the mouse cursor is within a toolbar icon, it displays a short help message what the meaning of the toolbar icon is.
Status window
The status window at the left side of the MPANT main window can be shown in a small or large size or can be hidden.
Save As...
Saves all parameters defined in the Options menu to the MPANT.CFG or a user defined config file.
Open...
Loads a new configuration.
Fig. 6.26: Function keys dialog box
Page 99
MPANT Software
ComTec GmbH 6-22
6.5. Action Menu
The Action Menu or corresponding toolbar icons contain the commands to start, stop, continue and erase a measurement. If more than one systems are formed, also more actions menus are available, otherwise they are grayed.
Start
The Start toolbar button erases the data and starts a new measurement.
Halt
The Halt toolbar button stops a measurement.
Continue
The Continue toolbar button continues a measurement.
Erase
The Erase toolbar button erases the data.
Page 100
Programming and Software Options
ComTec GmbH 7-1
7. Programming and Software Options
The MPA4 can be controlled by user-written programs using the DLL software interface with example programs for Visual Basic, LabVIEW and C that is available as an option. Furthermore, LINUX software is available as an option containing a driver, library and console test program. A Windows software similar to the LINUX package that runs without the server using a stand-alone DLL is also available on demand for customers who own one of the two available library packages.
Loading...