Skip to content

openscan-lsm/OpenScan-BH_SPC

Repository files navigation

OpenScan device module for Becker & Hickl Single Photon Counters

How to build

Only x64 builds are currently supported.

  • Install Visual Studio 2019 or later with C++ Desktop Development, Meson, and CMake. Make sure meson, ninja, and cmake are on the PATH.
  • Install Becker-Hickl's TCSPC Package (make sure SPCM and SPCM-DLL are selected).
  • In Git Bash, clone vcpkg (if you do not already have it) and this repo:
git clone https://github.com/microsoft/vcpkg.git
git clone https://github.com/openscan-lsm/OpenScan-BHSPC.git

(Currently, vcpkg is used to obtain libzip conveniently.)

  • Bootstrap vcpkg (if you have not done so yet) and install libzip. This should be done in PowerShell or Command Prompt, not Git Bash:
cd path\to\vcpkg
.\bootstrap-vcpkg -disableMetrics
.\vcpkg install libzip --triplet=x64-windows-static
  • Build OpenScan-BHSPC. This is best done in the Developer PowerShell for VS 2019 (or later), which can be started from the Start Menu (hint: type 'developer powershell' into the Start Menu to search).

Release build (optimized, no debug info):

cd path\to\OpenScan-BHSPC
meson setup builddir -Dvcpkgdir=C:\full\path\to\vcpkg -Db_vscrt=mt --buildtype release
meson compile -C builddir

Debug build (unoptimized, with debug info):

cd path\to\OpenScan-BHSPC
meson setup builddir -Dvcpkgdir=C:\full\path\to\vcpkg -Db_vscrt=mtd --buildtype debug
meson compile -C builddir

This results in the module OpenScanBHSPC.osdev in builddir.

Usage

OpenScanBHSPC.osdev requires two files from the TCSPC Package to be available at runtime:

  • C:\Program Files (x86)\BH\SPCM\DLL\spcm64.dll must be findable by the OS
  • C:\Program Files (x86)\BH\SPCM\scpm.ini must be findable by this library

The primary use case for this project is within Micro-Manager. To use this library within Micro-Manager, it is easiest to copy OpenScanBHSPC.osdev and the two additional files into the micro-manager installation folder.

Simulation

SPC modules can be simulated in OpenScan. Simulation will occur when OpenScan cannot find a physical device, however you must specify which device is being simulated. To do this, edit spcm.ini:

simulation = <your device>     ; 0 - hardware mode(default) ,
                   ; >0 - simulation mode (see spcm_def.h for possible values)

The number <your_device> comes from C:\Program Files (x86)\BH\SPCM\DLL\Spcm_def.h - you can find the list by searching for possible modes of DLL operation.

Code of Conduct

Contributor Covenant

About

OpenScan device module for Becker & Hickl GmbH SPC-150

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7

Languages