Communication¶
-
class
ingeniamotion.communication.
Communication
(motion_controller)¶ Communication.
-
connect_servo_eoe
(ip, dict_path=None, alias='default', protocol=<Protocol.UDP: 2>, port=1061)¶ Connect to target servo by Ethernet over EtherCAT
-
connect_servo_ethernet
(ip, dict_path=None, alias='default', protocol=<Protocol.UDP: 2>, port=1061)¶ Connect to target servo by Ethernet
-
connect_servo_ecat
(ifname, dict_path, slave=1, eoe_comm=True, alias='default')¶ Connect servo by ECAT with embedded master.
- Parameters
ifname (str) – interface name. It should have format
\Device\NPF_[...]
.dict_path (str) – servo dictionary path.
slave (int) – slave index.
1
by default.eoe_comm (bool) – use eoe communications if
True
, ifFalse
use SDOs.True
by default.alias (str) – servo alias to reference it.
default
by default.
-
static
get_ifname_by_index
(index)¶ Return interface name by index.
- Parameters
index (int) – position of interface selected in
get_interface_name_list()
.- Returns
real name of selected interface. It can be used for function
connect_servo_ecat()
.- Return type
-
static
get_interface_name_list
()¶ Get interface list.
- Returns
List with interface readable names.
- Return type
list of str
-
connect_servo_ecat_interface_index
(if_index, dict_path, slave=1, eoe_comm=True, alias='default')¶ Connect servo by ECAT with embedded master. Interface should be selected by index of list given in
get_interface_name_list()
.- Parameters
if_index (int) – interface index in list given by function
get_interface_name_list()
.dict_path (str) – servo dictionary path.
slave (int) – slave index.
1
by default.eoe_comm (bool) – use eoe communications if
True
, ifFalse
use SDOs.True
by default.alias (str) – servo alias to reference it.
default
by default.
-
get_register
(register, servo='default', axis=1)¶ Return the value of a target register.
-
set_register
(register, value, servo='default', axis=1)¶ Set a value of a target register.
-
get_sdo_register
(index, subindex, dtype, string_size=None, servo='default')¶ Return the value via SDO of a target register.
- Parameters
index (int) – register index.
subindex (int) – register subindex.
dtype (ingenialink.registers.REG_DTYPE) – register data type.
string_size (int) – if register data is a string, size in bytes is mandatory.
None
by default.servo (str) – servo alias to reference it.
default
by default.
- Returns
Current register value.
- Return type
-
set_sdo_register
(index, subindex, dtype, value, servo='default')¶ Set the value via SDO of a target register.
-