Windows Server Program
ComTec GmbH 4-13
4.4. Controlling the WEBMCA Server via DLL
The WEBMCA 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 MCDWIN
software that provides all necessary graphic displays.
In the following some parts of the header and definition files of the DMCA.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 VI’s and an example VI for
LabVIEW and example program in Visual Basic is available as an option.
typedef struct{
int started; // acquisition status: 1 if running, 0 else
double realtime; // real time in seconds
double totalsum; // total events
double roisum; // events within ROI
double totalrate; // acquired events per second
double nettosum; // ROI sum with background subtracted
double livetime; // Lifetime in seconds
double deadtime; // Dead time in percent
unsigned long maxval; // Maximum value in spectrum
} ACQSTATUS;
typedef struct{
long range; // spectrum length
int rtprena; // 1 if realtime preset enabled, 0 else
int roiprena; // 1 if ROI event preset enabled, 0 else
long roimin; // lower ROI limit
long roimax; // upper limit: roimin <= channel < roimax
double roipreset; // ROI preset value
double rtpreset; // time preset value
int savedata; // 1 if auto save after stop
int fmt; // format type: 0 == ASCII,
// 1 == binary, 2 == GANAAS
int autoinc; // 1 if auto increment filename
int diguse; // (for future use) Optional Parallel Port:
// bit 1: Dig I/O Status
// bit 2: Dig I/O Trigger
// bit 3: Dig I/O Invert polarity
// bit 4: Trigger System2
// bit 5: Trigger System3
// bit 6: Trigger System4
// bit 7: Clear before triggered start
int ltprena; // 1 if livetime preset enabled, 0 else
int outlevel; // (for future use) DAC output level, 0...255
int adcrange; // (for future use) ADC range
int offset; // (for future use) ADC offset
int lowlevel; // (for future use) ADC lower level limit
int uplevel; // (for future use) ADC upper level limit
int dtlevel; // (for future use) ADC DT level
double ltpreset; // live time preset
int nregions; // number of regions
int caluse; // use calibration
double scalpreset; // dummy
int active; // 0 if disabled, 1..4 if active in system 1..4
int calpoints; // number of calibration points
} ACQSETTING;
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
} ACQDATA;