API Reference v9.2.0
Oscilloscopeclass
Module: zaber_motion.ascii
Provides a convenient way to control the oscilloscope data recording feature of some devices. The oscilloscope can record the values of some settings over time at high resolution.
Requires at least Firmware 7.00.
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)
oscilloscope = device.oscilloscopeRelated Guides:
Index
pProperties
Properties
p
Methods
m
m
oscilloscope.add_io_channel(io_type, io_channel)Select an I/O pin to be recorded.
Requires at least Firmware 7.33.
Arguments
| Name | Type | Description |
|---|---|---|
| io_type | IoPortType | The I/O port type to read data from. |
| io_channel | int | The 1-based index of the I/O pin to read from. |
m
m
oscilloscope.get_delay(unit = Units.NATIVE)Get the delay before oscilloscope recording starts.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | TimeUnits | Unit of measure to represent the delay in. |
Return Value
float The current start delay in the selected time units.m
oscilloscope.get_frequency(unit = Units.NATIVE)Get the current sampling frequency. The values is calculated as the inverse of the current sampling interval.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | FrequencyUnits | Unit of measure to represent the frequency in. |
Return Value
float The inverse of current sampling interval in the selected units.m
m
m
oscilloscope.get_timebase(unit = Units.NATIVE)Get the current sampling interval.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | TimeUnits | Unit of measure to represent the timebase in. |
Return Value
float The current sampling interval in the selected time units.m
oscilloscope.read()Reads the last-recorded data from the oscilloscope. Will block until any in-progress recording completes.
Return Value
List[OscilloscopeData] Array of recorded channel data arrays, in the order added.m
oscilloscope.set_delay(interval, unit = Units.NATIVE)Set the sampling start delay.
Arguments
| Name | Type | Description |
|---|---|---|
| interval | float | Delay time between triggering a recording and the first data point being recorded. |
| unit | TimeUnits | Unit of measure the delay is represented in. |
m
oscilloscope.set_frequency(frequency, unit = Units.NATIVE)Set the sampling frequency (inverse of the sampling interval). The value is quantized to the next closest value supported by the firmware.
Arguments
| Name | Type | Description |
|---|---|---|
| frequency | float | Sample frequency for the next oscilloscope recording. |
| unit | FrequencyUnits | Unit of measure the frequency is represented in. |
m
oscilloscope.set_timebase(interval, unit = Units.NATIVE)Set the sampling interval.
Arguments
| Name | Type | Description |
|---|---|---|
| interval | float | Sample interval for the next oscilloscope recording. Minimum value is 100µs. |
| unit | TimeUnits | Unit of measure the timebase is represented in. |
m