Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Rotary Delta needs Segmentation in Z-Moves

    Firmware developers
    2
    4
    63
    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.
    • Egris
      Egris last edited by

      Good evening,

      i build a new Rotary Delta Machine and installed FW 3.2. Everything works fine but i noticed that there is no segmentation for Z-Moves. On linear Delta thats no problem but on a rotary delta i think we need segmentation to keep a constand feedrate.

      Would it be possible to implement this into the code?

      Best regards

      1 Reply Last reply Reply Quote 0
      • Egris
        Egris last edited by

        Maybe this will help do the segmentation including Z-Moves / only Z-Moves!?
        I will try to test it next week.

        }

        	// Apply segmentation if necessary. To speed up simulation on SCARA printers, we don't apply kinematics segmentation when simulating.
        	// Note for when we use RTOS: as soon as we set segmentsLeft nonzero, the Move process will assume that the move is ready to take, so this must be the last thing we do.
        	const Kinematics& kin = reprap.GetMove().GetKinematics();
        	if (kin.UseSegmentation() && simulationMode != 1 && (moveBuffer.hasExtrusion || moveBuffer.isCoordinated || !kin.UseRawG0()))
        	{
        		// This kinematics approximates linear motion by means of segmentation.
        		// We assume that the segments will be smaller than the mesh spacing.
        
        		// Calculate XY movement lenght
        		const float xyLength = sqrtf(fsquare(currentUserPosition[X_AXIS] - initialX) + fsquare(currentUserPosition[Y_AXIS] - initialY));
        		const float moveTime_XY = xyLength/moveBuffer.feedRate;			// this is a best-case time, often the move will take longer
        		// Calculate Z movement lenght
        		const float zLength = abs(currentUserPosition[Z_AXIS] - initialZ);
        		const float moveTime_Z = zLength/moveBuffer.feedRate;			// this is a best-case time, often the move will take longer
        		// Check which movment lenght is bigger and calculate Segments
        		if(zLenght > xyLength)
        		{
        			totalSegments = (unsigned int)max<int>(1, min<int>(rintf(zLength/kin.GetMinSegmentLength()), rintf(moveTime_Z * kin.GetSegmentsPerSecond())));
        		}
        		else
        		{
        			totalSegments = (unsigned int)max<int>(1, min<int>(rintf(xyLength/kin.GetMinSegmentLength()), rintf(moveTime_XY * kin.GetSegmentsPerSecond())));
        		}
        	}
        	else if (reprap.GetMove().IsUsingMesh() && (moveBuffer.isCoordinated || machineType == MachineType::fff))
        	{
        		const HeightMap& heightMap = reprap.GetMove().AccessHeightMap();
        		totalSegments = max<unsigned int>(1, heightMap.GetMinimumSegments(currentUserPosition[X_AXIS] - initialX, currentUserPosition[Y_AXIS] - initialY));
        	}
        	else
        	{
        		totalSegments = 1;
        	}
        
        1 Reply Last reply Reply Quote 0
        • dc42
          dc42 administrators last edited by dc42

          I will look at supporting segmentation in Z for rotary delta kinematics in firmware 3.3. I think we need to extend useSegmentation to indicate whether segmentation in Z is also needed, in which case we should include Z in the calculation of distance moved.

          Does is really matter if the speed of pure Z moves is not constant?

          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

          1 Reply Last reply Reply Quote 0
          • Egris
            Egris last edited by

            thanks for the reply. I think for 3D-Printing it´s not that importent. But for other applications besides 3d printing it could be necessary?! it would be complete if Z-Moves are included.

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