API Reference v9.2.0
CameraTriggerclass
Module: ZaberMotionMicroscopy
An abstraction over a device and it's digital output channel.
The following examples illustrate how you can obtain an instance of this type:
Example 1
Example 2
import ZaberMotionAscii
import ZaberMotionMicroscopy
let connection = try await Connection.openSerialPort(portName: "COM3")
let microscope = try await Microscope.find(connection: connection)
let cameraTrigger = microscope.cameraTriggerimport ZaberMotionAscii
import ZaberMotionMicroscopy
let connection = try await Connection.openSerialPort(portName: "COM3")
let device = try connection.getDevice(deviceAddress: 1)
let cameraTrigger = CameraTrigger(device: device, channel: 1)Constructor
CameraTrigger(device, channel)Creates instance of `CameraTrigger` based on the given device and digital output channel.
Arguments
| Name | Type | Description |
|---|---|---|
| device | Device | The device whose digital output triggers the camera. |
| channel | Int | The digital output channel that triggers the camera. |
Properties
p
Methods
m
m
try await cameraTrigger.trigger(pulseWidth, unit = Units.native, wait = true)Triggers the camera. Schedules trigger pulse on the digital output channel. By default, the method waits until the trigger pulse is finished.
Arguments
| Name | Type | Description |
|---|---|---|
| pulseWidth | Double | The time duration of the trigger pulse. Depending on the camera setting, the argument can be use to specify exposure. |
| unit | Units | Units of time. |
| wait | Bool | If false, the method does not wait until the trigger pulse is finished. |