Context: One of my projects involve writing specialized volumetric acquisition algorithms for a custom-built Two-photon microscope. To increase the speed of volume acquisitions based on precise IO from control elements (such as Galvoscanners), I am using an programmable FPGA - a PXI chassis + PXIe-7857R for image acquisition and IO.
The below are notes for setup and development of necessary algorithms for volumetric acquisition.
FPGA based IO module
Setup
- Check if the device is installed properly:
- Make sure all the drivers are installed. Check model name and the associated driver.
- Use NI MAX for PXI devices (especially PXI chassis)
- Load getting started project and compile 01_DIO.vi (or follow this video to create a fresh vi). Use a oscilloscope and a wave generator to check if the outputs are as expected.
- Set up FPGA compile worker:
- Running vivaldo 2021.1 requires Ubuntu 20.04 (for the associated dependencies).
- This forum post indicated that Ubuntu 22.04 might work, so trying that to get continuous security updates.
Resources:
Labview
Basics:
- Main window to add elements and variables. These are generally the source of parameters.
- Block window to connect functionality (and add constants). This adds processing logic between the input and outputs, controlled by the main window parameters.
Notes on ticks and tips that I might forget:
- Highlight Execution: good way of checking the flow of information in a VI
- Debugging: using probes might be a good way to debug complex VIs
- Tools palette - when I need to rewire quickly or remain in a specific tool mode.
- Setting up diff for version control - use TortoiseGit in windows and follow this page.
Design ideas:
- Modularity based on VI with the idea of not repeating yourself.
- Encapsulation and abstraction.
- Frameworks
Storing data:
- TDMS format - LabView data format with multiple advantages including hierarchical structure, binary storage (small foot print), metadata etc. Probably a good format to store the data initially before porting it to other formats.
Misc:
- Subpanel to display subVI control
- Difference between running continuously and using while loop: While loops are preferred as running continuously is essentially equal to start the program multiple times (including program rerunning program start functions).
Resources
- Labview playlist: https://www.youtube.com/playlist?list=PLB968815D7BB78F9C
- Labview FPGA playlist: https://www.youtube.com/playlist?list=PLbCk9hRe-ziECXQjE—fN29C_kcx7CHnA
- Modular design in Labview: https://www.youtube.com/watch?v=f282zhcreMQ&list=PLB968815D7BB78F9C&index=34