API Reference v9.2.0
IlluminatorChannelclass
Module: ZaberMotionMicroscopy
Use to control a channel (LED lamp) on an illuminator.
Requires at least Firmware 7.09.
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 illuminator = microscope.illuminator
let illuminatorChannel = try illuminator.getChannel(channelNumber: 1)Related Guides:
Index
Properties
p
p
p
p
p
Methods
m
try await illuminatorChannel.genericCommand(command, checkErrors = true, timeout = 0)Sends a generic ASCII command to this channel. For more information refer to: ASCII Protocol Manual.
Arguments
| Name | Type | Description |
|---|---|---|
| command | String | Command and its parameters. |
| checkErrors | Bool | Controls whether to throw an exception when the device rejects the command. |
| timeout | Int | The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout. |
Return Value
Response A response to the command.m
try await illuminatorChannel.genericCommandMultiResponse(command, checkErrors = true, timeout = 0)Sends a generic ASCII command to this channel and expects multiple responses. Responses are returned in order of arrival. For more information refer to: ASCII Protocol Manual.
Arguments
| Name | Type | Description |
|---|---|---|
| command | String | Command and its parameters. |
| checkErrors | Bool | Controls whether to throw an exception when a device rejects the command. |
| timeout | Int | The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout. |
Return Value
[Response] All responses to the command.m
try await illuminatorChannel.genericCommandNoResponse(command)Sends a generic ASCII command to this channel without expecting a response and without adding a message ID For more information refer to: ASCII Protocol Manual.
Arguments
| Name | Type | Description |
|---|---|---|
| command | String | Command and its parameters. |
m
m
m
m
try await illuminatorChannel.on(duration = nil)Turns this channel on.
Arguments
| Name | Type | Description |
|---|---|---|
| duration | Measurement? | Duration for which to turn the channel on. If not specified, the channel remains on until turned off. |
m
m
m
try await illuminatorChannel.setState(state)Applies a saved state to this channel.
Arguments
| Name | Type | Description |
|---|---|---|
| state | String | The state object to apply to this channel. |
Return Value
SetStateAxisResponse Reports of any issues that were handled, but caused the state to not be exactly restored.