DppApi VB Development

Many resources are available for rapid DppApi Visual Basic development. Examples provide cut/paste solutions for rapid application development. Below is a list of examples demonstrating the DppApi.

  • CfgEdit - Configuration Editor

  • DP5BootManager – DP5 Boot Options Manager

  • dp5loader - DP5 Upload Utility

  • MultiUSB - DPPAPI Demonstration Project

  • ReadDpps - MultiUSB Read DPP Status and Data

  • PathTool - Amptek Path Utility

  • PC5 - PX4 SDD, DP5, PC5 Function Example

  • Plot2Cfg - Spectrum Configuration Extraction Utility

  • SavePlot - Save 10 Second Preset Spectrum Plot

  • tbarADMCA - ADMCA Toolbar Remote Control

  • vbDppApi - DPPAPI Demonstration Project

  • XLCfg - Spreadsheet Configuration Utility

  • Demonstrates DppApi control of Amptek USB DPP devices.

  • Visual Basic 5 source code.


Configuration Editor

CfgEdit - Configuration Editor

  • Edits Amptek DPP Configurations.

  • Communicates to USB DPP devices.

  • Sends/Receives DPP configurations through USB.

  • Reads/Writes/Edits DPP configuration files.

  • Visual Basic 5 source code.

  • Includes Edit Configuration Dialog.

Edit Configuration Dialog


DP5 Boot Options Manager

DP5BootManager – DP5 Boot Options Manager

  • Communicates to USB DP5 DPPs

  • Reads/Writes/Edits USB DP5 Boot Options

  • Reads USB DP5 Configuration and Status

  • Visual Basic 5 source code.

  • Includes DP5 Boot Flag Dialog.

DP5 Boot Flag Dialog


DP5 Upload Utility

dp5loader - DP5 Upload Utility

  • Uploads/Updates DP5 FPGA and microcontroller firmware through the RS232 interface.

  • Communicates to DP5 through serial communications port.

  • Scans PC for available RS232 COM port.

  • Checks DP5 communications and automatically selects baud rate.

  • Reads DP5 status.

  • Visual Basic 5 source code.


MultiUSB - DPPAPI Demonstration Project

  • Finds connected USB DPP devices.

  • Select a USB DPP device from a list of connected devices.

    • Select DPP from connected device list.

  • Acquires spectrum data.

  • Acquires repeat measurement spectrum data.

    • Select DPP from connected device list.

    • Set preset time.

    • Set Repeat Measurements loops and delay.

    • Press Start Repeat Measurements button.

  • Reads/displays DPP status.

  • Reads/displays DPP configuration.

  • Sends/Receives DPP configurations through USB.

  • Edits DPP configurations.

  • Visual Basic 5 source code.

  • MultiUSB Repeat Spectrum.

  • MultiUSB Acquiring Data.

  • MultiUSB Display Configuration.

  • MultiUSB Selecting a DPP.

MultiUSB Repeat Spectrum

MultiUSB Acquiring Data

MultiUSB Display Configuration

MultiUSB Selecting a DPP


MultiUSB Read DPP Status and Data

ReadDpps - MultiUSB Read DPP Status and Data

  • Finds connected USB DPP devices.

  • Select a USB DPP device from a list of connected devices.

    • Double-click on connected device list DPP to select.

  • Reads/displays DPP status.

  • Reads DPP configuration.

  • Acquires spectrum data.

  • Visual Basic 5 source code.

  • Example status and spectrum.

Selected DPP Status and Spectrum


Amptek Path Utility

PathTool - Amptek Path Utility

  • Manages DLL path access to development applications.

  • Works with most development environments.

  • Right Click Application Paths List Menu.

    • Run File

    • Properties

    • Find File

  • Right Click Amptek Common Files Directory Menu.

    • Properties

    • Find File

  • Customize for specific development tasks.

  • Visual Basic 5 source code.


PX4 SDD, DP5, PC5 Function Example

PC5 - PX4 SDD, DP5, PC5 Function Example

  • PX4 SDD Negative HV detect.

  • Detects DP5 PC5.

  • Detects DP5 PreAmp setting.

  • Detects DP5 HV polarity.

  • Checks for DP5 HV polarity error.

  • Visual Basic 5 source code.

  • DP5 Get Text example.

DP5 Status With PC5 Detect

DP5 Get Text


