Coder Social home page Coder Social logo

mrx8024 / motors-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from altzbox/motors_sync

15.0 0.0 3.0 1.04 MB

Klipper module for synchronizing two stepper motors located on one belt

License: GNU General Public License v3.0

Shell 6.76% Python 93.24%

motors-sync's Introduction

motors-sync's People

Contributors

mrx8024 avatar altzbox avatar matthewj301 avatar

Stargazers

 avatar BeccaKay avatar Kingnoob / 킹늅 avatar  avatar  avatar  avatar  avatar Kirill avatar  avatar  avatar Patrick Wulfert avatar  avatar Plynksiy Nikita avatar Yancey Arrington avatar xxxsam avatar

motors-sync's Issues

TypeError during Sync_Motors resulting in Klipper Crash

This issue has been resolved with the v1.0.0.7 May 5 (50dfe11) commit. I tried both CSV_OPEN_DELAY as 0.1s (default) and 0.5s and both worked with this version. I did not try CSV_OPEN_DELAY at 0.5s with v1.0.0.6 to see if that variable change would fix my issue.


I got everything setup but everytime i run motors sync I get what looks like a python error during the process. V1.0.0.6

_7 cputime=11.280 memavail=3689296 print_time=86.238 buffer_time=0.000 print_stall=0 extruder: target=0 temp=13.3 pwm=0.000
Writing raw accelerometer data to /tmp/beacon-20240504_213802.csv file
Y-New magnitude: None on -1/16 step move
Internal error on command:"SYNC_MOTORS"
Traceback (most recent call last):
File "/home/yanceya/klipper/klippy/gcode.py", line 298, in _process_commands
handler(gcmd)
File "/home/yanceya/klipper/klippy/gcode.py", line 207, in func
return origfunc(self._get_extended_params(params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yanceya/klipper/klippy/extras/motors_sync.py", line 266, in cmd_RUN_SYNC
self._axes_level()
File "/home/yanceya/klipper/klippy/extras/motors_sync.py", line 155, in axes_level
if m['new_magnitude'] > m['magnitude']:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'float' and 'NoneType'
Transition to shutdown state: Internal error on command:"SYNC_MOTORS"

I've attached the relevant klippy log:
klippy_motors_sync_error.txt

I'm running a monolith AWD and Beacon as the accelerometer sensor.

SYNC_MOTORS with tuned ROTATION_DISTANCE

image
Hi
As I'm using custom rotation_distance values for XY Z to make perfect dimensionned parts (Not the only one I presume), is there a solution for your mod to work with another value than a round one (40) put with 39.xxx by exemple?

Thanks in advance

"invalid literal for int() with base 10: '-0.1'" and Klipper Crash when doing SYNC_MOTORS

When i do SYNC_MOTORS i get invalid literal for int() with base 10: '-0.1' and it crashes klipper.

I'm using a KusbA board connected via USB and setup using the following:

[mcu adxl]
serial: /dev/serial/by-id/usb-Anchor_Rampon-if00

[adxl345]
cs_pin: adxl:CS

[resonance_tester]
accel_chip: adxl345
probe_points:
    115, 115, 20 

Input Shapping works and I can

11:30:10
$ ACCELEROMETER_QUERY
11:30:12
// accelerometer values (x, y, z): 296.082377, 9548.656652, -612.876398

I've then added

[motors_sync]
accel_chip: adxl345
microsteps: 16
steps_threshold: 999999
fast_threshold: 999999
retry_tolerance: 999999
retries: 5
respond: True

And i've tried with just

[motors_sync]
accel_chip: adxl345

and in both cases I get:

11:30:48
$ SYNC_MOTORS
11:30:48
// Klipper state: Shutdown
11:30:48
!! Internal error on command:"SYNC_MOTORS"

with a pop up error saying invalid literal for int() with base 10: '-0.1'

Have I miss configured something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.