Parallel SCARA
-
@joergs5 said in Parallel SCARA:
We have misunderstood each other. It is not about maximum speed, but the mathematical model. In article https://www.pmdcorp.com/resources/get/motion-kinematics-article figures 4a and 4b is explained, that for a given real-world-movement, the stepper speeds must be nonlinear (each stepper different), so acceleration nonlinear also. I did not find this mathematical model in your source.
I'll build scara first, change your proposed sources, print out and then look whether the lines are correct or the calculation needs corrections. I will let you know.
Like all other SCARA firmwares that I know of, long moves are split into short segments, then the firmware makes the approximation that within a short move, the motor movement is linear. The trigonometric calculations take too long to perform them when calculating the time of every step.
-
Thanks for the information. I thought of precalculation of all moves in a PC, make a lookup table for all stepper commands and store in RAM connected to Arduino. But this may be overengineering. This project is exciting, I will shorten the other projects and will start this one faster!
-
Calculations are easier than I thought if the scara is build with one axis for the two arms and the 4 arm sections have equal length (equal length means parallelogram and easy calibration). Then the angle between the two arms, which are connected to the steppers, define the radius and the middle line angle defines the position on the circle. Speed is the vector addition of the radius change (a straight line) and the movement on the circle.
I can split the movement into angles or into distance. I'll check which one produces less errors from the theoretically perfect line. The error differs by source and destination position.
I made a fork of v2-dev now and will compile and test.
-
@joergs5 said in Parallel SCARA:
Calculations are easier than I thought if the scara is build with one axis for the two arms and the 4 arm sections have equal length (equal length means parallelogram and easy calibration). Then the angle between the two arms, which are connected to the steppers, define the radius and the middle line angle defines the position on the circle. Speed is the vector addition of the radius change (a straight line) and the movement on the circle.
I can split the movement into angles or into distance. I'll check which one produces less errors from the theoretically perfect line. The error differs by source and destination position.
I made a fork of v2-dev now and will compile and test.
RRF already includes code to segment the movement, so you don't need to write that. All you need to do is enable segmentation in your parallel SCARA kinematics class, just like the serial SCARA one does.
-
Thanks for the info. The reason for searching is I want to check whether the code is exact enough. I did not find the exact location in the source where the planning is: how many segments are used. I would like to segment differently depending on the source and destination location, because the errors are differently (e.g. printing a diagonal is exact because only radius is changed, a movement horizontal is unexact). I would like to use one segment for the diagonal and more segments the more the linear movement differs from the real movement.
-
In your kinematics parameters you can set a number of segments/second and also a minimum segment length in mm. The segment length will be chosen so as to achieve the number of segments/second you specify, subject to the minimum segment length you specify. So slow enough moves will use the minimum segment length, while for fast moves the segment size will increased so as not to exceed the segments/second.
G0 moves are not segmented.
-
I think I found it: DDA SetPositions().
-
Sorry, you answered while I searched. Thanks for your answer!
M669 the S and T parameters.
-
The segmentation itself is done in file GCodes.cpp, functions DoStraightMove and ReadMove. But please don't change those functions if you want your eventual PR for Parallel SCARA support to be accepted.
-
I will only change the places you told me. Your information is valuable for me to further understand the code.