AxisSettingsclass Module: zaber_motion.ascii
Class providing access to various axis settings and properties.
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 )
axis = device.get_axis(1 )
axis_settings = axis.settingsCopy Methods m can_convert_native_units() axis_settings.can_convert_native_units(setting)
Indicates if given setting can be converted from and to native units.
Arguments Name Type Description setting strName of the setting.
Return Value bool True if unit conversion can be performed.
m convert_from_native_units() axis_settings.convert_from_native_units(setting, value, unit)
Convert arbitrary setting value from Zaber native units.
Arguments Name Type Description setting strName of the setting. value floatValue of the setting in Zaber native units. unit UnitsAndLiteralsUnits to convert value to.
Return Value float Setting value.
m convert_to_native_units() axis_settings.convert_to_native_units(setting, value, unit)
Convert arbitrary setting value to Zaber native units.
Arguments Name Type Description setting strName of the setting. value floatValue of the setting in units specified by following argument. unit UnitsAndLiteralsUnits of the value.
Return Value float Setting value.
m axis_settings.get(setting, unit = Units.NATIVE)
Arguments Name Type Description setting strName of the setting. unit UnitsAndLiteralsUnits of setting.
Return Value float Setting value.
m get_bool() async available axis_settings.get_bool(setting)
Returns any axis setting or property as a boolean. For more information refer to the
ASCII Protocol Manual .
Arguments Name Type Description setting strName of the setting.
Return Value bool Setting value.
m axis_settings.get_default(setting, unit = Units.NATIVE)
Returns the default value of a setting.
Arguments Name Type Description setting strName of the setting. unit UnitsAndLiteralsUnits of setting.
Return Value float Default setting value.
m axis_settings.get_default_bool(setting)
Returns the default value of a setting as a boolean.
Arguments Name Type Description setting strName of the setting.
Return Value bool Default setting value.
m axis_settings.get_default_int(setting)
Returns the default value of a setting as an integer.
Arguments Name Type Description setting strName of the setting.
Return Value int Default setting value.
m axis_settings.get_default_string(setting)
Returns the default value of a setting as a string.
Arguments Name Type Description setting strName of the setting.
Return Value str Default setting value.
m axis_settings.get_int(setting)
Returns any axis setting or property as an integer. For more information refer to the
ASCII Protocol Manual .
Arguments Name Type Description setting strName of the setting.
Return Value int Setting value.
m get_many() async available axis_settings.get_many(*axis_settings)
Gets many setting values in as few requests as possible.
Arguments Return Value m get_string() async available axis_settings.get_string(setting)
Returns any axis setting or property as a string. For more information refer to the
ASCII Protocol Manual .
Arguments Name Type Description setting strName of the setting.
Return Value str Setting value.
m get_synchronized() async available axis_settings.get_synchronized(*axis_settings)
Gets many setting values in the same tick, ensuring their values are synchronized.
Requires at least Firmware 7.35.
Arguments Return Value m get_unit_conversion_descriptor() axis_settings.get_unit_conversion_descriptor(setting)
Retrieves unit conversion descriptor for a setting, allowing unit conversion without a device. The descriptor can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
Arguments Name Type Description setting strName of the setting.
Return Value m axis_settings.set(setting, value, unit = Units.NATIVE)
Arguments Name Type Description setting strName of the setting. value floatValue of the setting. unit UnitsAndLiteralsUnits of setting.
m set_bool() async available axis_settings.set_bool(setting, value)
Arguments Name Type Description setting strName of the setting. value boolValue of the setting.
m axis_settings.set_int(setting, value)
Sets any axis setting or property as an integer. For more information refer to the
ASCII Protocol Manual .
Arguments Name Type Description setting strName of the setting. value intValue of the setting.
m set_string() async available axis_settings.set_string(setting, value)
Arguments Name Type Description setting strName of the setting. value strValue of the setting.