Zaber Launcher Tutorials
Zaber Motion Library
Sample Projects
Virtual DeviceDropdown icon
About3D Viewer
AccountDropdown icon
Sign InSign Up
Zaber Motion LibraryGetting StartedHow-to Guides
API Reference
root
zaber_motion.ascii
AlertEventAllAxesAxisAxisGroupAxisIdentityAxisSettingsAxisStorageAxisTypeConnectionConversionFactorDeviceDeviceIdentityDeviceIODeviceIOInfoDeviceSettingsDeviceStorageDigitalOutputActionGetAxisSettingGetAxisSettingResultGetSettingGetSettingResultIoPortLabelIoPortTypeLockstepMeasurementSequenceMessageTypeOscilloscopeOscilloscopeCapturePropertiesOscilloscopeDataOscilloscopeDataSourceParamsetInfoPidTuningPvtPvtAxisDefinitionPvtAxisTypePvtBufferPvtCallActionPvtCancelAllOutputsScheduleActionPvtCancelOutputScheduleActionPvtCsvDataPvtIoPvtModePvtPartialCsvDataPvtPartialPointPvtPartialSequenceItemPvtPointPvtSequencePvtSequenceItemPvtSetAllAnalogOutputsActionPvtSetAllDigitalOutputsActionPvtSetAnalogOutputActionPvtSetDigitalOutputActionResponseServoTunerServoTuningParamServoTuningParamsetSetStateAxisResponseSetStateDeviceResponseSettingConstantsSimpleTuningSimpleTuningParamDefinitionStreamStreamAxisDefinitionStreamAxisTypeStreamBufferStreamIoStreamModeStreamsTransportTriggerTriggerActionTriggerConditionTriggerEnabledStateTriggerOperationTriggersTriggerStateUnknownResponseEventWarningFlagsWarnings
zaber_motion.binary
BinarySettingsCommandCodeConnectionDeviceDeviceIdentityDeviceSettingsDeviceTypeErrorCodeMessageReplyCodeReplyOnlyEventUnknownResponseEvent
zaber_motion.exceptions
MotionLibExceptionBinaryCommandFailedExceptionDataCommandFailedExceptionDataCommandTooLongExceptionDataDeviceAddressConflictExceptionDataDeviceDbFailedExceptionDataDeviceDbInnerErrorGCodeExecutionExceptionDataGCodeSyntaxExceptionDataInvalidPacketExceptionDataInvalidPvtPointInvalidResponseExceptionDataMovementFailedExceptionDataMovementInterruptedExceptionDataOperationFailedExceptionDataPvtExecutionExceptionDataPvtMovementFailedExceptionDataPvtMovementInterruptedExceptionDataSetDeviceStateExceptionDataSetPeripheralStateExceptionDataStreamExecutionExceptionDataStreamMovementFailedExceptionDataStreamMovementInterruptedExceptionData
zaber_motion.gcode
AxisDefinitionAxisMappingAxisTransformationDeviceDefinitionOfflineTranslatorTranslateMessageTranslateResultTranslatorTranslatorConfig
zaber_motion.microscopy
AutofocusAutofocusStatusCameraTriggerFilterChangerIlluminatorIlluminatorChannelMicroscopeMicroscopeConfigObjectiveChangerThirdPartyComponentsWdiAutofocusProviderWdiAutofocusProviderStatus
zaber_motion.product
ProcessProcessControllerProcessControllerModeProcessControllerSourceProcessControllerSourceSensor
zaber_motion
AxisAddressChannelAddressCyclicDirectionDeviceDbSourceDeviceDbSourceTypeDeviceDiscoveryResultDevicePortTypeFirmwareVersionLibraryLogOutputModeMeasurementNamedParameterRotationDirectionToolsUnitConversionDescriptorUnitsUnitTable
SupportBinary Protocol (Legacy)
© 2026 Zaber Technologies Inc.

API Reference v9.0.0

Streamclass

Module: zaber_motion.ascii

A handle for a stream with this number on the device. Streams provide a way to execute or store a sequence of actions. Stream methods append actions to a queue which executes or stores actions in a first in, first out order.

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

from zaber_motion.ascii import Connection

connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)
streams = device.streams
stream = streams.get_stream(1)
Related Guides:
  • Streamed movement

Index

