User manual
Appendix
ComTec GmbH 7-19
7.6.9. Save Settings
Q: However, if you save a config. on the "Range, presets..." you are instructed not to give the extension
"cnf". When you browse the available files you don't see it either. Is it then self evident that the "configfile"
on the online help should look like the one above?
A: The "Browse" button can be used for inspecting the present configuration files and for selecting a
name already present, but if you chose a new name from the Browse dialog you get a message that it is
not present because this dialog is for opening existing files. But you can enter the name "mix1" directly
into the edit line labeled "Setup name" and press "Save Sett.". Now again delete all spectra and reload
the configuration. You will see that the spectra are defined again and also all polygonal ROIs are again
present (use the '+' key). It is not true that you cannot retrieve more than one.
7.6.10. Add spectra
Q: How can I add two 1-D spectra together?
A: See page 5.3 in the manual. To add a particular spectra to another one, first save it into a file using
"Save Display As..." from the MPANT File menu. Now open the Data Operations dialog, chose the
"Selected Spectra" radio button and select the spectra to which you want to add the spectra on disk. Then
"Browse" for the file you want to add and press the "Add" button. It is possible to shift the spectra
according to an energy calibration before it is summed up if both spectra are calibrated and the checkbox
"calibr." is crossed.
Q: Is it possible to define an ROI (maybe same, maybe different) in each of two spectra, and then add
only those ROI together to form a sum, not the complete spectrum.
A: ROIs in dualparameter spectra can be projected to the x- or y-axis and the new spectra showing the
ROI projection can then be saved into a seperated file using "Save Display As.." from the MPANT File
menu. For ROIs in single spectra we have no such built-in capability in the software to save only counts
within a ROI. But using the DLL interface it is possible to access counts within a ROI and process it, we
have such examples included for LabVIEW.
7.6.11. DLL Programming
Q: I am able to start the server from my C++ program using the DLL function ServExec but I cannot get
the status information. What I am doing wrong?
A: It is important that the DLL is loaded first by the Server program and that it is loaded from the same
path by all programs using it. Otherwise it does not work to access the shared memory. In case your test
program is not in C:\MPA3 I recommend to copy the dmpa3.dll into the Windows\System32 directory and
delete it in C:\MPA3. Please make sure that there is nowhere else any file dmpa3.dll. Please remove then
the ServExec(..) from your testprogram and start mpa3.exe by hand before starting your program, or by a
call from your program for example like
{
STARTUPINFO startupinfo = {0};
PROCESS_INFORMATION procinfo = {0};
startupinfo.cb = sizeof(STARTUPINFO);
return
CreateProcess("MPA3.EXE",NULL,NULL,NULL,FALSE,HIGH_PRIORITY_CLASS,NULL,NULL,
&startupinfo,&procinfo);
}
, but before your program loads the DLL. Therefore I recommend not to link the DLL to your program
using a dmpa3.LIB file, but explicitely load it at runtime as demonstrated in our example tstmpa3.c.