/TCSPC-Instrument-Framework

An object-oriented framework for LabVIEW based on JKI SMOs.

Primary LanguageLabVIEWBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Instrument Framework

Framework developed by the LevyLab research group at the University of Pittsburgh.

Diagram

An Instrument developed using this framework will have access to the following capabilities:

  • Configuration
    • Read and Write configuration files.
  • Hardware Abstraction
    • Interface with hardware in a dedicated process
    • Virtual Instrument layer (In Development)
  • Data Logging
    • Log to a postgreSQL database
  • Remote API allowing external programs to control compiled instances of the application and remotely across a network
  • User Interface
    • Default: Inherit from SMO UI.lvclass
    • Option: Embedded Subpanel UI framework (MAUI) (In Development)

Instrument Framework makes extensive use of JKI State Machines and JKI State Machine Objects.

Getting Started

1. Requirements

2. Initialize your Instrument Framework Project Repository

  1. Navigate to Instrument-Framework-Template and click Use this template.

image

  1. Select the account you want to own the repository using the Owner drop-down menu.
  2. Name your repository
  3. Add an (optional) description.
  4. Choose a repository visibility
  5. Selecting Include all branches will configure Git-flow by default.
  6. Click Create repository from template

image

3. RunMe.vi

image

  • double click "RunMe.vi"
  • a script will execute to rename the framework-template project

4. Repository Description

The following files and folders are created from the Instrument Framework Template:

Instrument X\                     :: Project Root
Instrument X\build support\       :: Files used to build VIP and EXE 
Instrument X\lvsrc\               :: Instrument X.lvproj and all other LabVIEW code goes here
Instrument X\.gitattributes       :: Tell git to treat certain text files as if they are binary
Instrument X\.gitignore           :: Tell git which files and folders to ignore
Instrument X\LICENSE              :: LICENSE file. Default is BSD-3 Clause
Instrument X\README.md            :: Your project README

image

5. Write your code!

image

  • Help can be found in the Documentation.vi included with the Framework-Template
  • Start with the overrides provided in the template SMOs.
  • Add code to interface with your hardware.
  • Define your relevant methods (set inheritance to existing Instrument types).
  • Create a dope UI.
  • Have Fun!

6. Builds

When you are ready to build your project into a VI package, EXE application, or a self-extracting installer, there are a few things to keep in mind.

Build Folders

The following folders are not created by the Template (because they are initially empty folders), but they are important for building to run smoothly.

Instrument X\builds               :: builds root
Instrument X\builds\7z Install
Instrument X\builds\Application   :: Application (exe) Destination Directory
Instrument X\builds\Installer     :: Installer Destination Directory
Instrument X\builds\Latest
Instrument X\builds\Package       :: VIPB Build Output Directory
Build Spec Files

It is important to define and use canonical name for your project right away. In this tutorial I am calling it Instrument X. This is important when setting up your build spec files:

  • VIPB file
    • Used for building VIP Package for API and code reuse in LabVIEW
    • "Product Name" = "Instrument X"
    • "Build Output" = "Instrument X\builds\Package"
  • Application (exe) build spec
    • "Build specification name" = "Instrument X Application"
    • "Application (exe) Destination" = "Instrument X\builds\Application"
  • Installer build spec
    • "Build specification name" = "Instrument X Installer"
    • "Installer Destination" = "Instrument X\builds\Installer"

Documentation

Please read the documentation.

Contributing

Please contact Patrick Irvin

License

BSD-3