Information

class ingeniamotion.information.Information(motion_controller)

Information.

register_info(register, axis=1, servo='default')

Return register object.

Parameters
  • register (str) – register UID.

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

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

Return type

Register

Returns

Register object.

Raises

IMRegisterNotExist – If register does not exist in dictionary.

register_type(register, axis=1, servo='default')

Return register dtype.

Parameters
  • register (str) – register UID.

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

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

Return type

REG_DTYPE

Returns

Register dtype.

Raises

IMRegisterNotExist – If register does not exist in dictionary.

register_access(register, axis=1, servo='default')

Return register access.

Parameters
  • register (str) – register UID.

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

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

Return type

REG_ACCESS

Returns

Register access.

Raises

IMRegisterNotExist – If register does not exist in dictionary.

register_range(register, axis=1, servo='default')

Return register range.

Parameters
  • register (str) – register UID.

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

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

Return type

Union[Tuple[None, None], Tuple[int, int], Tuple[float, float], Tuple[str, str]]

Returns

Register range, minimum and maximum.

Raises

IMRegisterNotExist – If register does not exist in dictionary.

register_exists(register, axis=1, servo='default')

Check if register exists in dictionary.

Parameters
  • register (str) – register UID.

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

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

Return type

bool

Returns

True if register exists, else False.

static create_comkit_dictionary(coco_dict_path, moco_dict_path, dest_file=None)

Create a dictionary for COMKIT by merging a COCO dictionary and a MOCO dictionary.

Parameters
  • coco_dict_path (str) – COCO dictionary path.

  • moco_dict_path (str) – MOCO dictionary path.

  • dest_file (Optional[str]) – Path to store the COMKIT dictionary. If it’s not provided the merged dictionary is stored in the temporary system’s folder.

Return type

str

Returns

Path to the COMKIT dictionary.

Raises

ValueError – If destination file has a wrong extension.

get_product_name(alias='default')

Get the product name of the drive.

Parameters

alias (str) – alias of the servo.

Returns

“EVE-NET-E”, “CAP-NET-E”, etc.

Return type

If it exists for example

get_node_id(alias='default')

Get the node ID for CANopen communications.

Parameters

alias (str) – alias of the servo.

Return type

int

Returns

Node ID of the drive.

get_ip(alias='default')

Get the IP for Ethernet communications.

Parameters

alias (str) – alias of the servo.

Return type

str

Returns

IP of the drive.

get_slave_id(alias='default')

Get the slave ID for EoE communications.

Parameters

alias (str) – alias of the servo.

Return type

int

Returns

Slave ID of the drive.

get_name(alias='default')

Get the drive’s name.

Parameters

alias (str) – Alias of the servo.

Return type

str

Returns

The name of the drive.

get_communication_type(alias='default')

Get the connected drive’s communication type.

Parameters

alias (str) – alias of the connected drive.

Return type

COMMUNICATION_TYPE

Returns

CANopen, Ethernet, or EtherCAT.

get_full_name(alias='default')

Return the full name of the drive [Product name] [Name] ([Target]).

Parameters

alias (str) – Drive alias.

Return type

str

Returns

Full name.

get_subnodes(alias='default')

Return the number of subnodes.

Parameters

alias (str) – Drive alias.

Return type

int

Returns

Number of subnodes.

get_categories(alias)

Return dictionary categories instance.

Parameters

alias (str) – Drive alias.

Return type

Dict[str, str]

Returns

Categories instance.

get_dictionary_file_name(alias)

Return dictionary file name.

Parameters

alias (str) – Drive alias.

Return type

str

Returns

Dictionary file name.

get_encoded_image_from_dictionary(alias, axis=0)

Get the encoded product image from a drive dictionary. This function reads a dictionary of a drive, and it parses whether the dictionary file has a DriveImage tag and its content. :type alias: str :param alias: Alias of the drive. :type axis: int :param axis: Drive axis. Used when using COM-KIT.

Return type

Optional[str]

Returns

The encoded image or NoneType object.