Braun MCA166-USB user manual Appendix 3 Description of the communication DLLs8

Page 35

APPENDIX 3 - Description of the communication DLLs8

A3.1 MS-Windows DLL for communication with one MCA166-USB

The Dynamic Link Library exists as a 16-bit variant (mca_comm.dll) and as a 32-bit variant (mca32com.dll). The DLL must reside in the system directory of Windows or in the same directory as the calling application. In order to include the DLL in your program, you have to use in Visual Basic the file MCA32COM.BAS (valid only for Win32 applications) or in C/C++ the files MCA_COMM.H and MCA_COMM.LIB or MCA32COM.LIB. All functions and structures are declared in these files.

A3.1.1 Initializing and closing the serial communication port

Before you can use any function, the serial communication port must be initialized. Pass to the function COMM_INIT a string with the name of the serial communication port (e.g. ”COM1”). If the return value is unequal zero, the initialization was successful. The serial communication port is unable to initialize if another device (or program) is already using this one. Before you exit your program, you have to close the serial communication port so that it can be used from other programs now. You can use only one communication port at the same time. If you want to change the communication port, you have to close the used communication port before you can initialize another one.

A3.1.2 Sending commands to the MCA

With the function MCA_COMM you can send single firmware commands9 to the MCA. This function is only intended for testing. For the real work with the MCA you should use the other functions (MMCA_ ...) described in chapter A3.1.3. The function MCA_COMM is declared as follows:

in C/C++

 

ERROR_FLAG FAR PASCAL MCA_COMM(

LPSTR command,

 

LPSTR rec_data,

 

unsigned long param1=0,

 

unsigned long param2=0,

 

unsigned long param3=0,

 

unsigned long param4=0);

in Visual Basic

 

Declare Function MCA_COMM Lib "Mca32com" (

ByVal Command$,

 

Received As RECDATA,

 

ByVal Param1&,

 

ByVal Param2&,

 

ByVal Param3&,

 

ByVal Param4&) As Integer

8MCA_COMM.DLL (16 Bit) and MCA32COM.DLL (32 Bit) Version 1.04.0006 for MCA166 Firmware #9901 MCA_COMX.DLL (16 Bit) and MCA32CMX.DLL (32 Bit) Version 1.00.0006 for MCA166 Firmware #9901

9 The firmware commands are described in Appendix 4.

35