pProperties
axes
device
io
mode
stream_id
mMethods
arc_absolute()
arc_absolute_on()
arc_relative()
arc_relative_on()
call()
check_disabled()
circle_absolute()
circle_absolute_on()
circle_relative()
circle_relative_on()
cork()
disable()
generic_command()
generic_command_batch()
get_max_centripetal_acceleration()
get_max_speed()
get_max_tangential_acceleration()
helix_absolute_on()
helix_relative_on()
ignore_current_discontinuity()
is_busy()
line_absolute()
line_absolute_on()
line_relative()
line_relative_on()
set_hold()
set_max_centripetal_acceleration()
set_max_speed()
set_max_tangential_acceleration()
setup_live()
setup_live_composite()
setup_store()
setup_store_arbitrary_axes()
setup_store_composite()
__repr__()
treat_discontinuities_as_error()
uncork()
wait()
wait_until_idle()

Properties

p

axes

readonly
stream.axes
List[StreamAxisDefinition] An array of axes definitions the stream is set up to control.
p

device

readonly
stream.device
Device Device that controls this stream.
p

io

readonly
stream.io
StreamIo Gets an object that provides access to I/O for this stream.
p

mode

readonly
stream.mode
StreamMode Current mode of the stream.
p

stream_id

readonly
stream.stream_id
int The number that identifies the stream on the device.

Methods

m

arc_absolute()

async available
stream.arc_absolute(rotation_direction, center_x, center_y, end_x, end_y)
Queue an absolute arc movement on the first two axes of the stream. Absolute meaning that the home positions of the axes is treated as the origin.
Arguments
NameTypeDescription
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle on which the arc exists.
center_yMeasurementThe second dimension of the position of the center of the circle on which the arc exists.
end_xMeasurementThe first dimension of the end position of the arc.
end_yMeasurementThe second dimension of the end position of the arc.
m

arc_absolute_on()

async available
stream.arc_absolute_on(target_axes_indices, rotation_direction, center_x, center_y, end_x, end_y)
Queue an absolute arc movement in the stream. The movement will only target the specified subset of axes in the stream. Requires at least Firmware 7.11.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle on which the arc exists.
center_yMeasurementThe second dimension of the position of the center of the circle on which the arc exists.
end_xMeasurementThe first dimension of the end position of the arc.
end_yMeasurementThe second dimension of the end position of the arc.
m

arc_relative()

async available
stream.arc_relative(rotation_direction, center_x, center_y, end_x, end_y)
Queue a relative arc movement on the first two axes of the stream. Relative meaning that the current position of the axes is treated as the origin.
Arguments
NameTypeDescription
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle on which the arc exists.
center_yMeasurementThe second dimension of the position of the center of the circle on which the arc exists.
end_xMeasurementThe first dimension of the end position of the arc.
end_yMeasurementThe second dimension of the end position of the arc.
m

arc_relative_on()

async available
stream.arc_relative_on(target_axes_indices, rotation_direction, center_x, center_y, end_x, end_y)
Queue a relative arc movement in the stream. The movement will only target the specified subset of axes in the stream. Requires at least Firmware 7.11.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle on which the arc exists.
center_yMeasurementThe second dimension of the position of the center of the circle on which the arc exists.
end_xMeasurementThe first dimension of the end position of the arc.
end_yMeasurementThe second dimension of the end position of the arc.
m

call()

async available
stream.call(stream_buffer)
Append the actions in a stream buffer to the queue.
Arguments
NameTypeDescription
stream_bufferStreamBufferThe stream buffer to call.
m

check_disabled()

async available
stream.check_disabled()
Queries the stream status from the device and returns boolean indicating whether the stream is disabled. Useful to determine if streaming was interrupted by other movements.
Return Value
bool True if the stream is disabled.
m

circle_absolute()

async available
stream.circle_absolute(rotation_direction, center_x, center_y)
Queue an absolute circle movement on the first two axes of the stream. Absolute meaning that the home positions of the axes are treated as the origin.
Arguments
NameTypeDescription
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle.
center_yMeasurementThe second dimension of the position of the center of the circle.
m

circle_absolute_on()

async available
stream.circle_absolute_on(target_axes_indices, rotation_direction, center_x, center_y)
Queue an absolute circle movement in the stream. The movement will only target the specified subset of axes in the stream. Requires at least Firmware 7.11.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle.
center_yMeasurementThe second dimension of the position of the center of the circle.
m

circle_relative()

async available
stream.circle_relative(rotation_direction, center_x, center_y)
Queue a relative circle movement on the first two axes of the stream. Relative meaning that the current position of the axes is treated as the origin.
Arguments
NameTypeDescription
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle.
center_yMeasurementThe second dimension of the position of the center of the circle.
m

