Configuration

class ingeniamotion.configuration.Configuration(motion_controller)

Configuration.

class BrakeOverride(value)

Brake override configuration enum

release_brake(servo='default', axis=1)

Override the brake status to released in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

None

enable_brake(servo='default', axis=1)

Override the brake status of the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

None

disable_brake_override(servo='default', axis=1)

Disable the brake override of the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

None

default_brake(servo='default', axis=1)

Disable the brake override of the target servo and axis, as disable_brake_override().

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

None

load_configuration(config_path, axis=None, servo='default')

Load a configuration file to the target servo.

Parameters
  • config_path (str) – config file path to load.

  • axis (Optional[int]) – target axis to load configuration. If None function loads all axis. None by default.

  • servo (str) – servo alias to reference it. default by default.

Raises

FileNotFoundError – If configuration file does not exist.

Return type

None

save_configuration(output_file, axis=None, servo='default')

Save the servo configuration to a target file.

Parameters
  • output_file (str) – servo configuration destination file.

  • axis (Optional[int]) – target axis to load configuration. If None function loads all axis. None by default.

  • servo (str) – servo alias to reference it. default by default.

Return type

None

store_configuration(axis=None, servo='default')

Store servo configuration to non-volatile memory.

Parameters
  • axis (Optional[int]) – target axis to load configuration. If None function loads all axis. None by default.

  • servo (str) – servo alias to reference it. default by default.

Return type

None

restore_configuration(axis=None, servo='default')

Restore servo to default configuration.

Parameters
  • axis (Optional[int]) – target axis to load configuration. If None function loads all axis. None by default.

  • servo (str) – servo alias to reference it. default by default.

Return type

None

set_max_acceleration(acceleration, servo='default', axis=1)

Update maximum acceleration register.

Warning

This function is deprecated. Please use “set_max_profile_acceleration” or “set_profiler” instead.

Parameters
  • acceleration (float) – maximum acceleration in rev/s^2.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Raises

TypeError – If acceleration is not a float.

Return type

None

set_max_profile_acceleration(acceleration, servo='default', axis=1)

Update maximum profile acceleration register.

Parameters
  • acceleration (float) – maximum profile acceleration in rev/s^2.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

set_max_profile_deceleration(deceleration, servo='default', axis=1)

Update maximum profile deceleration register.

Parameters
  • deceleration (float) – maximum profile deceleration in rev/s^2.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

set_profiler(acceleration=None, deceleration=None, velocity=None, servo='default', axis=1)

Set up the acceleration, deceleration and velocity profilers. All of these parameters are optional, meaning the user can set only one if desired. However, At least a minimum of one of these parameters is mandatory to call this function.

Raises

TypeError – Missing arguments. All the arguments given were None.

Parameters
  • acceleration (Optional[float]) – maximum acceleration in rev/s^2.

  • deceleration (Optional[float]) – maximum deceleration in rev/s^2.

  • velocity (Optional[float]) – maximum profile velocity in rev/s.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

set_max_velocity(velocity, servo='default', axis=1)

Update maximum velocity register.

Parameters
  • velocity (float) – maximum velocity in rev/s.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Raises

TypeError – If velocity is not a float.

Return type

None

set_max_profile_velocity(velocity, servo='default', axis=1)

Update maximum profile velocity register.

Parameters
  • velocity (float) – maximum profile velocity in rev/s.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

get_position_and_velocity_loop_rate(servo='default', axis=1)

Get position & velocity loop rate frequency.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

Position & velocity loop rate frequency in Hz.

get_current_loop_rate(servo='default', axis=1)

Get current loop rate frequency.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

Current loop rate frequency in Hz.

get_power_stage_frequency(servo='default', axis=1, raw=False)

Get Power stage frequency register.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

  • raw (bool) – if False return frequency in Hz, if True return raw register value. False by default.

Return type

int

Returns

Frequency in Hz if raw is False, else, raw register value.

Raises

ValueError – If power stage frequency selection register has an invalid value.

get_power_stage_frequency_enum(servo='default', axis=1)

Return Power stage frequency register enum.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Returns

Enum with power stage frequency available values.

Return type

IntEnum

set_power_stage_frequency(value, servo='default', axis=1)

Set power stage frequency from enum value. See :func: get_power_stage_frequency_enum.

Parameters
  • value (int) – Enum value to set power stage frequency.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Raises

IMStatusWordError – If motor is enabled.

Return type

None

get_status_word(servo='default', axis=1)

Return status word register value.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

Status word.

is_motor_enabled(servo='default', axis=1)

Return motor status.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

bool

Returns

True if motor is enabled, else False.

is_commutation_feedback_aligned(servo='default', axis=1)

Return commutation feedback aligned status.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

bool

Returns

True if commutation feedback is aligned, else False.

set_phasing_mode(phasing_mode, servo='default', axis=1)

Set phasing mode.

Parameters
  • phasing_mode (PhasingMode) – phasing mode.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

get_phasing_mode(servo='default', axis=1)

