API Reference v9.2.0

ObjectiveChangerclass

Module: ZaberMotionMicroscopy

Represents an objective changer of a microscope. Unstable. Expect breaking changes in future releases. Requires at least Firmware 7.32.

The following example illustrates how you can obtain an instance of this type:

import ZaberMotionAscii
import ZaberMotionMicroscopy

let connection = try await Connection.openSerialPort(portName: "COM3")
let microscope = try await Microscope.find(connection: connection)
let objectiveChanger = microscope.objectiveChanger
Related Guides:

Constructor

try ObjectiveChanger(turret, focusAxis)throws
Creates instance of `ObjectiveChanger` based on the given device. If the device is identified, this constructor will ensure it is an objective changer.
Arguments
NameTypeDescription
turretDeviceDevice address of the turret.
focusAxisAxisThe focus axis.

Properties

p

focusAxis

readonly
objectiveChanger.focusAxis
Axis The focus axis.
p

turret

readonly
objectiveChanger.turret
Device Device address of the turret.

Methods

m

change()

asyncthrows
try await objectiveChanger.change(objective, focusOffset = nil)
Changes the objective. Runs a sequence of movements switching from the current objective to the new one. The focus stage moves to the focus datum after the objective change.
Arguments
NameTypeDescription
objectiveIntObjective number starting from 1.
focusOffsetMeasurement?Optional offset from the focus datum.
m

getCurrentObjective()

asyncthrows
try await objectiveChanger.getCurrentObjective()
Returns current objective number starting from 1. The value of 0 indicates that the position is either unknown or between two objectives.
Return Value
Int Current objective number starting from 1 or 0 if not applicable.
m

getFocusDatum()

asyncthrows
try await objectiveChanger.getFocusDatum(unit = Units.native)
Gets the focus datum. The focus datum is the position that the focus stage moves to after an objective change. It is backed by the limit.home.offset setting.
Arguments
NameTypeDescription
unitUnitsUnits of datum.
Return Value
Double The datum.
m

getNumberOfObjectives()

asyncthrows
try await objectiveChanger.getNumberOfObjectives()
Gets number of objectives that the turret can accommodate.
Return Value
Int Number of positions.
m

release()

asyncthrows
try await objectiveChanger.release()
Moves the focus stage out of the turret releasing the current objective.
m

setFocusDatum()

asyncthrows
try await objectiveChanger.setFocusDatum(datum, unit = Units.native)
Sets the focus datum. The focus datum is the position that the focus stage moves to after an objective change. It is backed by the limit.home.offset setting.
Arguments
NameTypeDescription
datumDoubleValue of datum.
unitUnitsUnits of datum.
m

toString()

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