vDAQ Multiple Imaging Arm Acquisition

The vDAQ supports imaging from two separate Galvo-Galvo (GG) or Resonant-Galvo-Galvo (RGG) microscope arms simulatenously. With this functionality, one can have multiple imaging arms that are focused in different cortical regions and simulatenously acquire activity images from both arms using a single vDAQ card.

When imaging from two independent imaging arms that are controlled by one vDAQ, two instances of ScanImage will be used. Each instance of ScanImage will have it’s own configuration and Machine Data File (MDF), and will be used to control acquisition from a single arm.

Configuration Procedure

  1. Open one single instance of MATLAB.

  2. Run scanimage and create a new Machine Data File (MDF). Name it accordingly, e.g. MicroscopeArm1.m

  3. Select “Blank Configuration”

    ../_images/NewBlankMDF.png

  4. Add the Galvos, Resonant Scanner, and relevant microscope components for the first imaging arm. If there is only one stage associated with the microscope, it is commonly added to imaging arm 1. In single-stage configurations, only one instance of ScanImage will control the stage (e.g. the ScanImage instance for imaging arm 1).

    ../_images/Arm1Devices.png

  5. (optional) Add a Recolor Guis device to help differentiate this arm’s ScanImage instance from the other instance, then choose the background color for the first arm.

    ../_images/Arm1AddRecolorGuis.png

    ../_images/Arm1ChooseColor.png

  6. Add the vDAQ Scan System for arm 1.

    ../_images/AddVDAQScanSystem.png

  7. Set up the scan system so that it is controlling the components added for arm 1.

    ../_images/Arm1ScanSystem.png

  8. Once you are comfortable with the setup of arm 1, press “cancel” instead of “Start ScanImage” to start the configuration of arm 2.

    ../_images/CancelStartup.png

  9. Run scanimage and create a new MDF for microscope arm 2 (for example MicroscopeArm2.m)

  10. Select “Blank Configuration”

  11. Add the Galvos, Resonant Scanner, and relevant microscope components for the second imaging arm.

  12. (optional) Add a Recolor Guis device to help differentiate this arm’s ScanImage instance from the other instance, then choose the background color for the second arm.

    ../_images/Arm2ChooseColor.png

  13. Add a “vDAQ Advanced Parameters” device. Name it something like “Passive vDAQ Initialization” for context.

    ../_images/AddAdvancedParameters.png

  14. Set the vDAQ Advanced Parameters to configure “vDAQ0”, select bitfile “vDAQR1_SI.dbs”, and make sure the “Passive Initialization” checkbox is checked.

    ../_images/PassiveInitialization.png

  15. Add the vDAQ Scan System and set it up so that it is controlling the components added for arm 2.

    ../_images/Arm2ScanSystem.png

  16. Go to the “Advanced” tab of the vDAQ Scan System configuration and select Acquisition Engine 2, then click apply.

    Warning

    It is important to not change this setting while other instances of ScanImage are running. Please only configure one instance at a time.

    ../_images/Arm2ScanSystem_Advanced.png

  17. Now both acquisition arms are configured. We can proceed to the startup procedure.

It is common to also configure User Settings and User Configuration files for each separate arm. Once ScanImage has been started for the first time, you can configure the system in the way you like, e.g. Window positions, channel configurations, etc. Then you can save those settings by clicking the “Save” buttons in the main window:

../_images/SaveConfiguration.png

Startup Procedure

  1. Open a MATLAB instance for imaging arm 1.

  2. Run scanimage and choose the appropriate Machine Data File (MDF) and the user settings file (if created) for the first arm.

  3. Click Start ScanImage

    ../_images/Arm1Startup.png

  4. While the first arm is starting, open a second MATLAB instance for imaging arm 2.

  5. Wait for the first instance to completely start up. Then run scanimage in the new instance and choose the Machine Data File (MDF) and user settings file created for the second arm.

  6. Click Start ScanImage

    ../_images/Arm2Startup.png

    Note

    Because we selected that arm 2 is the “Passive Initialization” arm, we must start the ScanImage instance for arm 1 first, then arm 2 second.


Helpful Tips

  • It is recommended to use two monitors, and have each ScanImage instance dedicated to it’s own monitor.

  • Recoloring GUIs is highly recommended, it is a quick way to determine exactly which window corresponds to which imaging arm.


Example Window Configurations

../_images/ExampleWindowConfiguration1.png

This example configuration has all of the default Windows included, which can use a lot of screen space. Note how the colors differentiate the ScanImage instances.

../_images/ExampleWindowConfiguration2.png

This example configuration does not include the Channels or Image Controls windows to save on screen room.

Saving window locations across multiple monitors is supported in ScanImage as well, so allocating 1 or more screens per instance of ScanImage is another good way to organize windows.