User manual
Windows Server Program
ComTec GmbH 5-32
5.6. Controlling the MPA-3 Windows Server via DLL
The MPA3 server program provides - via a DLL („dynamic link library“) - access to all functions,
parameters and data. So the server can be completely controlled from the MPANT software that
provides all necessary graphic displays.
In the following some parts of the header files of the DMPA3.DLL are listed, that may help an
experienced programmer to use the DLL for own written applications. Please note that the
complete documented source code of the DLL including fundamental VIs and an example VI for
LabVIEW and example program in Visual Basic is available as an option.
#define ST_LIVETIME 0
#define ST_DEADTIME 1
#define ST_TOTALSUM 2
#define ST_ROISUM 3
#define ST_TOTALRATE 4
#define ST_NETSUM 5
typedef struct{
double cnt[6]; // ADC status: Livetime in msec,
// Deadtime in percent,
// total sum, roi sum, total rate, net sum
unsigned long val; // Maximum value in spectrum
} ACQSTATUS;
#define ST_REALTIME 0
#define ST_RUNTIME 1
#define ST_SINGLESUM 2
#define ST_COINCSUM 3
#define ST_SGLRATE 4
#define ST_COIRATE 5
// MPA status: real time in sec,
// elapsed computer-runtime, total single events
// total coinc events, rate of single events, rate of coinc events
// aquisition status: 0= HALT, 1= ON
typedef struct {
long savedata; // 1 if auto save after stop
long autoinc; // 1 if auto increment filename
long fmt; // format type: 0 == ASCII, 1 == binary,
// 2 == GANAAS
long sepfmt; // format for seperate spectra:
long sephead; // seperate Header
long smpts;
long caluse;
char filename[256];
char specfile[256];
char command[256];
} DATSETTING;
typedef struct{
long range; // spectrum length
long prena; // bit 0: lifetime preset enabled
// bit 1: ROI preset enabled
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 POS: LOWORD=x, HIGHWORD=y
long offset; // zoomed MAPS: LOWORD: xoffset,
// HIGHWORD, yoffset
long xdim; // x resolution of maps