API Reference v9.2.0

FilterChangerclass

Module: ZaberMotionMicroscopy

A generic turret device.

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 filterChanger = microscope.filterChanger
import ZaberMotionAscii
import ZaberMotionMicroscopy

let connection = try await Connection.openSerialPort(portName: "COM3")
let device = try connection.getDevice(deviceAddress: 1)
let filterChanger = FilterChanger(device: device)
Related Guides:

Constructor

FilterChanger(device)
Creates instance of `FilterChanger` based on the given device.
Arguments
NameTypeDescription
deviceDeviceThe base device of this turret.

Properties

p

device

readonly
filterChanger.device
Device The base device of this turret.

Methods

m

change()

asyncthrows
try await filterChanger.change(filter)
Changes to the specified filter.
Arguments
NameTypeDescription
filterIntFilter number starting from 1.
m

getCurrentFilter()

asyncthrows
try await filterChanger.getCurrentFilter()
Returns the current filter number starting from 1. The value of 0 indicates that the position is either unknown or between two filters.
Return Value
Int Filter number starting from 1 or 0 if the position cannot be determined.
m

getNumberOfFilters()

asyncthrows
try await filterChanger.getNumberOfFilters()
Gets number of filters of the changer.
Return Value
Int Number of positions.
m

toString()

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