ScanImage utilizes various data acquisitions subsystems (each bank of Analog Input and Output channels per board comprises a subsystem) during its operation. The start time(s) of the data streams on each of these subsystems must be synchronized for each acquisition. This requires that each of the subsystems 'listen' for a common Start Trigger signal (i.e. a digital rising/falling edge) which initiates the acquisition/generation.
To accomplish this, ScanImage identifies a National Instruments 'programmable function interface' (PFI) terminal (e.g. PFI0, PFI1, etc) which can serve as a 'listener' for a Start Trigger input signal.
Note that all subsystems on each board use the same physical PFI terminal as their trigger input source.
Note that all boards used by ScanImage must use the same PFI terminal number value for a particular acquisition (i.e., if PFI0 is used, it must be used/connected on all boards).
Start Triggering Modes
Every ScanImage acquisition requires a Start Trigger – this can be either Internal or External.
Internal Start Triggering (REQUIRED)
The 'Internal' start triggering mode is the default. In this mode, ScanImage itself generates a single Start Trigger signal that serves as the trigger source for acquisitions.
- This rising-edge Start Trigger output signal is generated by ScanImage on the digital output line specified by the
Unknown macro: {vi-statevar}andUnknown macro: {vi-statevar}values in the INI file.
Port 0 is assumed, i.e. line X implies the digital output P0.X
- The
Unknown macro: {vi-statevar}INI value specifies the input PFI terminal on which to receive the 'Internal' Start Trigger, typically PFI0. This input terminal, on all boards, must be connected to the Start Trigger output generated by ScanImage.
- The 'Internal' trigger mode is used by default for all ScanImage acquisition modes and is always used for:
- FOCUS acquisitions
- Snapshot acquisitions
- Image Stack acquisitions
Typical Wiring Diagrams illustrates the connection of these signals with the default INI values.
Note the Start Trigger output signal can be used to synchronize ScanImage acquisitions with external software, e.g. physiology or sensory stimulus software, provided the external software can accept an external trigger input, i.e. can 'slave' to ScanImage.
External Start Triggering (OPTIONAL)
ScanImage also allows an external trigger source to be used, allowing ScanImage to be 'slaved' to external software, such as that for electrophysiology, sensory stimulation, or behavioral control/monitoring.
- The
Unknown macro: {blue}toggle control on the Main Controls is used to specify that ScanImage should 'listen' for an external, rather than the default 'internal' trigger source.
The
Unknown macro: {blue}setting only applies for GRAB and LOOP acquisitions - excluding [Image Stack] acquisitions. Otherwise, it is ignored and 'internal' triggering is used.
- The
Unknown macro: {blue}value specified on the Triggers panel specifies the input PFI terminal number on which to receive the 'Internal' Start Trigger. This input PFI terminal, on all boards, must be connected to the Start Trigger output generated by ScanImage.
Typical Wiring Diagrams illustrates the connection of an external trigger signal to the default (PFI1) external start trigger input terminal
Trigger Time Logging
The time at which the Start Trigger arrives, initiating an acquisition, is stored as part of the image file header, to aid with analysis, e.g. for aligning image data to separately obtained physiology/stimulus/behavior data. The following header fields are stored:
- Unknown macro: {vi-statevar}: Represents the trigger time of the saved GRAB acquisition or LOOP Repeat as accurately as possible in Matlab date string
format.
- Unknown macro: {vi-statevar}: Represents the trigger time of the saved GRAB acquisition or LOOP Repeat in less-accurate manner, for backward-compatibility, as a Matlab date string
format.
For Image Stack acquisitions, both variables represent the trigger time of first Slice in the stack.
It is highly recommended that users employ the
value