Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    6 Axis linear Delta

    Scheduled Pinned Locked Moved
    General Discussion
    3
    18
    604
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tklnundefined
      tkln
      last edited by

      @dc42
      So the kinematics calculation is completed and tested with Matlab, so far everything works. Now I want to implement the refraction in the firmware. For this I would like to cut out everything unnecessary from the LinearDeltaKinematics.cpp. So that I can enter x,y,z and the three rotation angles u,w,v and the machine moves. Is it correct that I can delete everything in LinearDeltaKinematics.cpp from line 245 or does everything have to remain in place for it to work?

      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @tkln
        last edited by

        @tkln you could write stub functions to replace the ones after line 245 in LinearDeltaKinematics.cpp.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        tklnundefined 1 Reply Last reply Reply Quote 1
        • tklnundefined
          tkln @dc42
          last edited by

          @dc42
          So is it correct that from line 245 everything else can be commented out? Or is any of this required for the Reprap firmware to work if I just want to test motion without any calibration?

          1 Reply Last reply Reply Quote 0
          • tklnundefined
            tkln
            last edited by

            @dc42

            I have several questions about the LinearDeltaKinematics.h file.

            1. Is it enough to change these things in this file UsualNumTowers and "Axis names used internally" + "Derived values" for my kinematic calculation?
            static constexpr size_t UsualNumTowers = 3; 
            -> static constexpr size_t UsualNumTowers = 6;```
            
            	// Axis names used internally
            	static constexpr size_t DELTA_A_AXIS = 0;
            	static constexpr size_t DELTA_B_AXIS = 1;
            	static constexpr size_t DELTA_C_AXIS = 2;
            	static constexpr size_t DELTA_D_AXIS = 3;
            	static constexpr size_t DELTA_E_AXIS = 4;
            	static constexpr size_t DELTA_F_AXIS = 5;
            
            1. Can i use SUPPORT_LINEAR_DELTA for my Six Axis Delta or do I have to change something there?
            dc42undefined 1 Reply Last reply Reply Quote 0
            • tklnundefined
              tkln
              last edited by

              @dc42
              Is it correct that machinePos[X_AXIS], machinePos[Y_AXIS], machinePos[Z_AXIS] calculates the Z coordinate of the linear slides?

              // Calculate the Cartesian coordinates from the motor coordinates
              void LinearDeltaKinematics::ForwardTransform(float Ha, float Hb, float Hc, float machinePos[XYZ_AXES]) const noexcept
              {
              	// Calculate RSUT such that x = (Uz + S)/Q, y = -(Rz + T)/Q
              	const float R = ((Xbc * Ha) + (Xca * Hb) + (Xab * Hc)) * 2;
              	const float U = ((Ybc * Ha) + (Yca * Hb) + (Yab * Hc)) * 2;
              
              	// Note, Ka + Kb + Kc = 0 so we could calculate just two of them
              	const float Ka = coreKa + (fsquare(Hc) - fsquare(Hb)),
              				Kb = coreKb + (fsquare(Ha) - fsquare(Hc)),
              				Kc = coreKc + (fsquare(Hb) - fsquare(Ha));
              
              	const float S = Ka * towerY[DELTA_A_AXIS] + Kb * towerY[DELTA_B_AXIS] + Kc * towerY[DELTA_C_AXIS];
              	const float T = Ka * towerX[DELTA_A_AXIS] + Kb * towerX[DELTA_B_AXIS] + Kc * towerX[DELTA_C_AXIS];
              
              	const float A = fsquare(U) + fsquare(R) + Q2;
              	const float minusHalfB =  Q2 * Ha
              							+ Q * (U * towerX[DELTA_A_AXIS] - R * towerY[DELTA_A_AXIS])
              							- (R * T + U * S);
              	const float C = fsquare(towerX[DELTA_A_AXIS] * Q - S) + fsquare(towerY[DELTA_A_AXIS] * Q + T) + (fsquare(Ha) - D2[DELTA_A_AXIS]) * Q2;
              
              	const float z = (minusHalfB - fastSqrtf(fsquare(minusHalfB) - A * C)) / A;
              	machinePos[X_AXIS] = (U * z + S) / Q;
              	machinePos[Y_AXIS] = -(R * z + T) / Q;
              	machinePos[Z_AXIS] = z - ((machinePos[X_AXIS] * xTilt) + (machinePos[Y_AXIS] * yTilt));
              
              
              1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @tkln
                last edited by

                @tkln, I suggest you create a new kinematics file and use the new type number that I allocated for you. Unless your kinematics uses the same inverse kinematics as for a linear delta, you will need to enable segmentation. This is done by supplying default segmentation parameters when calling the base class constructor. See the RotaryDeltaKinematics files for example.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                tklnundefined 2 Replies Last reply Reply Quote 1
                • tklnundefined
                  tkln @dc42
                  last edited by

                  @dc42
                  I understand that would be the best option for clean and orderly documentation.
                  I would like to test my kinematics first and for that I would like to have only the most necessary things in the kinematics file and keep everything as short as possible. For that I would like to not add something like autocalibration etc. in the first place.

                  1 Reply Last reply Reply Quote 0
                  • tklnundefined
                    tkln @dc42
                    last edited by

                    @dc42
                    Ah the tip with the Rotary Delta helped me, thanks. Now I can compare a bit.

                    1 Reply Last reply Reply Quote 0
                    • tklnundefined
                      tkln
                      last edited by tkln

                      @dc42
                      Okay, last question for today, it's getting late in Germany 😄
                      Sorry for all the questions but I'm so excited to finally see the machines in action.
                      If I just want to test the 6-axis kinematics first, is it possible to create 6 axes with "Creating additional axes" and feed them with motor positions? I would then convert a Gcode with my 6-axis kinematics and then give the values to the Duet.
                      Is there a command that I do not control the ABCDEF axes using Cartesian coordinates (X10 Y10 Z5) but directly using steps (A5 B10 C10 D10 E100 F10)?
                      Is there anything against it?

                      o_lampeundefined tklnundefined 2 Replies Last reply Reply Quote 0
                      • o_lampeundefined
                        o_lampe @tkln
                        last edited by

                        @tkln said in 6 Axis linear Delta:

                        Is there a command that I do not control the ABCDEF axes using Cartesian coordinates (X10 Y10 Z5) but directly using steps (A5 B10 C10 D10 E100 F10)?

                        I guess by defining them as rotatry axes and setting a propper steps/degree value, you can mimic steps . (eg. with 16 microsteps it would be 'M92 A16')

                        1 Reply Last reply Reply Quote 1
                        • tklnundefined
                          tkln @tkln
                          last edited by tkln

                          @tkln
                          Solution: https://forum.duet3d.com/post/315912

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA