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.cameraTrigger
import 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)

Index

pProperties

Constructor

CameraTrigger(device, channel)
Creates instance of `CameraTrigger` based on the given device and digital output channel.
Arguments
NameTypeDescription
deviceDeviceThe device whose digital output triggers the camera.
channelIntThe digital output channel that triggers the camera.

Properties

p

channel

readonly
cameraTrigger.channel
Int The digital output channel that triggers the camera.
p

device

readonly
cameraTrigger.device
Device The device whose digital output triggers the camera.

Methods

m

toString()

throws
try cameraTrigger.toString()
Returns a string that represents the device.
Return Value
String A string that represents the device.
m

trigger()

asyncthrows
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
NameTypeDescription
pulseWidthDoubleThe time duration of the trigger pulse. Depending on the camera setting, the argument can be use to specify exposure.
unitUnitsUnits of time.
waitBoolIf false, the method does not wait until the trigger pulse is finished.