Hardware Requirements

Wiring Instructions

Software Installation

ScanImage Installation

  1. Create a ScanImage folder at desired path location (suggestions: C:\Program Files\ScanImage or C:\My Documents\Matlab\ScanImage). Location is hereafter referred to as <ScanImage>.
  2. Extract ZIP file into selected folder, adjusting name as desired to fully describe version. This creates a version folder <ScanImage>\<Version Name>
  3. Launch Matlab and select Set Path... from the File menu
  4. Press the button Add with Subfolders... and, when prompted, select the directory <ScanImage>\<Version Name>. This adds the ScanImage installation contents to the top of Matlab search path.

Configuration Folder Setup

ScanImage 4 requires a root folder for its configuration files, including 3 required Thorlabs configuration files. User can select this folder, hereafter referred to as <Config Root>.

  1. Copy 2 XML files, ThorPMTSettings.xml ThorConfocalSettings.xml , from <ScanImage>\<Version Name>\+dabs\+thorlabs\private\ThorAPI_1_5  to <Config Root>
  2. Copy AlignData.txt file from C:\Program Files\ThorImage to <Config Root>

(tick) Recommended location for <Config Root> is a folder named CONFIG  at  root of the user's Data directory. This is a good way to ensure that configuration data is backed up whenever Data directory is (hopefully!) backed up

For newer systems using the Thorlabs ECU 2 unit, one additional step is required:

  1. Copy 3 files (ThorPMT.dll, ThorPMT_proto.m, ThorPMT_thunk_pcwin64.dll) from <ScanImage>\<Version Name>\+dabs\+thorlabs\private\ThorAPI_1_5\ECU2\x64 to <ScanImage>\<Version Name>\+dabs\+thorlabs\private\ThorAPI_1_5\x64.

Starting ScanImage

  1. Start ScanImage by typing scanimage4. You will be prompted to create or identify a Machine Data File. See next section for discussion.

Machine Data File Configuration

On first startup of ScanImage 4.x, you will be prompted to create or select a Machine Data File (MDF). Choose to create one, selecting desired folder location, e.g. 'C:\DATA\CONFIG\SCANIMAGE'.

This will open a Matlab M file in the Matlab editor containing several assignment statements. Each of the statements includes comments which describe what needs to be set.

File is divided into sections (Matlab 'cells') delimited by comment lines with 2 percent signs, e.g. '%%ScanImage'. Each of these is described in following sections.

After done editing file, save and then restart Matlab. The MDF is read only on Matlab startup. Any subsequent changes to the MDF require a Matlab restart.

%%ScanImage Section

Sections below **OPTIONAL*** pertain to optional hardware, e.g. motor, Pockels, shutter, piezo, etc.

Key things to set:

primaryDeviceIDSpecifies NI device name for primary ScanImage NI board, e.g. 'si4'. All counter channels (0-3) are utilized by ScanImage 4.2 on this board.
extFrameClockTerminalSpecifies PFI terminal (e.g. 0 for PFI0) on which Frame Clock from Thor ECU is connected to all SI 4.2 NI boards.
trigSelfTrigSourceDeviceIDSpecifies NI device name (e.g. 'si4') for board on which ScanImage self-trigger signal is generated.
trigSelfTrigSourceLineIDSpecifies digital output line on Port 0 (e.g. 0 for P0.0) on which ScanImage self-trigger signal is generated.
trigSelfTrigDestinationTerminalSpecifies PFI terminal (e.g. 2 for PFI2) on which all SI 4. NI boards should be connected to the ScanImage self-trigger signal source line.

%%Thorlabs Devices Section

apiCurrentVersion: Set to '1.5'. This is only valid option supported by ScanImage 4.2.

Other Configuration