Skip to content

Code Philosophy and Structure

hherde edited this page Sep 19, 2017 · 4 revisions

Motivation

The goal of this project is to guide users through Inner Tracker (ITk) stave construction. While LabVIEW prefers monitoring functions, facilitated by its parallelizing structure, construction is an inherently ordered process. Given this motivation, it is sensible to coordinate the system's efforts. The code is designed to pass information from monitoring loops (camera feed, XYZ stage, temperature/environmental conditions in the Lab) to the sequential steps facilitated by the user.

Sequential nature of construction poses challenge for LabVIEW's native behavior.

Philosophy

This code is designed to integrate an Aerotech XYZ stage and a camera into a single Stave Assembly System. It operates in three distinct phases: Calibration, Module Placement, and Final Survey. Each phase further subdivides into its substeps, to simplify both code development and maintenance. Its modular nature allows independent testing of each step, and quick replacement of a step as we create improved versions. In general, the code aims to guide users through the stave assembly process, and to track the progress of the current stave's construction.


Stave assembly code design philosophy

Structure

The tree level directory of the code contains:

  • LabVIEW project file, which organizes and tracks LabVIEW's dependencies and compiliations of this code on a given computer. It is essential to launch the code from the project file to prevent damage to the code during compilation.
  • Main VI, BuildThermomechanicalStave, which executes the integrated assembly code to run all steps in design order.
  • README file, briefly summarizing the contents of this wiki's homepage.
  • Subdirectories for each phase:
    • Calibration
    • Module Placement
    • Final Survey
    • Each phase directory subsequently contains all code related to that phase. Generally, subVIs appear in the phase directories in which they are first called, even if they are retrieved across multiple phases.
  • Aerotech Libraries subdirectory, which contains the set of LabVIEW libraries provided by the Aerotech company for use with the BNL XYZ stage. Please replace these libraries with the set specific to your stage in your own instance of the code.
  • Documentation subdirectory, containing information about the code, how to use it, and how to modify it
  • Utils subdirectory, a useful catchall for commonly used tools that may not truly belong to a particular phase. This subdirectory is further broken down.
    • Camera vignetting contains tools to analyze the camera vignetting for assessing the quality of the optical axis alignment.
    • ConfigurationFilesAndTemplates is the directory for configuration files and templates used to build the stave. Configuration files include specific module and gluing patterns, while templates are for any of the pattern matches. The directory's internal structure mirrors the overarching code structure.
    • Controls contains the custom front panel controls. It contains specific directories for controls for the XYZ stage and enums.
    • Lighting_and_Temperature contains VIs for both GPIB- and Arduino-based lighting and temperature controls. v1 of the code is entirely built on GPIB technology, while Arduino-based control of the lights and temperature collection is introduced (and integrated into the code) after version 2.0.
    • Miscellaneous holds assorted other functions, including some legacy code.
    • Standalone is the directory for various assistant codes for visual inspections, specific tests, or recalculating positions based on calibration. They are treated in more detail here.
    • TextReports contains subVIs associated with producing text files.

Clone this wiki locally