Image 35
Contents MCA166-USB Exclusion of liability MCA166-USBTable of Contents Appendix Introduction General Description Users safety informationHardware Switching on Power managementCharging the MCA166-USB Connecting the MCA166-USB to a ComputerConnection of detectors Overview Additional external battery pack and Power PackSoftware UF6 MS-DOS, WinUF6 Spec MS-DOS, WinSPEC WindowsMCS MS-DOS, WinMCS Windows U235 MS-DOS, WinU235 WindowsIdentify RateWinSCAN Source Target MCAPlot and MCAPrintMiscellaneous MCA166-USB parameters for use with different detectorsIsotope Half-life Energy keV Branching ratio % Some of the most important photon energiesAmplifier Technical DataMCA166-USB Hardware Specifications 2 ADC High Voltage Power supplyBattery Preamplifier VoltagesEnvironmental ratings Mechanical specificationComputer Interface Block Diagram of the MCA166-USB Diagrams and pin connectionsHV-Inhibit mode2 Contact SignalContact Voltage Max. Current Troubleshooting Page MCA166-USB $SPECREM File Content ExplanationFile Content Explanation $ROI File Content Explanation $ENERFIT$INPUT File Content $ADC$PRESETS $FASTDISCR 400 $SLOWDISCR$MCSTIME $POWERSTATE$MCSCHANNELS $MCSINPUT$SPECINTEGRAL File Content Explanation $RECCOUNTER$RECERRORCOUNTER File Content Explanation $WINSPECINFOAnalysismga AnalysiscsratioIcod $WINSPECINFOLOT LOT ID MBA File Content Explanation $UF6INSPINFO$WINSCANINFO OUTMBA LOT LOT ID File Content Explanation $INSPINFOArea and the Area Uncertainty Function Appendix 2 MCA166-USB algorithm, formulasSmooth CentroidStrip Appendix 3 Description of the communication DLLs8 MCA166-USB A3.1.3 Functions to work with the MCA Mmcastartacquire MmcaresetMmcacleartime MmcasetmodemcaMmcasetmodemcs MmcaclearmemoryMmcasetpresetintegral MmcasetpresetnoneMmcasetpresetlivetime MmcasetpresetrealtimeMmcasetmcschannel MmcasetadcresdiscrMmcasetroi MmcasetrepeatMmcasetmcsinputdiscr MmcasetmcsinputicrMmcasetmcsinputttl Mmcasetmcainputdirectpos MmcasetgainMmcasetmcainputamplifierpos MmcasetmcainputamplifiernegMmcasetpileuprejection MmcasetthresholdMmcasetshapingtimelow MmcasetshapingtimehighMMCASETPZCVALUE19 MmcasetfastMmcasetslow MMCASETPZCMANUAL18Mmcasethighvoltages MmcasetpreamplifierpowerMmcasetstabilisation MmcasetstabparamMMCASETUF6ROIS MmcasettdfMmcasetuserdata Mmcaqueryuserdata Contents of the Mmca User Date memory21Page Mmcaquerypower Mcastabresult STABSTARTED, Stabactive MmcaquerystateMcamode MODEMCA, Modemcs DTC STABIDLE, StaberrorMcainputadc Adcamplifier ADC Directpos Adcdirectneg Mcainputpol Inputpolaritypositive InputpolaritynegativeMmcaquerysystemdata MMCAQUERYIMAGE36 Mmcaqueryenrichment MmcaqueryspectraMmcaqueryonline MMCAQUERYUF6INFOMMCAQUERYUF6ROIS MmcaquerycentroidMmcaqueryvoltagecurrent Statestop CmdinitCmdstart CmdstopClearmemory = Cleartime Clearroi Clearall CmdsetmodeModemca Modemcs CmdclearLLD, ULD CmdsetpresetsPresetnone Presetreal Presetlive Presetint Presetarea CmdsetadcresdiscrCmdsettimeperchannel CmdsetrepeatCmdsetmcschannel Cmdsetmcainput CmdsetgainCmdsetinputpolarity Cmdsetshapingtime CmdsetmcsinputCmdsetthreshold Cmdsetslow CmdsetpurCmdsetfast Cmdsetpzctimeoffset CmdsetpzcCmdsetstabparam Cmdsetbias CmdsetpreamplifierpowerCmdsetuserdata CmdsettdfCMDSETUF6ROI Cmdqueryimage CmdquerypowerCmdquerystate CmdqueryspectraCmdquerycentroid CmdqueryuserdataCmdsystemdata CMDQUERYUF6ROIS CmdqueryenrichmentAppendix 5 Changing the MCA166-USB Firmware

MCA166-USB specifications

The Braun MCA166-USB is a compact and versatile charging device designed for modern lifestyles. This product expertly combines functionality with portability, making it an essential accessory for people on the go. One of the key features of the Braun MCA166-USB is its dual charging capability. It comes equipped with multiple USB ports, allowing users to charge various devices simultaneously, from smartphones to tablets. This multi-device functionality eliminates the need for multiple chargers cluttering your workspace or travel bag.

The device supports fast charging technology, which is particularly beneficial for users who need quick power boosts. With a maximum output of 2.4A per port, the Braun MCA166-USB ensures that your devices are energized swiftly, reducing downtime and keeping you connected during busy days. Additionally, the device is compatible with a wide range of charging protocols, offering versatility for different brands and models.

The Braun MCA166-USB features an intelligent charging system that recognizes the connected device and delivers the optimal charging current. This not only enhances the efficiency of charging but also protects your devices from any potential damage caused by overcharging.

Constructed with a sleek and sturdy design, the Braun MCA166-USB is not just about functionality; it is also aesthetically pleasing. Its compact size makes it perfect for portability, easily fitting into a pocket or small bag. The durability of the materials used ensures that the charger withstands the rigors of travel while remaining stylish.

Another highlight of the Braun MCA166-USB is its safety features. It incorporates multiple protection mechanisms, including short-circuit prevention and temperature control, ensuring a safe charging environment for your devices.

In summary, the Braun MCA166-USB emerges as an innovative solution for those seeking a reliable charging option. Its robust features, such as dual USB ports, fast charging capabilities, intelligent charging control, and safety measures, make it an ideal choice for anyone looking to stay powered up while balancing a busy lifestyle. With its sleek design and durable construction, the Braun MCA166-USB undoubtedly stands out as a multifaceted charging device for the modern user.