Integration with dotNET-API library Integration with dotNET-API library | HBM

Demo software to read and write command and visualize measurement in VisualStudio using the HBM Common-API

This short example considers a simple software demo for the PMX amplifier connected to a PC/ Laptop running VisualStudio from Microsoft.

Introduction

System requirements

To use the current version of the HBM. API, your PC should have the following minimum requirements:

  • Intel Pentium 1 GHz or equivalent processor
  • Windows® XP (32-Bit or 64-Bit), Windows® VistaTM (32-Bit or 64-Bit) or Windows® 7 (32-Bit or 64-Bit)
  • Microsoft Internet Explorer Version 6.0 (or higher)
  • Main memory (RAM)
  • 512 megabytes for Windows® XP
  • 1024 megabytes for Windows® VistaTM and Windows® 7
  • Graphics card with a resolution of 1024 x 768 Pixel
  • approx. 30 megabytes free space on your hard disk
  • Microsoft or 100% compatible mouse
  • Ethernet interface (10/100 MBit) for connecting the devices

Prerequisites to build a program using HBM. API for .Net:

  • Microsoft Windows XP (or later)
  • Microsoft Visual Studio .Net 2012 (.Net Framework 4.0 or later)
  • HBM DLLs (Hbm.API.Common.dll, Hbm.API.Scan.dll, Hbm.API.SensorDB.dll, VistaDB.4.dll, HBM_Scan.dll, lib_json.dll )
  • DLLs for the HBM-devices you want to use with your program
  • for PMX devices: Hbm.API.PMX.dll

Prerequisites for the use of the HBM. API from within LabVIEW of National Instruments:

  • Microsoft Windows XP (or later)
  • LabVIEW 2009 (or later)
  • HBM DLLs (Hbm.API.Common.dll, Hbm.API.Scan.dll, Hbm.API.SensorDB.dll, VistaDB.4.dll, HBM_Scan.dll, lib_json.dll )
  • DLLs for the HBM-devices you want to use with your program
  • for PMX devices: Hbm.API.PMX.dll

To distribute your program, that uses functions and data types of the Hbm. API, you need to:

  • Install .NET framework 4.0 on the target system
  • Copy the following HBM DLLs together with your program to the target system:
  • HBM DLLs (Hbm.API.Common.dll, Hbm.API.Scan.dll, Hbm.API.SensorDB.dll, VistaDB.4.dll, HBM_Scan.dll, lib_json.dll )
  • DLLs for the HBM-devices you want to use with your program
  • for PMX devices: Hbm.API.PMX.dll

To test the programs make sure that a supported device (e.g. PMX any QuantumX) is properly connected to the same network segment as your PC and the firewall of your PC doesn't block the communication to the device.

Run example

To run the example start VisualStudio and load the project “DemoProject.csproj”.

  • Start the example by pressing the  -button.
  • In the example a connection to a PMX via the Ethernet (TCP/IP) is established. Use the buttons on the left side from Initialize, Register, Scan and connect to the PMX.
  • “Explore” shows all measuring channel in the PMX:

Further functions are to get only a single or continuous measurement data:

The connection can be stopped using the “Disconnect” button.

Further help about all functions and methods of PMX supported in the HBM Common-API is available in the CHM-help-file “CommonDeviceAPI.chm”, which is part of the API.

TIPP

Further help about all functions and methods of PMX supported in the HBM Common-API is available in the CHM-help-file “CommonDeviceAPI.chm”, which is part of the API.

Disclaimer

The example given is intended to illustrate the integration of PMX into LabView via the PMX command-set. This example does not imply any warranty or guarantee.