circle_relative_on()

async available
stream.circle_relative_on(target_axes_indices, rotation_direction, center_x, center_y)
Queue a relative circle movement in the stream. The movement will only target the specified subset of axes in the stream. Requires at least Firmware 7.11.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle.
center_yMeasurementThe second dimension of the position of the center of the circle.
m

cork()

async available
stream.cork()
Cork the front of the stream's action queue, blocking execution. Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit. Corking eliminates discontinuities in motion due to subsequent stream commands reaching the device late. You can only cork an idle live stream.
m

disable()

async available
stream.disable()
Disables the stream. If the stream is not setup, this command does nothing. Once disabled, the stream will no longer accept stream commands. The stream will process the rest of the commands in the queue until it is empty.
m

generic_command()

async available
stream.generic_command(command)
Sends a generic ASCII command to the stream. Keeps resending the command while the device rejects with AGAIN reason.
Arguments
NameTypeDescription
commandstrCommand and its parameters.
m

generic_command_batch()

async available
stream.generic_command_batch(batch)
Sends a batch of generic ASCII commands to the stream. Keeps resending command while the device rejects with AGAIN reason. The batch is atomic in terms of thread safety.
Arguments
NameTypeDescription
batchList[str]Array of commands.
m

get_max_centripetal_acceleration()

async available
stream.get_max_centripetal_acceleration(unit = Units.NATIVE)
Gets the maximum centripetal acceleration of the live stream. Converts the units using the first axis of the stream.
Arguments
NameTypeDescription
unitAccelerationUnitsUnits of acceleration.
Return Value
float The maximum centripetal acceleration of the live stream.
m

get_max_speed()

async available
stream.get_max_speed(unit = Units.NATIVE)
Gets the maximum speed of the live stream. Converts the units using the first axis of the stream.
Arguments
NameTypeDescription
unitVelocityUnitsUnits of velocity.
Return Value
float The maximum speed of the stream.
m

get_max_tangential_acceleration()

async available
stream.get_max_tangential_acceleration(unit = Units.NATIVE)
Gets the maximum tangential acceleration of the live stream. Converts the units using the first axis of the stream.
Arguments
NameTypeDescription
unitAccelerationUnitsUnits of acceleration.
Return Value
float The maximum tangential acceleration of the live stream.
m

helix_absolute_on()

async available
stream.helix_absolute_on(target_axes_indices, rotation_direction, center_x, center_y, end_x, end_y, *endpoint)
Queue an absolute helix movement in the stream. Requires at least Firmware 7.28.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based. The first two axes refer to the helix's arc component, while the rest refers to the helix's line component.
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle on which the helix projects.
center_yMeasurementThe second dimension of the position of the center of the circle on which the helix projects.
end_xMeasurementThe first dimension of the end position of the helix's arc component.
end_yMeasurementThe second dimension of the end position of the helix's arc component.
*endpointMeasurementPositions for the helix's line component axes, relative to their home positions.
m

helix_relative_on()

async available
stream.helix_relative_on(target_axes_indices, rotation_direction, center_x, center_y, end_x, end_y, *endpoint)
Queue a relative helix movement in the stream. Requires at least Firmware 7.28.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based. The first two axes refer to the helix's arc component, while the rest refers to the helix's line component.
rotation_directionRotationDirectionThe direction of the rotation.
center_xMeasurementThe first dimension of the position of the center of the circle on which the helix projects.
center_yMeasurementThe second dimension of the position of the center of the circle on which the helix projects.
end_xMeasurementThe first dimension of the end position of the helix's arc component.
end_yMeasurementThe second dimension of the end position of the helix's arc component.
*endpointMeasurementPositions for the helix's line component axes, relative to their positions before movement.
m

ignore_current_discontinuity()

stream.ignore_current_discontinuity()
Prevents StreamDiscontinuityException as a result of expected discontinuity when resuming streaming.
m

is_busy()

async available
stream.is_busy()
Returns a boolean value indicating whether the live stream is executing a queued action.
Return Value
bool True if the stream is executing a queued action.
m

line_absolute()

async available
stream.line_absolute(*endpoint)
Queue an absolute line movement in the stream.
Arguments
NameTypeDescription
*endpointMeasurementPositions for the axes to move to, relative to their home positions.
m

line_absolute_on()

async available
stream.line_absolute_on(target_axes_indices, endpoint)
Queue an absolute line movement in the stream, targeting a subset of the stream axes. Requires at least Firmware 7.11.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
endpointList[Measurement]Positions for the axes to move to, relative to their home positions.
m

