Scope
Configure Scope

Introduction

The hardware you use is selected at compile time via defines in ScopeDefines.h.

Configuration of these hardware components is loaded on program start from an xml file. The same type of file, filled with the parameters set during imaging acquisition, is saved together with any image you record. I.e. parameters like Framerate_Hz which are skipped during xml load during startup are then filled with the correct values.
I recommend to build Scope for your hardware, run it with whatever config and then choose File->Save default configuration. This is then a default configuration file for your hardware which you can adapt to your needs.

All these parameters are inside scope::parameters (have a look there, you find a lot of useful information). Scope uses an instance of this internally, e.g. if you change the zoom slider inside Scope the corresponding value inside scope::ScopeController::GuiParameters is changed automatically (by the scope::ScopeValue magic). This way Scope always has a consistent parameter set (which can easily be saved as an xml).

ScopeDefines.h

See ScopeDefinesExample.h. Copy this file using Windows Explorer, not Visual Studio, to ScopeDefines.h. The ScopeDefines.h is excluded from Git so you can adapt it to your needs. In there you basically define (at compile time) which types of hardware you use in your setup. In the configuration xml file you then configure this hardware (at run time).

As a help against misconfigurations some basic checks are done during compile time in scope::CheckScopeDefines().

XML config file

All parameters are derived from scope::parameters::Base. By using Boost's property_tree library parameters can be saved to and loaded from XML files. Look at scope::parameters for details. On start Scope tries to load a "default.xml" in its directory, if that does not exists it opens a dialog in which you can choose an xml xonfig file. You can easily edit the xml file with the Microsoft XML notepad (download) or with an editor of your choice.

Examples

Example config for a one-area DAQmx system using one NI-6259 card

Example config for a one-area DAQmx system using two NI-6259 cards

Example config for a one-area FPGA/DAQmx system using one NI-6259 card and a NI-7962R FPGA with NI FlexRIO 6587 adapter module (photon counting).

Example config for a one-area resonance scanner FPGA/DAQmx system using one NI-6259 card and a NI-7962R FPGA with NI FlexRIO 5751 adapter module (high-speed digitizer)

Example config for a two-area nbeam FPGA/DAQmx system using two NI-6259 cards and a NI-7962R FPGA with NI FlexRIO 6587 adapter module (digital demultiplexing).

Example config for a one area FPGA/DAQmx system using one NI-6259 card and a NI-7962R FPGA with NI FlexRio 5771 adapter module.

Example config for a two-area nbeam FPGA/DAQmx system using two NI-6259 cards and a NI-7962R FPGA with NI FlexRIO 5771 adapter module (analog/digital demultiplexing).

Tips and tricks

  • If you are using an FPGA for PMT input it should generate a sample clock. Make sure your Outputs are configured for External sampling clock and the correct line to receive it.
  • If you are using multiple areas, make sure both areas use different devices.
  • If you are using an FPGA for PMT input make sure you select not oversampling!