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 up to two National Instruments 'programmable function interface' (PFI) terminal numbers (e.g. PFI0, PFI1) 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 on all boards).
Triggering Modes
The two PFI terminal numbers (configured in the INI File) correspond to two triggering modes supported by ScanImage-- Internal and External Start Triggering.
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
and
values in the INI file.
Port 0 is assumed, i.e. line X implies the digital output P0.X
- The
INI value specifies the input terminal on which to receive the 'Internal' Start Trigger. This input terminal 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:
acquisitions
- Snapshot acquisitions
- Image Stack acquisitions
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
toggle control on the
is used to specify that ScanImage should 'listen' for an external, rather than the default 'internal' trigger source.
The
setting only applies for
and
acquisitions - excluding Image Stack acquisitions. Otherwise, it is ignored and 'internal' triggering is used.
- The
INI value specifies a list of PFI terminals to be available to ScanImage to listen for an external trigger signal – the active external trigger is then selected from this list in the TRIGGERS.... The external trigger source must be connected to this PFI terminal on each board used by ScanImage.
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:
: Represents the trigger time of the saved GRAB acquisition or LOOP Repeat as accurately as possible in Matlab date string format.
: 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.