Communication

class ingeniamotion.communication.Communication(motion_controller)

Communication.

class Protocol(value)

Communication protocol enum

TCP = 1
UDP = 2
connect_servo_eoe(ip, dict_path=None, alias='default', protocol=<Protocol.UDP: 2>, port=1061)

Connect to target servo by Ethernet over EtherCAT

Parameters
  • ip (str) – servo IP.

  • dict_path (str) – servo dictionary path.

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

  • protocol (Protocol) – UDP or TCP protocol. UDP by default.

  • port (int) – servo port. 1061 by default.

connect_servo_ethernet(ip, dict_path=None, alias='default', protocol=<Protocol.UDP: 2>, port=1061)

Connect to target servo by Ethernet

Parameters
  • ip (str) – servo IP

  • dict_path (str) – servo dictionary path.

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

  • protocol (Protocol) – UDP or TCP protocol. UDP by default.

  • port (int) – servo port. 1061 by default.

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

Return the value of a target register.

Parameters
  • register (str) – register UID.

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

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

Returns

Current register value.

Return type

int, float or str

set_register(register, value, servo='default', axis=1)

Set a value of a target register.

Parameters
  • register (str) – register UID.

  • value (int, float) – new value for the register.

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

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