Open jmartinhoj opened 2 years ago
Hi.
I think by default, all RxPdos and TxPdos are selected.
class InputPdo(ctypes.Structure):
_pack_ = 1
_fields_ = [
('statusword', ctypes.c_uint16),
('modes_of_operation_display', ctypes.c_int8),
('position_actual_value', ctypes.c_int32),
('velocity_actual_value', ctypes.c_int32),
('torque_actual_value', ctypes.c_int32),
('analog_input_1', ctypes.c_uint16),
('analog_input_2', ctypes.c_uint16),
('analog_input_3', ctypes.c_uint16),
('analog_input_4', ctypes.c_uint16),
('tuning_status', ctypes.c_uint32),
('digital_inputs', ctypes.c_uint32),
('user_miso', ctypes.c_uint32),
('timestamp', ctypes.c_uint32),
('position_demand_internal_value', ctypes.c_int32),
('velocity_demand_value', ctypes.c_int32),
('torque_demand', ctypes.c_int16),
]
class OutputPdo(ctypes.Structure):
_pack_ = 1
_fields_ = [
('controlword', ctypes.c_uint16),
('modes_of_operation', ctypes.c_int8),
('target_torque', ctypes.c_int32),
('target_position', ctypes.c_int32),
('target_velocity', ctypes.c_int32),
('torque_offset', ctypes.c_int16),
('tuning_command', ctypes.c_uint32),
('physical_outputs', ctypes.c_uint32),
('bit_mask', ctypes.c_uint32),
('user_mosi', ctypes.c_uint32),
('velocity_offset', ctypes.c_int32),
]
.. not sure.
If you are able to control the drive via SDO, does it help to not call send_processdata()
and receive_processdata()
to make it more stable?
Hi @jmartinhoj, can we actually close this issue?
Hello, I am trying to control my motor with a Somanet Node 1000 drive using pySOEM. I have already tried both with SDO and PDO. With SDO I managed to make it rotate but it rarely worked (with no pattern I could realize). Now, I am trying to implement a PDO solution, but it is not working. I have used this comment as a code base. Here is my code:
and here is the Rx and Tx sections of the ESI file:
My main mistake could be the fact that I do not specify the PDO mapping that I want to use (as you can see by this XML, there are several ones), because I don't know how to do it.
Do you have any suggestion?
Thanks in advance.