bjorn Geschrieben October 24, 2022 at 14:22 Geschrieben October 24, 2022 at 14:22 Is there a way to update the stepper value of the stepper motor? I want the stepper motor to stop moving if the program crashes or is stopped without stopping the stepper motor. I'm currently using the "drive_forward" commands, but in this case, the stepper motor continues to move if the user quits the program, or if it crashes. But it seems impossible to continously feed the stepper controller with new positions when using target position, or set steps. It ignores set_steps and _target_position if it still has steps left. The only way i've found is to completely stop the motor, and put steps into it again. Is there another way? regards Zitieren
borg Geschrieben October 28, 2022 at 09:15 Geschrieben October 28, 2022 at 09:15 If you need to be absolutely sure that the stepper stops running when your program stops running you will probably need to use an additional relay in the power supply of the stepper motor. With the Relay Bricklets that we have (solid state or industrial dual relay) you can use a monoflop method. With this you can set a timer that you need to reset and if you top resetting (e.g. because your program crashed) the relay will disengage and the power is cut. Zitieren
bjorn Geschrieben November 8, 2022 at 07:58 Autor Geschrieben November 8, 2022 at 07:58 I'm really starting to regret using Tinkerforge for this project.. Tinkerforge is really easy to use, and is working quite well, but there is some really annoying things that is making this project much more complicated than just using an Arduino with a steppermotor controller. That you are saying is a kind of sollution to get around the problem, but that makes the project even more complex. Maybe it's possible to just run a second thread that is monitoring the state of the parent thread. I'm programming everything in C, so there is a lot of other things I can do with this.. Thank you for your answer. I thought I was going crazy because I didn't find any answer to this problem :) Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.