Spectrum Configuration Extraction Utility

Plot2Cfg - Spectrum Configuration Extraction Utility

  • Create configurations from Excel Spreadsheet or Amptek DPP MCA Spectrum file.

  • Extract configuration from Amptek DPP MCA Spectrum file.

  • Convert Excel configuration list to configuration files.

  • Creates AmptekDC.ini entries for ADMCA configuration drop-down list.

  • Test configurations from Excel Spreadsheet or Amptek DPP MCA Spectrum file.

  • Visual Basic 5 source code.


SavePlot - Save 10 Second Preset Spectrum Plot

  • Saves 10 Second Data Spectrum.

  • Reads DPP configuration and status.

  • Sets 10 second preset.

  • Acquires spectrum data for 10 seconds.

  • Saves spectrum data to Amptek MCA spectrum file.

  • Visual Basic 5 source code.


ADMCA Toolbar Remote Control

tbarADMCA - ADMCA Toolbar Remote Control

  • Remote controls ADMCA.

  • Programmable commands.

  • Sample test program acquires spectrum data.

  • tbarADMCA Programmable Commands:

    • Clear Spectrum

    • Wait For Seconds

    • Start Acquisition

    • Stop Acquisition

    • Save Spectrum

    • Check Acquire Status

  • Test program command edit.

  • Customize for testing.

  • Visual Basic 5 source code.

  • ADMCA Toolbar Remote Control Application

  • tbarADMCA Acquiring Data

  • tbarADMCA Running With ADMCA

  • tbarADMCA Clear Spectrum, Check Acquire Status Commands

ADMCA Toolbar Remote Control Application

tbarADMCA Acquiring Data

tbarADMCA Running With ADMCA

tbarADMCA Clear Spectrum, Check Acquire Status Commands


vbDppApi - DPPAPI Demonstration Project

  • Finds connected USB DPP devices.

  • Select a USB DPP device from a list of connected devices.

    • Select DPP from connected device list.

  • Acquires spectrum data.

  • Reads/displays DPP status.

  • Reads/displays DPP configuration.

  • Sends/Receives DPP configurations through USB.

  • Edits DPP configurations.

  • Visual Basic 5 source code.

  • vbDppApi Acquiring Data.

  • vbDppApi Edit/Display Configuration.

  • vbDppApi Selecting a DPP.

vbDppApi Acquiring Data

vbDppApi Edit/Display Configuration

vbDppApi Selecting a DPP


Spreadsheet Configuration Utility

XLCfg - Spreadsheet Configuration Utility

  • Create configurations from Excel Spreadsheet.

  • Creates Excel configuration list from Amptek DPP CFG configuration files.

  • Converts Excel configuration list to configuration files.

  • Creates AmptekDC.ini entries for ADMCA configuration drop-down list.

  • Test configurations from Excel Spreadsheet.

  • Visual Basic 5 source code.


DP5 20MHz Configuration Spreadsheet Example

Filename | DP5_20MHzXL
Description | DP5_20MHzXL
Current COM Port | USB
Rise | 12.8uS
Top | 0.4uS
FastChThreshold | 58
PUR Enable | Off
RTD ON/OFF | Off
RTD Ratio | 0.0%
RTD Slow Thresh | 19%
AutoBaseline | Off
BLR | 16 4
MCA Channels | 1024
SlowChThreshold | 11.82%
Buffer Select | Buffer A
Gate Input (TTL) | GateOff
Preset | None
Coarse Gain | 102.01
Fine Gain | 0.999
Input Polarity | Negative
InputOffset | 0.077V
PoleZero | OFF
Det Rst Lockout | 3.28mS
TEC | 226.2K
HV | 159.7V
Preamp Power | 8.5V
Analog Out | Shaped Pulse
Offset | 101mV
Aux | ICR
Audio | Off
DPP Type | DP5


DP5 80MHz Configuration Spreadsheet Example

Filename | DP5_80MHzXL
Description | DP5_80MHzXL
Current COM Port | USB
Rise | 3.2uS
Top | 0.1uS
FastChThreshold | 58
PUR Enable | Off
RTD ON/OFF | Off
RTD Ratio | 0.0%
RTD Slow Thresh | 19%
AutoBaseline | Off
BLR | 64 16
MCA Channels | 1024
SlowChThreshold | 11.82%
Buffer Select | Buffer A
Gate Input (TTL) | GateOff
Preset | None
Coarse Gain | 102.01x
Fine Gain | 0.999
Input Polarity | Negative
InputOffset | 0.077V
PoleZero | OFF
Det Rst Lockout | 819uS
TEC | 226.2K
HV | 159.7V
Preamp Power | 8.5V
Analog Out | Shaped Pulse
Offset | 101mV
Aux | ICR
Audio | Off
DPP Type | DP5


PX4 Configuration Spreadsheet Example

Filename | PX4_Test_XL
Description | PX4_Test_XL
Current COM Port | USB
Rise | 12.8uS
Top | 0.4uS
FastChThreshold | 58
PUR Enable | Off
RTD ON/OFF | Off
RTD threshold | 0.00%
RTD Fast HWHM | 10
AutoBaseline | Off
BLR | 16 4
MCA Channels | 1024
SlowChThreshold | 5.37%
Buffer Select | Buffer A
Gate Input (TTL) | GateOff
Preset | None
Coarse Gain | 91.86
Fine Gain | 0.999
Input Polarity | Negative
InputOffset | 0.077V
PoleZero | OFF
Det Rst Lockout | 3.28mS
TEC | 226.2K
HV | 159.7V
Preamp Power | 8.5V
Analog Out | Shaped Pulse
Offset | 101mV
Aux | ICR
Audio | Off
DPP Type | PX4


-------------------------------
MultiUSB DppApi Version 1.0.1.4
-------------------------------
(C) Amptek Inc. 2007

-----------------------------
Important MultiUSB Functions:
-----------------------------

OpenUSBDeviceEx
GetUSBDppDeviceInfo

---------------------
MultiUSB Directories:
---------------------
   MultiUSB Demonstration Project:
    ~\DPPAPI\vb\MultiUSB\MultiUSB

   MultiUSB DPPAPI (Preliminary) Reference:
    ~\DPPAPI\vb\MultiUSB\MultiUSB API Reference

   ReadDpps Demonstration Project:
    ~\DPPAPI\vb\MultiUSB\ReadDpps

---------------------------
Demonstration Applications:
---------------------------
    MultiUSB - Run repeated spectrum acquisitions from a selected device.
    ReadDpp - Reads running DPPs, displays device status.

------------------------------------
How to connect to a specific device:
------------------------------------

1.) Get the number of DPP devices running.
2.) Get device information for each device found.
3.) Connect to the device using the device number.

Notes:
    <> Open only ONE device at a time per application or process.
    <> Always close the open device before connecting to another device.
    <> Always close the open device before terminating the application.

Private Sub cmdGetDevices_Click()
    cmdGetDevices.Enabled = False ' disable button until done
    Dim numdev As Integer ' number of usb devices
    Dim Res As Integer ' number of usb devices
    Dim objDppApi As Long ' pointer to dpp api
    Dim strStatus As String ' status text
    Dim iDeviceType As Integer ' number of acquired channels
    Dim SerNum As Long
    Dim i As Long

    objDppApi = OpenDppApi() ' create/open DPPAPI
    numdev = OpenUSBDevice(objDppApi) ' open communications default USB device
    CloseUSBDevice (objDppApi)                                      ' close usb default device
    If (numdev > 0) Then
        iNumDevices = numdev
        For i = 1 To numdev
            Res = OpenUSBDeviceEx(objDppApi, i)                     ' open selected USB device
            iDeviceType = GetUSBDppDeviceInfo(objDppApi, i, SerNum) ' get device information
            If (iDeviceType = 2) Then
                strStatus = strStatus & Str(i) & " " & "[PX4] " & Str(SerNum) & vbNewLine
            ElseIf (iDeviceType = 1) Then
                strStatus = strStatus & Str(i) & " " & "[DP4] " & Str(SerNum) & vbNewLine
            Else
                strStatus = strStatus & Str(i) & " " & "Device Error" & vbNewLine
            End If
            CloseUSBDevice (objDppApi) ' close usb
        Next
    End If
    txtStatus = strStatus
    CloseDppApi (objDppApi) ' close DPPAPI
    Sleep (750)
    cmdGetDevices.Enabled = True
End Sub


Sample PX4 Configurations in CFG, MCA, and EXCEL formats to test Plot2Cfg
20090429