Comments (4)
There is nothing special with stop(). You can simply set a new target position after stopping and start the next move. StopAsync (like the other Async commands) is not blocking. I.e. it returns immediately after you called it. That means that the motor will still run when the function call returns. Before sending another movement command you should make sure that the motor is not running. You can use controller.isRunning() for that.
Let me know if you need an example code for that.
from teensystep.
Thanks. I undestand this. The problem is if I don't know exact target position (because I don't store it anywhere..) and I use interrupt to stop the motor.
For example. There is a 5 axis robot in the cell that do some movement using moveAsync and if you open safegate then interrupt is called to stop movement but in the interrupt I don't know what was the target position so I can't continue.. Can I get the target position somehow from some variables so I can start the motors again? Also after stop I don't know exactly which motor was running before but If I could know target positions of motors and actual positions of motors then I could start motors again to run to destination after safegate is closed and reset/start buttons pressed.
Many thanks for help!
from teensystep.
Maybe this is trivial question but I'm stuck.
from teensystep.
There is no simple solution to access the target positions from the library. But I really don't understand why you don't simply store the positions after you set them? I can send you a quick example later today to show you how I would do it.
from teensystep.
Related Issues (20)
- Winder Example not compiling on Windows HOT 2
- no member named 'overrideSpeed' HOT 6
- TeensyStep HelloStepper with Teensy 4.1 will not compile HOT 8
- fatal error: algorithm: No such file or directory HOT 3
- Multiple Stepper Synchronization with new position control at specified speed HOT 2
- Can STM32 Branch work with STM32F1?
- Supported STM32 boards HOT 2
- MultipleSteppers without Acceleration HOT 35
- Does this work with the TeensyLC (MKL26Z64) HOT 2
- Différent Acceleration and Deceleration values
- Arduino due HOT 6
- How can run with STM32H7xx HOT 1
- How random motion realizes acceleration and deceleration transition?
- Help with sensor based run/stop
- RotateController with attached Stepper can cause stepper position freeze (in TeensyStep > 2.0.0) HOT 4
- Issue compiling with Teensyduino 1.58 on PIO HOT 2
- RotateController with overridespeed sometime delay HOT 10
- Queue for trajectory planing in async movement HOT 1
- The analog Joystick code doesn't work on the STM32F4 HOT 3
- STM32 branch can't restart after overrideSpeed(0)
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 teensystep.