Print 3d & odrive

Hello
I tried to follow the procedure see the picture attached but I can not run the M0 engine when it is connected to my Arduino Mega 2560 + Ramps 1.4 I recovered the dir and the wire step in gpio 2 and 1
do you have an idea I do not understand why it does not work so with the Arduino test procedure it works fine
thank you

Can you check the error codes? Can you read the odrv0.axis0.controller.pos_setpoint variable to see if it changing when you send step pulses?

no i have 0.0 like picture
Capture2

And odriv0.axis0.error gives 0 too?

yes 0x0

can you show us what you get when you do odrv0

Capture7

You can see config.enable_step_dir = False for both axes in odrv0. You may want to try updating your firmware from 0.4.1.

Yes I tried to put it back on “True” but he did not take it into account
I will look for the update and redo the test
thank you very much for your help

hello, I am in version 4.2

odrivetool

Capture%208

the card does not take into account the activation see the photos attached below

hello can you look at the photos please I do not understand why The odrive does not take into account the transition to True?

Hi Wetmelon,do you have another idea I’m stuck
Thank you

Hello
I’m doing the procedure to make a recording and modify the Odrive module but apparently it does not record it

Can anyone tell me why I had to do
a mistake thanks for your help

Reconnected to ODrive 206435963748 as odrv0
In [14]: odrv0.config.enable_uart = False
    ...:

In [15]: odrv0.axis0.config.enable_step_dir=True
    ...:

In [16]: odrv0.axis1.config.enable_step_dir=True
    ...:

In [17]: odrv0.save_configuration()
    ...:

In [18]: odrv0.reboot()
    ...:
---------------------------------------------------------------------------
USBError                                  Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\fibre\usbbulk_transport.py in process
_packet(self, usbBuffer)
     96     try:
---> 97       ret = self.epw.write(usbBuffer, 0)
     98       if self._was_damaged:

C:\ProgramData\Anaconda3\lib\site-packages\usb\core.py in write(self, data, time
out)
    386         """
--> 387         return self.device.write(self, data, timeout)
    388

C:\ProgramData\Anaconda3\lib\site-packages\usb\core.py in write(self, endpoint,
data, timeout)
    947                 _interop.as_array(data),
--> 948                 self.__get_timeout(timeout)
    949             )

C:\ProgramData\Anaconda3\lib\site-packages\usb\backend\libusb0.py in bulk_write(
self, dev_handle, ep, intf, data, timeout)
    532                             intf,
--> 533                             data, timeout)
    534

C:\ProgramData\Anaconda3\lib\site-packages\usb\backend\libusb0.py in __write(sel
f, fn, dev_handle, ep, intf, data, timeout)
    615                         length,
--> 616                         timeout
    617                     )))

C:\ProgramData\Anaconda3\lib\site-packages\usb\backend\libusb0.py in _check(ret)

    430             return ret
--> 431     raise USBError(errmsg, ret)
    432

USBError: [Errno None] b'libusb0-dll:err [submit_async] submitting request faile
d, win error: Le p\xe9riph\xe9rique ne reconna\xeet pas la commande.\r\n'

During handling of the above exception, another exception occurred:

TimeoutError                              Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py in <module>()
----> 1 odrv0.reboot()

C:\ProgramData\Anaconda3\lib\site-packages\fibre\remote_object.py in __call__(se
lf, *args)
    160         for i in range(len(args)):
    161             self._inputs[i].set_value(args[i])
--> 162         self._parent.__channel__.remote_endpoint_operation(self._trigger
_id, None, True, 0)
    163         if len(self._outputs) > 0:
    164             return self._outputs[0].get_value()

C:\ProgramData\Anaconda3\lib\site-packages\fibre\protocol.py in remote_endpoint_
operation(self, endpoint_id, input, expect_ack, output_length)
    294                     self._my_lock.acquire()
    295                     try:
--> 296                         self._output.process_packet(packet)
    297                     except ChannelDamagedException:
    298                         attempt += 1

C:\ProgramData\Anaconda3\lib\site-packages\fibre\usbbulk_transport.py in process
_packet(self, usbBuffer)
    104         raise fibre.protocol.ChannelBrokenException()
    105       elif ex.errno is None or ex.errno == 60 or ex.errno == 110: # time
out
--> 106         raise TimeoutError()
    107       else:
    108         self._logger.debug("error in usbbulk_transport.py, process_packe
t")

TimeoutError:

Reconnected to ODrive 206435963748 as odrv0
In [19]: odrv0
    ...:
Out[19]:
vbus_voltage = 42.41740798950195 (float)
serial_number = 206435963748 (int)
hw_version_major = 3 (int)
hw_version_minor = 5 (int)
hw_version_variant = 48 (int)
fw_version_major = 0 (int)
fw_version_minor = 4 (int)
fw_version_revision = 1 (int)
fw_version_unreleased = 0 (int)
user_config_loaded = True (bool)
brake_resistor_armed = True (bool)
system_stats:
  uptime = 106048 (int)
  min_heap_space = 18264 (int)
  min_stack_space_axis0 = 7868 (int)
  min_stack_space_axis1 = 7868 (int)
  min_stack_space_comms = 8468 (int)
  min_stack_space_usb = 1332 (int)
  min_stack_space_uart = 3932 (int)
  min_stack_space_usb_irq = 1828 (int)
  min_stack_space_startup = 564 (int)
  usb: ...
  i2c: ...
config:
  brake_resistance = 2.0 (float)
  enable_uart = False (bool)
  enable_i2c_instead_of_can = False (bool)
  enable_ascii_protocol_on_usb = True (bool)
  dc_bus_undervoltage_trip_level = 8.0 (float)
  dc_bus_overvoltage_trip_level = 51.840003967285156 (float)
axis0:
  error = 0x0000 (int)
  enable_step_dir = False (bool)
  current_state = 1 (int)
  requested_state = 0 (int)
  loop_counter = 861052 (int)
  config: ...
  motor: ...
  controller: ...
  encoder: ...
  sensorless_estimator: ...
axis1:
  error = 0x0000 (int)
  enable_step_dir = False (bool)
  current_state = 1 (int)
  requested_state = 0 (int)
  loop_counter = 861059 (int)
  config: ...
  motor: ...
  controller: ...
  encoder: ...
  sensorless_estimator: ...
can:
  node_id = 0 (int)
  TxMailboxCompleteCallbackCnt = 0 (int)
  TxMailboxAbortCallbackCnt = 0 (int)
  received_msg_cnt = 0 (int)
  received_ack = 0 (int)
  unexpected_errors = 0 (int)
  unhandled_messages = 0 (int)
test_property = 0 (int)
test_function(delta: int)
get_oscilloscope_val(index: int)
get_adc_voltage(gpio: int)
save_configuration()
erase_configuration()
reboot()
enter_dfu_mode()

In [20]:```

This looks correct to me. There are two enable_step_dir variables. They are:

  • axis.config.enable_step_dir - this means you want to be using step/dir when the motor is on.
  • axis.enable_step_dir - This means step/dir is listening right now. This is only true when the motor is in closed loop control mode. We should probably rename this. I will look at renaming this to step_dir_active for the next release.