The EPICS DXP module provides support for the digital signal processor based multichannel analyzers from X-ray Instrumentation Associates (XIA).
DXP currently supports the following hardware
DXP currently supports this hardware under the following operating systems and interfaces:
The features of the EPICS software, compared with software available from XIA are:
The software consists of the following components:
To install the EPICS DXP software with a Saturn on a Windows or Linux computer do the following:
Most users will just download the pre-built binaries. The Windows binaries should run on almost any version of Windows. Windows XP and Windows 2000 have been tested.
The Linux binaries are built with Redhat 3.2.2-5 (WS) and gcc version 3.2.2. These binaries should run on many recent versions of Linux, but this has not been extensively tested.
Building from the source code requires downloading EPICS base and all of the required synApps components. In addition, to build from source code on Windows requires the gcc, g++, perl and make packages from Cygwin. It is beyond the scope of this document to describe how to build the source code. Consult other EPICS documentation for this.
To use the EPICS DXP software with a Saturn on a Windows PC do the following:
$ cd /cygdrive/c/epics # Or wherever you have chosen to put the EPICS software $ tar xzvf dxpStandalone_2-5.tar # Unpack the tar file.
$ cd dxp/iocBoot/iocSaturn $ dos2unix *.fdd *iniThis is necessary because these files may have Windows line terminators, depending on how they were unpacked from the distribution.
$ cd dxp/iocBoot/iocSaturn $ chmod +x *.batThis is necessary because these files may not have this permission, depending on how they were unpacked from the distribution.
$ mkdir /cygdrive/epics_adls $ find /cygdrive/epics -name '*.adl' -exec cp -f -p -v {} /cygdrive/epics_adls \;Define the environment variable EPICS_DISPLAY_PATH to point to C:\epics_adls. For the Windows shell use the Windows Control Panel/System/Advanced/Environment Variables. For the Cygwin shell edit your .bashrc file.
To use the EPICS DXP software with a Saturn on a Linux computer do the following:
> cd dxp/iocBoot/iocSaturn > dos2unix *.fdd *iniThis is necessary because these files may have Windows line terminators, depending on how they were unpacked from the distribution.
$ mkdir /home/epics/epics_adls $ find /home/epics/epics -name '*.adl' -exec cp -f -p -v {} /home/epics/epics_adls \;Define the environment variable EPICS_DISPLAY_PATH to point to /home/epics/epics_adls. Do this by editing your .cshrc or .bashrc file.
> cd dxp/bin/linux-x86 > su root (password) > chmod +s startWithIopl3 > exitThe dxpApp application can then be run without root privilege as follows:
> cd dxp/iocBoot/iocSaturn > ../../bin/linux-x86/startWithIopl3 ../../bin/linux-x86/dxpApp st.cmdYou can also copy startWithIopl3 to a directory like /usr/local/bin or ~/bin that is in your PATH. That way it can be run without having to specify the path.
> cd dxp/bin/linux-x86 > su root (password) > chmod +s /bin/linux-x86/dxpApp > exitThe dxpApp application can then be run without root priviledge as follows:
> cd dxp/iocBoot/iocSaturn > ../../bin/linux-x86/dxpApp st.cmd
> cd dxp/iocBoot/iocSaturn > su root (password) > ../../bin/linux-x86/dxpApp st.cmd
$ cd dxp/iocBoot/iocSaturn $ chmod +x START_IOC*This is necessary because these files may not have this permission, depending on how they were unpacked from the distribution.
There are several things that should be done to run Saturn system under the EPICS software.
> cd dxp/iocBoot/iocSaturn > ./START_IOCYou may need to edit the START_IOC script depending on how you chose to solve the root priviledge problem, and whether startWithIopl3 is in your path. You should see the EPICS IOC commands, and you should hear clicking sounds from the Saturn. If everything works correctly, you can then begin to collect and display spectra.
After verifying that you can control the Saturn from medm there are some things you should do to customize your installation. First, you should edit one of the supplied example .ini files, vortex.ini file (for reset pre-amps) or ketek.ini (for RC pre-amps). You need to set the polarity, the pre-amp gain, and the time after reset (for reset pre-amps) or the RC time constant (for RC pre-amps). Consult the Saturn User's Manual for information on how to determine and set these parameters.
The .ini files will contain lines like the following:
type_value = 10. channel0_gain = 1.7 channel0_polarity = +
The example IOC directory, iocSaturn, creates EPICS process variables with names like dxpSaturn:dxp1.PKTIM, where dxpSaturn is the "prefix" for the process variable names, dxp1 is the DXP record name, and PKTIM is the field name. This is fine for installations where there will be at most one Saturn on the subnet. However, in many cases there will be the possibility of more than one Saturn running EPICS on the same subnet. If this is the case then it is essential that each one use a different prefix, because EPICS process variable names must be unique on a subnet. Here is how to give your Saturn a unique name, and still be able to upgrade the EPICS software easily. It is recommended that you follow these instructions even if you don't have name conflicts on your IOC, so that files you edit are in a directory that will not be overwritten when you upgrade the EPICS software.
The EPICS DXP application uses the EPICS save/restore facility. This means that all of the important parameters that you might change when running the Saturn are saved in files in the subdirectory called autosave/ under your IOC directory. These parameters include the peaking time, the update rates for displays and nearly 200 other parameters. The next time you start EPICS it will restore these values automatically from the file called autosave/auto_settings.sav. It is a good idea to make copies of this file from time to time so that you can get back to old settings if the file is lost or corrupted.
######################################### < envPaths # Tell EPICS all about the record types, device-support modules, drivers, # etc. in this build from dxpApp dbLoadDatabase("../../dbd/dxp.dbd") dxp_registerRecordDeviceDriver(pdbbase) # Initialize the XIA software # Set logging level (1=ERROR, 2=WARNING, 3=XXX, 4=DEBUG) xiaSetLogLevel(2) # Execute the following line if you have a Vortex detector or # another detector with a reset pre-amplifier #xiaInit("vortex.ini") xiaInit("vortex40MHz.ini") # Execute the following line if you have a Ketek detector or # another detector with an RC pre-amplifier #xiaInit("ketek.ini") #xiaInit("ketek40MHz.ini") xiaStartSystem # DXPConfig(serverName, ndetectors, ngroups, pollFrequency) DXPConfig("DXP1", 1, 1, 100) # DXP record # Execute the following line if you have a Vortex detector or # another detector with a reset pre-amplifier dbLoadRecords("../../dxpApp/Db/dxp2x_reset.db","P=dxpSaturn:, R=dxp1, INP=@asyn(DXP1 0)") # Execute the following line if you have a Ketek detector or # another detector with an RC pre-amplifier #dbLoadRecords("../../dxpApp/Db/dxp2x_rc.db","P=dxpSaturn:, R=dxp1, INP=@asyn(DXP1 0)") # MCA record dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=dxpSaturn:, M=mca1, DTYP=asynMCA,INP=@asyn(DXP1 0),NCHAN=2048") dbLoadRecords("../../dxpApp/Db/mcaCallback.db", "P=dxpSaturn:, M=mca1,INP=@asyn(DXP1 0)") # Template to copy MCA ROIs to DXP SCAs dbLoadTemplate("roi_to_sca.substitutions") # Setup for save_restore < ../save_restore.cmd save_restoreSet_status_prefix("dxpSaturn:") dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=dxpSaturn:") set_pass0_restoreFile("auto_settings.sav") set_pass1_restoreFile("auto_settings.sav") ### Scan-support software # crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches # 1D data, but it doesn't store anything to disk. (See 'saveData' below for that.) dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db","P=dxpSaturn:,MAXPTS1=2000,MAXPTS2=1000,MAXPTS3=10,MAXPTS4=10,MAXPTSH=2048") # Debugging flags #asynSetTraceMask DXP1 0 255 #var mcaRecordDebug 10 #var dxpRecordDebug 10 iocInit ### Start up the autosave task and tell it what to do. # Save settings every thirty seconds create_monitor_set("auto_settings.req", 30, P=dxpSaturn:) ### Start the saveData task. saveData_Init("saveData.req", "P=dxpSaturn:") #########################################Here are some comments on the commands in this file.
######################################### < envPaths #########################################This command loads the envPaths file that defines the paths to other EPICS modules. You will need to edit this file if you installed the pre-built binaries rather than building from source code.
######################################### dbLoadDatabase("../../dbd/dxp.dbd") dxp_registerRecordDeviceDriver(pdbbase) #########################################These commands load the EPICS database definition files.
######################################### xiaSetLogLevel(2) # Execute the following line if you have a Vortex detector or # another detector with a reset pre-amplifier #xiaInit("vortex.ini") xiaInit("vortex40MHz.ini") # Execute the following line if you have a Ketek detector or # another detector with an RC pre-amplifier #xiaInit("ketek.ini") #xiaInit("ketek40MHz.ini") xiaStartSystem #########################################These commands set the logging (debugging) level for the XIA Handel software. It initializes the XIA software with the appropriate .ini file, and then starts the XIA software. You will hear clicking in the Saturn box when the xiaStartSystem command is executing.
######################################### # DXPConfig(serverName, ndetectors, ngroups, pollFrequency) DXPConfig("DXP1", 1, 1, 100) #########################################This command starts the EPICS "asyn" server called DXP1. It defines the number of detectors in the system, and the number of detector groups. We use 1 detector group (containing all of the detectors) to efficiently do operations that should be done on all detectors simultaneously. The pollFrequency determines the rate at which the poller thread will check for acquisition complete. 100 Hz is typical, it does not put a significant load on the system, but reduces the average latency in determining when the run is complete to 5ms.
######################################### # DXP record # Execute the following line if you have a Vortex detector or # another detector with a reset pre-amplifier dbLoadRecords("../../dxpApp/Db/dxp2x_reset.db","P=dxpSaturn:, R=dxp1, INP=@asyn(DXP1 0)") # Execute the following line if you have a Ketek detector or # another detector with an RC pre-amplifier #dbLoadRecords("../../dxpApp/Db/dxp2x_rc.db","P=dxpSaturn:, R=dxp1, INP=@asyn(DXP1 0)") # MCA record dbLoadRecords("$(MCA)/mcaApp/Db/mca.db", "P=dxpSaturn:, M=mca1, DTYP=asynMCA,INP=@asyn(DXP1 0),NCHAN=2048") dbLoadRecords("../../dxpApp/Db/mcaCallback.db", "P=dxpSaturn:, M=mca1,INP=@asyn(DXP1 0)") # Template to copy MCA ROIs to DXP SCAs dbLoadTemplate("roi_to_sca.substitutions") #########################################These commands load the EPICS databases for the MCA and DXP records. The names of the PV, the number of MCA channels, and the type of detector pre-amp are all chosen in these commands. The mcaCallback.db file is used with the poller to cause the MCA records to read data when acquisition completes.
######################################### # Setup for save_restore < ../save_restore.cmd save_restoreSet_status_prefix("dxpSaturn:") dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=dxpSaturn:") set_pass0_restoreFile("auto_settings.sav") set_pass1_restoreFile("auto_settings.sav") ### Scan-support software # crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches # 1D data, but it doesn't store anything to disk. (See 'saveData' below for that.) dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db","P=dxpSaturn:,MAXPTS1=2000,MAXPTS2=1000,MAXPTS3=10,MAXPTS4=10,MAXPTSH=2048") #########################################These commands initialize the save/restore system that remembers changes in parameter settings when the IOC is rebooted. They load the databases for general purpose scanning to be done in the IOC. The maximum number of points in each nested scan is defined here, as is the maximum number of channels of MCA data that can be stored in the scanH record.
######################################### # Debugging flags #asynSetTraceMask DXP1 0 255 #var mcaRecordDebug 10 #var dxpRecordDebug 10 #########################################These commands set the debugging level of the EPICS software. asynSetTraceMask controls the debugging in drvDXP and devDXP. This uses the asynTrace facility, with different bits turning on different types of output. 1 turns on only error reporting, 255 turns on all messages. mcaRecordDebug and dxpRecordDebug turn on messages from the mcaRecord and dxpRecord respectively. 0 turns off messages, 10 turns on all messages.
######################################### iocInit ### Start up the autosave task and tell it what to do. # Save settings every thirty seconds create_monitor_set("auto_settings.req", 30, P=dxpSaturn:) ### Start the saveData task. saveData_Init("saveData.req", "P=dxpSaturn:") #########################################These commands start the EPICS software (iocInit), and start the save/restore software saving parameters every 30 seconds, and start the task that saves data from the scan records. Edit the file saveData.req to change what additional EPICS PVs are saved with every scan. You might want to include the MCA record energy calibration fields, etc.
Note that there is a different startup scripts, st_med.st, and a corresonding .adl file, 1element_dxp.adl. This startup script and medm display is almost identical to the st.cmd and single_element_dxp.adl medm display. The difference is that it uses PVs to control acquisition that are compatible with the multi-element databases used by the DXP2X and xMAP. Client software that is configured to work with the multi-element detectors will work with the Saturn if this startup script is used.
The following are screen shots of the medm screens provided for the Saturn.
Main control screen for Saturn.
Complete screen for low-level DXP parameters and control.
Screen for SCA display and control.
Screen to display the spectral data and control acquisition.
Screen to display the baseline histogram and control its update rate.
Screen to display the baseline history and control its update rate.
Screen to display the ADC trace, and control the time per point and update rate.
To install the EPICS DXP software with an xMAP system on a Windows computer do the following:
There are several things that should be done to run xMAP system under the EPICS software.
cd iocBoot/iocXMAP # Or the new directory you created ../../bin/cygin-x86/xmapApp.exe 16element.cmd # Or 4element.cmd, etc.
######################################### < envPaths # Tell EPICS all about the record types, device-support modules, drivers, # etc. in this build from dxpApp dbLoadDatabase("$(DXP)/dbd/dxp.dbd") dxp_registerRecordDeviceDriver(pdbbase) # Setup for save_restore < ../save_restore.cmd save_restoreSet_status_prefix("dxpXMAP:") dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=dxpXMAP:") set_pass0_restoreFile("auto_settings16.sav") set_pass1_restoreFile("auto_settings16.sav") # Set logging level (1=ERROR, 2=WARNING, 3=INFO, 4=DEBUG) xiaSetLogLevel(2) xiaInit("xmap16.ini") xiaStartSystem # DXPConfig(serverName, ndetectors, ngroups, pollFrequency) DXPConfig("DXP1", 16, 1, 100) dbLoadTemplate("16element.template") #xiaSetLogLevel(4) #asynSetTraceMask DXP1 0 255 #asynSetTraceIOMask DXP1 0 2 #var dxpRecordDebug 10 ### Scan-support software # crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches # 1D data, but it doesn't store anything to disk. (See 'saveData' below for that.) dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db","P=dxpXMAP:,MAXPTS1=2000,MAXPTS2=1000,MAXPTS3=10,MAXPTS4=10,MAXPTSH=2048") iocInit seq dxpMED, "P=dxpXMAP:, DXP=dxp, MCA=mca, N_DETECTORS=16" ### Start up the autosave task and tell it what to do. # Save settings every thirty seconds create_monitor_set("auto_settings16.req", 30, "P=dxpXMAP:") ### Start the saveData task. saveData_Init("saveData.req", "P=dxpXMAP:")Here are some comments on the commands in this file.
< envPaths #########################################This command loads the envPaths file that defines the paths to other EPICS modules. You will need to edit this file if you installed the pre-built binaries rather than building from source code.
######################################### # Tell EPICS all about the record types, device-support modules, drivers, # etc. in this build from dxpApp dbLoadDatabase("$(DXP)/dbd/dxp.dbd") dxp_registerRecordDeviceDriver(pdbbase) #########################################These commands load the EPICS database definition files.
######################################### # Setup for save_restore < ../save_restore.cmd save_restoreSet_status_prefix("dxpXMAP:") dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=dxpXMAP:") set_pass0_restoreFile("auto_settings16.sav") set_pass1_restoreFile("auto_settings16.sav") #########################################These commands initialize the save/restore system that remembers changes in parameter settings when the IOC is rebooted.
######################################### # Set logging level (1=ERROR, 2=WARNING, 3=INFO, 4=DEBUG) xiaSetLogLevel(2) xiaInit("xmap16.ini") xiaStartSystem #########################################These commands set the logging (debugging) level for the XIA Handel software. It initializes the XIA software with the appropriate .ini file, and then starts the XIA software. You will hear clicking in the xMAP modules when the xiaStartSystem command is executing. The xamp16.ini file is the same type of file that xManager requires. If you have xManager running on your system you can just copy that .ini file to your IOC directory for EPICS. This file must be edited from the one that is distributed with the EPICS software to define the PCI bus slots in your PXI crate.
######################################### # DXPConfig(serverName, ndetectors, ngroups, pollFrequency) DXPConfig("DXP1", 16, 1, 100) #########################################This command starts the EPICS "asyn" server called DXP1. It defines the number of detectors in the system, and the number of detector groups. We use 1 detector group (containing all of the detectors) to efficiently do operations that should be done on all detectors simultaneously. The pollFrequency determines the rate at which the poller thread will check for acquisition complete. 100 Hz is typical, it does not put a significant load on the system, but reduces the average latency in determining when the run is complete to 5ms.
######################################### dbLoadTemplate("16element.template") #########################################This command loads the template file that in turns loads the databases for the MCA and DXP records. The content of the template file is discussed below.
######################################### # Debugging flags #xiaSetLogLevel(4) #asynSetTraceMask DXP1 0 255 #asynSetTraceIOMask DXP1 0 2 #var dxpRecordDebug 10 #########################################These commands set the debugging level of the EPICS software. asynSetTraceMask controls the debugging in drvDXP and devDXP. This uses the asynTrace facility, with different bits turning on different types of output. 1 turns on only error reporting, 255 turns on all messages. mcaRecordDebug and dxpRecordDebug turn on messages from the mcaRecord and dxpRecord respectively. 0 turns off messages, 10 turns on all messages.
######################################### ### Scan-support software # crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches # 1D data, but it doesn't store anything to disk. (See 'saveData' below for that.) dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db","P=dxpXMAP:,MAXPTS1=2000,MAXPTS2=1000,MAXPTS3=10,MAXPTS4=10,MAXPTSH=2048") #########################################These commands load the databases for general purpose scanning to be done in the IOC. The maximum number of points in each nested scan is defined here, as is the maximum number of channels of MCA data that can be stored in the scanH record.
######################################### iocInit seq dxpMED, "P=dxpXMAP:, DXP=dxp, MCA=mca, N_DETECTORS=16" ### Start up the autosave task and tell it what to do. # Save settings every thirty seconds create_monitor_set("auto_settings16.req", 30, "P=dxpXMAP:") ### Start the saveData task. saveData_Init("saveData.req", "P=dxpXMAP:") #########################################The iocInit start the EPICS software. The seq command starts the dxpMED State-Notation-Language program that implements the "Copy 1 To All" feature for the DXP records. It also copies MCA ROIs to DXP SCAs, and computes combined elapsed and live times, etc. The last two commands start the save/restore task and start the task that saves data from the scan records. Edit the file saveData.req to change what additional EPICS PVs are saved with every scan. You might want to include the MCA record energy calibration fields, etc.
The 16element.template file looks like this:
######################################### file "$(DXP)/dxpApp/Db/dxpMED.db" { pattern {P, MCAALL, INP } {dxpXMAP: mcaAll, "@asyn(DXP1,-1)"} } file "$(MCA)/mcaApp/Db/simple_mca.db" { pattern {P, M, DTYP, INP PREC, CHANS} {dxpXMAP: mca1 "asynMCA", "@asyn(DXP1,0)", 2, 2048} {dxpXMAP: mca2 "asynMCA", "@asyn(DXP1,1)", 2, 2048} {dxpXMAP: mca3 "asynMCA", "@asyn(DXP1,2)", 2, 2048} {dxpXMAP: mca4 "asynMCA", "@asyn(DXP1,3)", 2, 2048} {dxpXMAP: mca5 "asynMCA", "@asyn(DXP1,4)", 2, 2048} {dxpXMAP: mca6 "asynMCA", "@asyn(DXP1,5)", 2, 2048} {dxpXMAP: mca7 "asynMCA", "@asyn(DXP1,6)", 2, 2048} {dxpXMAP: mca8 "asynMCA", "@asyn(DXP1,7)", 2, 2048} {dxpXMAP: mca9 "asynMCA", "@asyn(DXP1,8)", 2, 2048} {dxpXMAP: mca10 "asynMCA", "@asyn(DXP1,9)", 2, 2048} {dxpXMAP: mca11 "asynMCA", "@asyn(DXP1,10)", 2, 2048} {dxpXMAP: mca12 "asynMCA", "@asyn(DXP1,11)", 2, 2048} {dxpXMAP: mca13 "asynMCA", "@asyn(DXP1,12)", 2, 2048} {dxpXMAP: mca14 "asynMCA", "@asyn(DXP1,13)", 2, 2048} {dxpXMAP: mca15 "asynMCA", "@asyn(DXP1,14)", 2, 2048} {dxpXMAP: mca16 "asynMCA", "@asyn(DXP1,15)", 2, 2048} {dxpXMAP: mcaAll "asynMCA", "@asyn(DXP1,-1)", 2, 2048} } # DXP records file "$(DXP)/dxpApp/Db/xmap_reset.db" { pattern {P, R, INP } {dxpXMAP: dxp1 "@asyn(DXP1,0)"} {dxpXMAP: dxp2 "@asyn(DXP1,1)"} {dxpXMAP: dxp3 "@asyn(DXP1,2)"} {dxpXMAP: dxp4 "@asyn(DXP1,3)"} {dxpXMAP: dxp5 "@asyn(DXP1,4)"} {dxpXMAP: dxp6 "@asyn(DXP1,5)"} {dxpXMAP: dxp7 "@asyn(DXP1,6)"} {dxpXMAP: dxp8 "@asyn(DXP1,7)"} {dxpXMAP: dxp9 "@asyn(DXP1,8)"} {dxpXMAP: dxp10 "@asyn(DXP1,9)"} {dxpXMAP: dxp11 "@asyn(DXP1,10)"} {dxpXMAP: dxp12 "@asyn(DXP1,11)"} {dxpXMAP: dxp13 "@asyn(DXP1,12)"} {dxpXMAP: dxp14 "@asyn(DXP1,13)"} {dxpXMAP: dxp15 "@asyn(DXP1,14)"} {dxpXMAP: dxp16 "@asyn(DXP1,15)"} #{dxpXMAP: dxpAll "@asyn(DXP1,-1)"} } #########################################This file defines the mca and DXP records that get loaded. It defines the maximum number of channels in the MCA records. It also loads the multi-element DXP database (dxpMED.db). This database is used with the dxpMED.st SNL program to do collective actions on multiple DXP or MCA records.
Note that there are supplied startup scripts, template files and auto_settings.req files for 4, 8, 12, and 16 channel xMAP systems. If you have a different number of channels you need to create your own files using these as examples. There are currently only medm screens for a 16-element detector system. You will need to copy and edit these for different numbers of detectors. For fewer detectors than 16 you can simply use the 16element files temporarily and ignore the ugly white fields for non-existant records!
The following are screen shots of the medm screens provided for the xMAP.
Main control screen for 16element xMAP system.
Complete screen for low-level DXP parameters and control.
Screen to display trigger counts and events in run, plus ICR and OCR.
Screen to display ROI and SCA counts for a single ROI/SCA on each detector.
Screen to display energy calibration parameters for each detector.
Screen to display preset and elapsed times for each detector.
Screen to display the spectral data for each detector.
Screen to display the baseline histograms and control the update rate.
Screen to display the baseline histories and control the update rate.
Screen to display the ADC traces, and control the time per point and update rate.
This part of the document is not yet complete. R2-5 of the dxp module does not support the DXP2X.
The overall architecture of the EPICS DXP software is shown in the diagram below. At the top level are EPICS Channel Access client applications, such as the IDL MCA Display program, the IDL Multi-Element Detector (MED) Display program, medm, spec, and others.
At the next level is the dxpMED State Notation Language program, which is used to synchronize acquisition and settings for multi-element detectors. This program also uses EPICS Channel Access, but it typically runs in the same EPICS IOC that is controlling the XIA hardware.
Next are the DXP and MCA records, which communicate with device support. In the case of the MCA record, this device support is devMcaAsyn, which is itself device-independent, and talks to drvDxp. The device support for the dxpRecord is specific to the XIA hardware. drvDxp and devDxp both communicate with the XIA Handel library, which calls the XIA Xerxes library. Xerxes calls the machine dependent libraries, md_epics and md_win95, which call the operating system specific hardware libraries to perform the actual low-level I/O.
The poller thread rapidly polls the acquisition status (acquiring or done) while acquisition is in progress. This thread issues callbacks when acquisition is complete to records that have registered with it. It is used to minimize latencies, so that the MCA records will be processed when acquisition completes without the MCA records themselves having to process rapidly. The poll rate is set in the DXPConfig() command in the startup script. It is typically set to 100Hz, which does not significantly load the system, but provides a 5msec average latency in determining when acquisition is complete.
Note that these measurements were made using the simple unbuffered mode on the xMAP. The xMAP has 4MB of onboard memory per channel, and the release 0.9.1 firmware allows one to use this memory to buffer many spectra, in response to a software or hardware trigger signal. This can be used to rapidly acquire many spectra, and then read them out quickly at the end. The EPICS software does not yet support this feature, but will in a future release.
XIA system | Number of detectors | Seconds/1000 scan points | Scan points/second | Total spectra/second | Data rate (MB/second) |
---|---|---|---|---|---|
Saturn on Windows | 1 | 67 | 14.9 | 14.9 | 0.12 |
xMAP on Windows | 4 (1 xMAP) | 45 | 22.2 | 88.9 | 0.73 |
xMAP on Windows | 8 (2 xMAPs) | 53 | 18.9 | 150.9 | 1.24 |
xMAP on Windows | 12 (3 xMAPs) | 60 | 16.7 | 200.0 | 1.64 |
xMAP on Windows | 16 (4 xMAPs) | 67 | 14.9 | 238.8 | 1.96 |