Comments (6)
This could be related to the pwm_autoscale being disabled on enableStallguard. I created an issue on this: terjeio/Trinamic-library#6
Would be good to get some confirmation.
from plugins_motor.
@wakass, that helps part of the issue (I believe). Thank you!
Still not sure about units, I also notice there are raw values being read, but not sure what is being written. I still believe unit consistency should be required for trinamic internal algorithms at least for this condition of this comparison tcoolthrs < tstep < tpwmthres.
from plugins_motor.
@troth530 Regarding your first question, first keep in mind that tpwm threshold is the threshold where pwm-mode/stealthchop is operational (TSTEP ≥ TPWMTHRS), i.e. velocity_step < velocity_tpwmthrs. Above the velocity_tpwmthrs, spreadcycle is enabled (and pwm regulation disabled). In that regards, a 'desired' velocity as you mention
TPWMTHRS from the 2209 datasheet is the TSTEP at the desired velocity
is correct, but the desired velocity will likely not be the velocity at which you will be driving. It needs to be set a-priori to where you expect the pwm regulation of stealthchop to not be reliable. Anyway, i'm being a little pedantic here.
The trinamic plugin sets the tpwm_threshold also in the code below, which I think gets run after initialization. But i'm not too sure about that, you can put some debug output lines to make sure. In that sense I think the code that is giving you the error can be removed entirely. Do note that the same threshold velocity is set for all axes.
Line 554 in d429c50
Conversion from speed to time step is achieved here:
https://github.com/terjeio/Trinamic-library/blob/9eae92beab071f00d188f9da25672ab9f2aaa116/tmc2209.c#L190
M122 also gives debug output on tpwm btw.
from plugins_motor.
@wakass can you provide more details about M122 debug output, what is the syntax?
So far I have confirmed pmw_autoscale fixes the stallguard issues- great find. I still need to confirm hybrid behavior.
Thank you!
from plugins_motor.
See this issue here for output from M122, grblHAL/RP2040#41 (comment)
Note the pwm section with the threshold and mm/s setting. This should give you an idea.
Syntax for M122 is described in this very repository: https://github.com/grblHAL/Plugins_motor
from plugins_motor.
Sensorless homing is fixed with re-enabling pwm_autoscale.
Hybrid mode is fixed adding float steps_per_mm; to struct in motor_settings_t in motors/trinamic.h
from plugins_motor.
Related Issues (11)
- 5160 not configuring as expected HOT 5
- Feature request/bug: Per axis sensorless homing rates HOT 7
- Bug: trinamic execute calls top of user_mcode stack.
- trinamic: StallGuard based crash safety HOT 1
- Verification of change for TRINAMIC_R_SENSE value? HOT 3
- fatal error: trinamic2130.h HOT 4
- TMC Config does not seam to match register HOT 3
- TMC2209 Can not update microsteps setting HOT 1
- TMC_DEV compiling error HOT 23
- Setting wrong motor stallguard settings on sensorless per-axis homing under some conditions. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugins_motor.