-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class TMC5160Stepper' has no member named 'SGTHRS #283
Comments
Same problem. Can't do anything with stallguard |
These Stallguard functions are all Public Member Functions inherited from TMC2130Stepper. |
Thank you. Could you give me an example on how to use that? maybe I can send you the code to take a look at? I would be very grateful! |
Typically, I have first monitored the running stepper and determined the sg_result value when running and when stalled. Then in the application I have read the sg_result and compared it to a value and if it's less than that value I call it a stall detected. If you want to post some code for review, do it here, and make a minimal, reproducible, example which demonstrates your issue. |
Thank you! The code: ` #define EN_PIN 33 // Enable constexpr uint32_t stepper_motor_standard_steps_per_rotation = 200; unsigned long lastMonitorTime = 0; // Variable to store the last time the monitoring was performed void setup() { pinMode(CS_PIN, OUTPUT); Serial.println(); driver.begin(); stepper.setMaxSpeed(MaxSpeed); // stepper specs float steps_per_rotation = driver.microsteps() * stepper_motor_standard_steps_per_rotation; Serial.print("micro step: "); Serial.print("Max Speed (steps per second): "); Serial.print("Acceleration (steps per second): "); float speed_rpm = (stepper.maxSpeed() / (steps_per_rotation / micro_step)) * 60.0; } void loop() {
} stepper.run();
} void performMonitoring() { Serial.println(); Serial.print("sg_result: "); Serial.print("cs2rms(driver.cs_actual): "); Serial.print("sg_result < STALL_VALUE: "); } ` |
What is a replacement for this in TMC5160?
and driver.VACTUAL(50000); and driver.SG_VALUE() this two also.
The text was updated successfully, but these errors were encountered: