API Reference v9.2.0

Microscopeclass

Module: ZaberMotionMicroscopy

Represent a microscope. Parts of the microscope may or may not be instantiated depending on the configuration. Requires at least Firmware 7.34.

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)
Related Guides:

Constructor

try Microscope(connection, config)throws
Creates instance of `Microscope` from the given config. Parts are instantiated depending on device addresses in the config.
Arguments
NameTypeDescription
connectionConnectionConnection of the microscope.
configMicroscopeConfigThe configuration. The parts of the microscope are instantiated depending on the specified data.

Properties

p

autofocus

readonlyoptional
microscope.autofocus
Autofocus? The autofocus feature.
p

cameraTrigger

readonlyoptional
microscope.cameraTrigger
CameraTrigger? The camera trigger.
p

connection

readonly
microscope.connection
Connection Connection of the microscope.
p

filterChanger

readonlyoptional
microscope.filterChanger
FilterChanger? The filter changer.
p

focusAxis

readonlyoptional
microscope.focusAxis
Axis? The focus axis.
p

illuminator

readonlyoptional
microscope.illuminator
Illuminator? The illuminator.
p

objectiveChanger

readonlyoptional
microscope.objectiveChanger
ObjectiveChanger? The objective changer.
p

plate

readonlyoptional
microscope.plate
AxisGroup? Axis group consisting of X and Y axes representing the plate of the microscope.
p

xAxis

readonlyoptional
microscope.xAxis
Axis? The X axis.
p

yAxis

readonlyoptional
microscope.yAxis
Axis? The Y axis.

Methods

s

find()

asyncthrows
try await Microscope.find(connection, thirdPartyComponents = nil)
Finds a microscope on a connection.
Arguments
NameTypeDescription
connectionConnectionConnection on which to detect the microscope.
thirdPartyComponentsThirdPartyComponents?Third party components of the microscope that cannot be found on the connection.
Return Value
Microscope New instance of microscope.
m

initialize()

asyncthrows
try await microscope.initialize(force = false)
Initializes the microscope. Homes all axes, filter changer, and objective changer if they require it.
Arguments
NameTypeDescription
forceBoolForces all devices to home even when not required.
m

isInitialized()

asyncthrows
try await microscope.isInitialized()
Checks whether the microscope is initialized.
Return Value
Bool True, when the microscope is initialized. False, otherwise.
m

toString()

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