API Reference v9.2.0
WdiAutofocusProviderclass
Module: ZaberMotionMicroscopy
Class representing access to WDI Autofocus connection.
The following example illustrates how you can obtain an instance of this type:
import ZaberMotionMicroscopy
let wdiAutofocusProvider = try await WdiAutofocusProvider.openTcp(hostName: "169.254.64.162")Related Guides:
Index
cConstants
pProperties
Constants
c
Properties
p
try wdiAutofocusProvider.firmwareVersionFirmwareVersion The firmware version of the connected autofocus.p
Methods
m
try await wdiAutofocusProvider.genericRead(registerId, size, count = 1, offset = 0, registerBank = "U")Generic read operation.
Arguments
| Name | Type | Description |
|---|---|---|
| registerId | Int | Register address to read from. |
| size | Int | Data size to read. Valid values are (1,2,4). Determines the data type (Byte, Word, DWord). |
| count | Int | Number of values to read (defaults to 1). |
| offset | Int | Offset within the register (defaults to 0). |
| registerBank | String | Register bank letter (defaults to U for user bank). |
Return Value
[Int] Array of integers read from the device.m
try await wdiAutofocusProvider.genericReadFloat(registerId, count = 1, offset = 0, registerBank = "U")Generic read operation.
Arguments
| Name | Type | Description |
|---|---|---|
| registerId | Int | Register address to read from. |
| count | Int | Number of values to read (defaults to 1). |
| offset | Int | Offset within the register (defaults to 0). |
| registerBank | String | Register bank letter (defaults to U for user bank). |
Return Value
[Double] Array of floats read from the device.m
try await wdiAutofocusProvider.genericWrite(registerId, size = 0, data = [], offset = 0, registerBank = "U")Generic write operation.
Arguments
| Name | Type | Description |
|---|---|---|
| registerId | Int | Register address to write to. |
| size | Int | Data size to write. Valid values are (0,1,2,4). Determines the data type (Nil, Byte, Word, DWord). |
| data | [Int] | Array of values to write to the register. Empty array is allowed. |
| offset | Int | Offset within the register (defaults to 0). |
| registerBank | String | Register bank letter (defaults to U for user bank). |
m
try await wdiAutofocusProvider.genericWriteFloat(registerId, data = [], offset = 0, registerBank = "U")Generic write operation.
Arguments
| Name | Type | Description |
|---|---|---|
| registerId | Int | Register address to write to. |
| data | [Double] | Array of values to write to the register. Empty array is allowed. |
| offset | Int | Offset within the register (defaults to 0). |
| registerBank | String | Register bank letter (defaults to U for user bank). |
m
try await wdiAutofocusProvider.getStatus()Gets the status of the autofocus.
Return Value
WdiAutofocusProviderStatus The status of the autofocus.s
try await WdiAutofocusProvider.openTcp(hostName, port = WdiAutofocusProvider.defaultTcpPort)Opens a TCP connection to WDI autofocus.
Arguments
| Name | Type | Description |
|---|---|---|
| hostName | String | Hostname or IP address. |
| port | Int | Optional port number (defaults to 27). |
Return Value
WdiAutofocusProvider An object representing the autofocus connection.