line_relative()

async available
stream.line_relative(*endpoint)
Queue a relative line movement in the stream.
Arguments
NameTypeDescription
*endpointMeasurementPositions for the axes to move to, relative to their positions before movement.
m

line_relative_on()

async available
stream.line_relative_on(target_axes_indices, endpoint)
Queue a relative line movement in the stream, targeting a subset of the stream axes. Requires at least Firmware 7.11.
Arguments
NameTypeDescription
target_axes_indicesList[int]Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
endpointList[Measurement]Positions for the axes to move to, relative to their positions before movement.
m

set_hold()

async available
stream.set_hold(hold)
Pauses or resumes execution of the stream in live mode. The hold only takes effect during execution of motion segments.
Arguments
NameTypeDescription
holdboolTrue to pause execution, false to resume.
m

set_max_centripetal_acceleration()

async available
stream.set_max_centripetal_acceleration(max_centripetal_acceleration, unit = Units.NATIVE)
Sets the maximum centripetal acceleration of the live stream. Converts the units using the first axis of the stream.
Arguments
NameTypeDescription
max_centripetal_accelerationfloatMaximum centripetal acceleration at which any stream action is executed.
unitAccelerationUnitsUnits of acceleration.
m

set_max_speed()

async available
stream.set_max_speed(max_speed, unit = Units.NATIVE)
Sets the maximum speed of the live stream. Converts the units using the first axis of the stream.
Arguments
NameTypeDescription
max_speedfloatMaximum speed at which any stream action is executed.
unitVelocityUnitsUnits of velocity.
m

set_max_tangential_acceleration()

async available
stream.set_max_tangential_acceleration(max_tangential_acceleration, unit = Units.NATIVE)
Sets the maximum tangential acceleration of the live stream. Converts the units using the first axis of the stream.
Arguments
NameTypeDescription
max_tangential_accelerationfloatMaximum tangential acceleration at which any stream action is executed.
unitAccelerationUnitsUnits of acceleration.
m

setup_live()

async available
stream.setup_live(*axes)
Setup the stream to control the specified axes and to queue actions on the device.
Arguments
NameTypeDescription
*axesintNumbers of physical axes to setup the stream on.
m

setup_live_composite()

async available
stream.setup_live_composite(*axes)
Setup the stream to control the specified axes and to queue actions on the device. Allows use of lockstep axes in a stream.
Arguments
NameTypeDescription
*axesStreamAxisDefinitionDefinition of the stream axes.
m

setup_store()

async available
stream.setup_store(stream_buffer, *axes)
Setup the stream to control the specified axes and queue actions into a stream buffer.
Arguments
NameTypeDescription
stream_bufferStreamBufferThe stream buffer to queue actions in.
*axesintThe axis numbers of the physical axes to setup the stream on.
m

setup_store_arbitrary_axes()

async available
stream.setup_store_arbitrary_axes(stream_buffer, axes_count)
Setup the stream to use a specified number of axes, and to queue actions in a stream buffer. Afterwards, you may call the resulting stream buffer on arbitrary axes. This mode does not allow for unit conversions.
Arguments
NameTypeDescription
stream_bufferStreamBufferThe stream buffer to queue actions in.
axes_countintThe number of axes in the stream.
m

setup_store_composite()

async available
stream.setup_store_composite(stream_buffer, *axes)
Setup the stream to control the specified axes and queue actions into a stream buffer. Allows use of lockstep axes in a stream.
Arguments
NameTypeDescription
stream_bufferStreamBufferThe stream buffer to queue actions in.
*axesStreamAxisDefinitionDefinition of the stream axes.
m

__repr__()

stream.__repr__()
Returns a string which represents the stream.
Return Value
str String which represents the stream.
m

treat_discontinuities_as_error()

stream.treat_discontinuities_as_error()
Makes the stream throw StreamDiscontinuityException when it encounters discontinuities (ND warning flag).
m

uncork()

async available
stream.uncork()
Uncork the front of the queue, unblocking command execution. You can only uncork an idle live stream that is corked.
m

wait()

async available
stream.wait(time, unit = Units.NATIVE)
Wait a specified time.
Arguments
NameTypeDescription
timefloatAmount of time to wait.
unitTimeUnitsUnits of time.
m

wait_until_idle()

async available
stream.wait_until_idle(throw_error_on_fault = True)
Waits until the live stream executes all queued actions.
Arguments
NameTypeDescription
throw_error_on_faultboolDetermines whether to throw error when fault is observed.
Top