Get current phasing mode.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Returns

Phasing mode value.

Return type

PhasingMode

set_generator_mode(mode, servo='default', axis=1)

Set generator mode.

Parameters
  • mode (GeneratorMode) – generator mode value.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

set_motor_pair_poles(pair_poles, servo='default', axis=1)

Set motor pair poles.

Parameters
  • pair_poles (int) – motor pair poles-

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Raises
Return type

None

get_motor_pair_poles(servo='default', axis=1)

Get motor pair poles.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

Pair poles value.

get_sto_status(servo='default', axis=1)

Get STO register

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

STO register value.

is_sto1_active(servo='default', axis=1)

Get STO1 bit from STO register

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

return value of STO1 bit.

is_sto2_active(servo='default', axis=1)

Get STO2 bit from STO register

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

return value of STO2 bit.

check_sto_power_supply(servo='default', axis=1)

Get power supply bit from STO register

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

return value of power supply bit.

check_sto_abnormal_fault(servo='default', axis=1)

Get abnormal fault bit from STO register

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

return value of abnormal fault bit.

get_sto_report_bit(servo='default', axis=1)

Get report bit from STO register

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

int

Returns

return value of report bit.

is_sto_active(servo='default', axis=1)

Check if STO is active

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

bool

Returns

True if STO is active, else False.

is_sto_inactive(servo='default', axis=1)

Check if STO is inactive

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

bool

Returns

True if STO is inactive, else False.

is_sto_abnormal_latched(servo='default', axis=1)

Check if STO is abnormal latched

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

bool

Returns

True if STO is abnormal latched, else False.

change_tcp_ip_parameters(ip_address, subnet_mask, gateway, servo='default')

Change TCP IP parameters and store it.

Parameters
  • ip_address (str) – IP Address to be changed.

  • subnet_mask (str) – Subnet mask to be changed.

  • gateway (str) – Gateway to be changed.

  • servo (str) – servo alias to reference it. default by default.

Return type

None

store_tcp_ip_parameters(servo='default')

Store TCP IP parameters to non-volatile memory.

Parameters

servo (str) – servo alias to reference it. default by default.

Return type

None

restore_tcp_ip_parameters(servo='default')

Restore TCP IP parameters to default values.

Parameters

servo (str) – servo alias to reference it. default by default.

Return type

None

get_absolute_encoder_1_resolution(servo='default', axis=1)

Reads ABS1 encoder resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of ABS1 encoder.

get_absolute_encoder_2_resolution(servo='default', axis=1)

Reads ABS2 encoder resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of ABS2 encoder.

get_auxiliar_feedback(servo='default', axis=1)

Reads auxiliar feedbacks value in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorType

Returns

Type of feedback configured

get_auxiliar_feedback_category(servo='default', axis=1)

Reads auxiliar feedbacks type {ABSOLUTE or INCREMENTAL} in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorCategory

Returns

Category {ABSOLUTE, INCREMENTAL} of the selected feedback.

get_auxiliar_feedback_resolution(servo='default', axis=1)

Reads auxiliar feedbacks resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of the selected feedback.

get_commutation_feedback(servo='default', axis=1)

Reads commutation feedbacks value in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorType

Returns

Type of feedback configured.

get_commutation_feedback_category(servo='default', axis=1)

Reads commutation feedbacks type {ABSOLUTE or INCREMENTAL} in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorCategory

Returns

Category {ABSOLUTE, INCREMENTAL} of the selected feedback.

get_commutation_feedback_resolution(servo='default', axis=1)

Reads commutation feedbacks resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of the selected feedback.

get_digital_halls_resolution(servo='default', axis=1)

Reads digital halls pole pairs in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of digital halls encoder.

get_feedback_resolution(feedback, servo='default', axis=1)

Reads target feedback resolution in the target servo and axis.

Parameters
  • feedback (SensorType) – target feedback.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of target feedback.

get_incremental_encoder_1_resolution(servo='default', axis=1)

Reads incremental encoder 1 resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of incremental encoder 1.

get_incremental_encoder_2_resolution(servo='default', axis=1)

Reads incremental encoder 2 resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of incremental encoder 2 encoder.

get_position_feedback(servo='default', axis=1)

Reads position feedbacks value in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorType

Returns

Type of feedback configured.

get_position_feedback_category(servo='default', axis=1)

Reads position feedbacks type {ABSOLUTE or INCREMENTAL} in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorCategory

Returns

Category {ABSOLUTE, INCREMENTAL} of the selected feedback.

get_position_feedback_resolution(servo='default', axis=1)

Reads position feedbacks resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of the selected feedback.

get_reference_feedback(servo='default', axis=1)

Reads reference feedbacks value in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorType

Returns

Type of feedback configured

get_reference_feedback_category(servo='default', axis=1)

Reads reference feedbacks type {ABSOLUTE or INCREMENTAL} in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorCategory

Returns

Category {ABSOLUTE, INCREMENTAL} of the selected feedback.

