API Reference v9.1.0

ServoTunerclass

Module: zaber_motion.ascii

Exposes the capabilities to inspect and edit an axis' servo tuning. Requires at least Firmware 6.25 or 7.00.

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

from zaber_motion.ascii import Connection
from zaber_motion.ascii import ServoTuner

connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)
axis = device.get_axis(1)
servo_tuner = ServoTuner(axis)

Constructor

ServoTuner(axis)
Creates instance of ServoTuner for the given axis.
Arguments
NameTypeDescription
axisAxisThe axis that will be tuned.

Properties

p

axis

readonly
servo_tuner.axis
Axis The axis that will be tuned.

Methods

m

get_pid_tuning()

async available
servo_tuner.get_pid_tuning(paramset)
Gets the PID representation of this paramset's servo tuning.
Arguments
NameTypeDescription
paramsetServoTuningParamsetThe paramset to get tuning for.
Return Value
PidTuning The PID representation of the current tuning.
m

get_simple_tuning()

async available
servo_tuner.get_simple_tuning(paramset)
Get the simple tuning parameters for this device.
Arguments
NameTypeDescription
paramsetServoTuningParamsetThe paramset to get tuning for.
Return Value
SimpleTuning The simple tuning parameters.
m

get_simple_tuning_param_definitions()

async available
servo_tuner.get_simple_tuning_param_definitions()
Gets the parameters that are required to tune this device.
Return Value
List[SimpleTuningParamDefinition] The tuning parameters.
m

get_startup_paramset()

async available
servo_tuner.get_startup_paramset()
Get the paramset that this device uses by default when it starts up.
Return Value
ServoTuningParamset The paramset used when the device restarts.
m

get_tuning()

async available
servo_tuner.get_tuning(paramset)
Get the full set of tuning parameters used by the firmware driving this axis.
Arguments
NameTypeDescription
paramsetServoTuningParamsetThe paramset to get tuning for.
Return Value
ParamsetInfo The raw representation of the current tuning.
m

load_paramset()

async available
servo_tuner.load_paramset(to_paramset, from_paramset)
Load the values from one paramset into another.
Arguments
NameTypeDescription
to_paramsetServoTuningParamsetThe paramset to load into.
from_paramsetServoTuningParamsetThe paramset to load from.
m

set_pid_tuning()

async available
servo_tuner.set_pid_tuning(paramset, p, i, d, fc)
Sets the tuning of a paramset using the PID method.
Arguments
NameTypeDescription
paramsetServoTuningParamsetThe paramset to get tuning for.
pfloatThe proportional gain. Must be in units of N/m for linear devices, and N⋅m/° for rotary devices.
ifloatThe integral gain. Must be in units of N/(m⋅s) for linear devices, and N⋅m/(°⋅s) for rotary devices.
dfloatThe derivative gain. Must be in units of N⋅s/m for linear devices, and N⋅m⋅s/° for rotary devices.
fcfloatThe cutoff frequency. Must be in units of Hz.
Return Value
PidTuning The PID representation of the current tuning after your changes have been applied.
m

set_simple_tuning()

async available
servo_tuner.set_simple_tuning(paramset, tuning_params, load_inertia, load_inertia_units = Units.NATIVE, carriage_inertia = None, carriage_inertia_units = Units.NATIVE, motor_inertia = None, motor_inertia_units = Units.NATIVE, enable_feed_forward = True)
Set the tuning of this device using the simple input method.
Arguments
NameTypeDescription
paramsetServoTuningParamsetThe paramset to set tuning for.
tuning_paramsList[ServoTuningParam]The params used to tune this device. To get what parameters are expected, call GetSimpleTuningParamList. All values must be between 0 and 1.
load_inertiafloatThe mass loaded on the stage, excluding the mass of the carriage itself. Unless specified by the LoadInertiaUnits parameter, this is in units of kg for linear devices, and kg⋅m² for rotary devices.
load_inertia_unitsUnitsAndLiteralsThe units the load mass was supplied in.
carriage_inertiaOptional[float]The mass of the carriage itself. If not supplied, the product's default mass will be used. Unless specified by the CarriageInertiaUnits parameter, this is in units of kg for linear devices, and kg⋅m² for rotary devices.
carriage_inertia_unitsUnitsAndLiteralsThe units the carriage mass was supplied in.
motor_inertiaOptional[float]The inertia of the motor. Unless specified by the MotorInertiaUnits parameter, this is in units of kg⋅m².
motor_inertia_unitsUnitsAndLiteralsThe units the motor inertia was supplied in.
enable_feed_forwardboolWhether to enable the inertial feed-forward term.
m

set_startup_paramset()

async available
servo_tuner.set_startup_paramset(paramset)
Set the paramset that this device uses by default when it starts up.
Arguments
NameTypeDescription
paramsetServoTuningParamsetThe paramset to use at startup.
m

set_tuning()

async available
servo_tuner.set_tuning(paramset, tuning_params, set_unspecified_to_default = False)
Set individual tuning parameters. Only use this method if you have a strong understanding of Zaber specific tuning parameters.
Arguments
NameTypeDescription
paramsetServoTuningParamsetThe paramset to set tuning of.
tuning_paramsList[ServoTuningParam]The params to set.
set_unspecified_to_defaultboolIf true, any tuning parameters not included in TuningParams are reset to their default values.