get_reference_feedback_resolution(servo='default', axis=1)

Reads reference feedbacks resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of the selected feedback.

get_secondary_ssi_resolution(servo='default', axis=1)

Reads secondary SSI encoder resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of secondary SSI encoder.

get_velocity_feedback(servo='default', axis=1)

Reads velocity feedbacks value in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorType

Returns

Type of feedback configured

get_velocity_feedback_category(servo='default', axis=1)

Reads velocity feedbacks type {ABSOLUTE or INCREMENTAL} in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

SensorCategory

Returns

Category {ABSOLUTE, INCREMENTAL} of the selected feedback.

get_velocity_feedback_resolution(servo='default', axis=1)

Reads velocity feedbacks resolution in the target servo and axis.

Parameters
  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Return type

int

Returns

Resolution of the selected feedback.

homing_on_current_position(hom_offset, servo='default', axis=1)

Do current position homing.

Parameters
  • hom_offset (int) – homing offset.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

homing_on_index_pulse(hom_offset, direction, index, timeout_ms, zero_vel, servo='default', axis=1, motor_enable=True)

Do homing on index pulse.

Note

Motor must be well phased before run any homing.

Parameters
  • hom_offset (int) – homing offset.

  • direction (int) – direction. 1 is positive, 0 is negative.

  • index (int) – select incremental encoder, 0 for incremental encoder 1, 1 for incremental encoder 2.

  • timeout_ms (int) – homing timeout in milliseconds.

  • zero_vel (int) – speed to search for the actual homing point, in mrev/s.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

  • motor_enable (bool) – if True do motor enable. True by default.

Return type

None

homing_on_switch_limit(hom_offset, direction, switch, timeout_ms, lim_vel, zero_vel, servo='default', axis=1, motor_enable=True)

Do homing on switch limit.

Note

Motor must be well phased before run any homing.

Parameters
  • hom_offset (int) – homing offset.

  • direction (int) – direction. 1 is positive, 0 is negative.

  • switch (int) – switch index.

  • timeout_ms (int) – homing timeout in milliseconds.

  • lim_vel (int) – speed to search for the switch, in mrev/s.

  • zero_vel (int) – speed to search for the actual homing point, in mrev/s.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

  • motor_enable (bool) – if True do motor enable. True by default.

Return type

None

homing_on_switch_limit_and_index_pulse(hom_offset, direction, switch, index, timeout_ms, lim_vel, zero_vel, servo='default', axis=1, motor_enable=True)

Do homing on switch limit and index pulse.

Note

Motor must be well phased before run any homing.

Parameters
  • hom_offset (int) – homing offset.

  • direction (int) – direction. 1 is positive, 0 is negative.

  • switch (int) – switch index.

  • index (int) – select incremental encoder, 0 for incremental encoder 1, 1 for incremental encoder 2.

  • timeout_ms (int) – homing timeout in milliseconds.

  • lim_vel (int) – speed to search for the switch, in mrev/s.

  • zero_vel (int) – speed to search for the actual homing point, in mrev/s.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

  • motor_enable (bool) – if True do motor enable. True by default.

Return type

None

set_auxiliar_feedback(feedback, servo='default', axis=1)

Writes auxiliar feedbacks value in the target servo and axis.

Parameters
  • feedback (SensorType) – feedback sensor number

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Raises

IMStatusWordError – If motor is enabled.

Return type

None

set_commutation_feedback(feedback, servo='default', axis=1)

Writes commutation feedbacks value in the target servo and axis.

Parameters
  • feedback (SensorType) – feedback sensor number

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Raises

IMStatusWordError – If motor is enabled.

Return type

None

set_homing_mode(homing_mode, servo='default', axis=1)

Set homing mode.

Parameters
  • homing_mode (HomingMode) – homing mode.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

set_homing_offset(homing_offset, servo='default', axis=1)

Set homing offset configuration.

Parameters
  • homing_offset (int) – homing offset.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

set_homing_timeout(timeout_ms, servo='default', axis=1)

Set homing timeout configuration.

Parameters
  • timeout_ms (int) – homing timeout in milliseconds.

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – servo axis. 1 by default.

Return type

None

set_position_feedback(feedback, servo='default', axis=1)

Writes position feedbacks value in the target servo and axis.

Parameters
  • feedback (SensorType) – feedback sensor number

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Raises

IMStatusWordError – If motor is enabled.

Return type

None

set_reference_feedback(feedback, servo='default', axis=1)

Writes reference feedbacks value in the target servo and axis.

Parameters
  • feedback (SensorType) – feedback sensor number

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Raises

IMStatusWordError – If motor is enabled.

Return type

None

set_velocity_feedback(feedback, servo='default', axis=1)

Writes velocity feedbacks value in the target servo and axis.

Parameters
  • feedback (SensorType) – feedback sensor number

  • servo (str) – servo alias to reference it. default by default.

  • axis (int) – axis that will run the test. 1 by default.

Raises

IMStatusWordError – If motor is enabled.

Return type

None