Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. lars
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 79
    • Best 0
    • Controversial 0
    • Groups 0

    lars

    @lars

    0
    Reputation
    1
    Profile views
    79
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    lars Unfollow Follow

    Latest posts made by lars

    • RE: Homing with CoreXYU resets other head positions on endstop

      I slept on it and come up with a solution. 😉
      I need to set visible axis to 5 instead of the 4 that is proper for corexyu.

      M584 P5
      

      And I need to provide a movement coefficient matrix that has an inverse:

      M669 X1:1:0:0:0 Y-1:1:0:-1:1 Z0:0:1:0:0 U0:0:0:1:1 V0:0:0:0:1
      

      I’m thinking that the problem is the default setting of “inverseMatrix(4, 4) = 0.0” when using corexyu in CoreKinematics::CoreKinematics. This will give a matrix without an inverse. And when trying to set the movement coefficients with only 4 axis visible the V coefficients are ignored by CoreKinematics::Configure and left set to zero.

      Configuration that worked for me:

      G90                                             ; send absolute coordinates...
      M83                                             ; ...but relative extruder moves
      M550 P"CoreXYU"                                 ; set printer name
      M669 K5
      
      ; Network
      M552 S1                                         ; enable network
      M586 P0 S1                                      ; enable HTTP
      M586 P1 S0                                      ; disable FTP
      M586 P2 S0                                      ; disable Telnet
      
      ; Drives
      M569 P4 S0                                      ; XYU Left Top, DW2 E1, First from  top, physical drive 4 goes forwards
      M569 P3 S1                                      ; XYU Left Bottom, DW2 E0, Second from  top, physical drive 4 goes forwards
      
      M569 P9 S0                                      ; XYU Rigth Top, DX5 E6, First from  top, physical drive 9 goes forwards
      M569 P8 S1                                      ; XYU Rigth Bottom, DX5 E5, Second from  top, physical drive 8 goes forwards
      
      M584 X4 Y8 Z0 U3 V9 E1:2 P5                           ; set drive mapping
      M669 X1:1:0:0:0 Y-1:1:0:-1:1 Z0:0:1:0:0 U0:0:0:1:1 V0:0:0:0:1
      M584 P4
      
      posted in General Discussion
      larsundefined
      lars
    • RE: Homing with CoreXYU resets other head positions on endstop

      Hi, I have recently resumed my corexyu project and ran into a similar issue when trying to home one of the x, y or u axis. It zeroed/reseted the other two axis after homing. I have upgraded the firmware to 3.1.1 and started config from scratch as my old sd-card was broken.
      I looked at the code and from my very limited understanding of it it looks like it sets all axis when trying to home one axis.

      void CoreKinematics::OnHomingSwitchTriggered(size_t axis, bool highEnd, const float stepsPerMm[], DDA& dda) const
      {
      	const float hitPoint = (highEnd) ? reprap.GetPlatform().AxisMaximum(axis) : reprap.GetPlatform().AxisMinimum(axis);
      	if (HasSharedMotor(axis))
      	{
      		float tempCoordinates[MaxAxes];
      		const size_t numTotalAxes = reprap.GetGCodes().GetTotalAxes();
      		for (size_t axis = 0; axis < numTotalAxes; ++axis)
      		{
      			tempCoordinates[axis] = dda.GetEndCoordinate(axis, false);
      		}
      		tempCoordinates[axis] = hitPoint;
      		dda.SetPositions(tempCoordinates, numTotalAxes);
      	}
      	else
      	{
      		dda.SetDriveCoordinate(lrintf(hitPoint * inverseMatrix(axis, axis) * stepsPerMm[axis]), axis);
      	}
      }
      

      CoreKinematics::OnHomingSwitchTriggered builds a array (tempCoordinates) for all axis. Sets the homing axis to its max or min limit in the array and then uses the array in dda.SetPositions. I’m suspecting that dda.GetEndCoordinate used to get position for all the axis that was not homing returns zeros for some reason.

      // Get a Cartesian end coordinate from this move
      float DDA::GetEndCoordinate(size_t drive, bool disableMotorMapping)
      pre(disableDeltaMapping || drive < MaxAxes)
      {
      	if (disableMotorMapping)
      	{
      		return Move::MotorStepsToMovement(drive, endPoint[drive]);
      	}
      	else
      	{
      		const size_t visibleAxes = reprap.GetGCodes().GetVisibleAxes();
      		if (drive < visibleAxes && !flags.endCoordinatesValid)
      		{
      			reprap.GetMove().MotorStepsToCartesian(endPoint, visibleAxes, reprap.GetGCodes().GetTotalAxes(), endCoordinates);
      			flags.endCoordinatesValid = true;
      		}
      		return endCoordinates[drive];
      	}
      }
      

      If I follow MotorStepsToCartesian it ends up back in CoreKinematics::MotorStepsToCartesian.

      void CoreKinematics::MotorStepsToCartesian(const int32_t motorPos[], const float stepsPerMm[], size_t numVisibleAxes, size_t numTotalAxes, float machinePos[]) const
      {
      	// If there are more motors than visible axes (e.g. CoreXYU which has a V motor), we assume that we can ignore the trailing ones when calculating the machine position
      	for (size_t axis = 0; axis < numVisibleAxes; ++axis)
      	{
      		float position = 0.0;
      		const size_t motorLimit = min<size_t>(numVisibleAxes, lastMotor[axis] + 1);
      		for (size_t motor = firstMotor[axis]; motor < motorLimit; ++motor)
      		{
      			const float factor = forwardMatrix(motor, axis);
      			if (factor != 0.0)
      			{
      				position += factor * (float)motorPos[motor] / stepsPerMm[motor];
      			}
      		}
      		machinePos[axis] = position;
      	}
      }
      

      This function uses the “forwardMatrix” to calculate the result.
      I had previously noticed getting a “Invalid kinematics matrix” when running

      M669 K5 X1:1:0:0:0 Y-1:1:0:-1:1 Z0:0:1:0:0 U0:0:0:1:1 V0:0:0:0:0
      

      I need this to get the axis to move correctly. I noticed I got the same error message if I ran “M669 K5” without the movement coefficients so I ignored it. Now, looking at the code that generates the error message, it also zeros the “forwardMatrix”.

      forwardMatrix.Fill(0.0);
      reprap.GetPlatform().Message(ErrorMessage, "Invalid kinematics matrix\n");
      

      That would cause MotorStepsToCartesian to report back all zeros and cause the homing problem.
      Have I specified invalid movement coefficients? (It works for normal movement)

      M669 K5 X1:1:0:0:0 Y-1:1:0:-1:1 Z0:0:1:0:0 U0:0:0:1:1 V0:0:0:0:0
      

      Is the default “inverseMatrix” that you get from “M669 K5” invalid.
      Is the validation of the “inverseMatrix” bugged?

      const bool ok = tempMatrix.GaussJordan(MaxAxes, 2 * MaxAxes);
      
      posted in General Discussion
      larsundefined
      lars
    • RE: Cat6 cable for PanelDue

      I redid the wiring as David suggested and finally took the time to design a case for the PanelDuo.
      I did a mount that lets you put it anywhere on a horizontal 40x40 alu extrusion. The three meter cat6 cables gives great range.
      I printed it in PLA 0.6 nozzle and 0.3 layer hieght.

      I'm pretty happy with the result.

      posted in Duet Hardware and wiring
      larsundefined
      lars
    • RE: Cat6 cable for PanelDue

      Thank you David! I should have asked before I hooked it up 🙂
      If theres a problem with my current setup I'll redo the power and use the last conductor…

      posted in Duet Hardware and wiring
      larsundefined
      lars
    • RE: Place to show off PCB Effector assemblies

      Don't have any equipment that can measure resistance that low… I found https://en.wikipedia.org/wiki/Power_over_Ethernet talking about different PoE standards. They have the current from 350mA to 960mA per pairs of pairs. So 960/2*3=1444mA for three pairs…

      Sorry for the off topic, I'll stop this line of discussion an let you guys show of you new effecors 🙂

      posted in Smart effector for delta printers
      larsundefined
      lars
    • RE: Place to show off PCB Effector assemblies

      I do believe cat6 is supposed to be 23awg (altho Im sure there are some 24 or even thinner cat6 cables out there). 1.4A per pair sounds a bit much tho…

      posted in Smart effector for delta printers
      larsundefined
      lars
    • RE: Place to show off PCB Effector assemblies

      Looks good DjDemonD! I'm looking into using cat6 (or cat5e) cables for my printer. Do you think 6 pairs would be enough for 40W 24V?

      posted in Smart effector for delta printers
      larsundefined
      lars
    • Cat6 cable for PanelDue

      I needed a longer cable for my PanelDue and I thought I would try using cat6 cable and keystone connectors.
      The duet3d wiki states the resistance per conductor should not exceed 0.1 ohm. I have seen dc loop resistance figures from 10-20 ohm for 100m. For “non loop” 1m that would be 0.05-0.1 ohm.
      I connected ground (black) to each of the four pairs and the red, blue and green to the other conductor in the pairs (one conductor left unused). Don’t know if this is the best way to do it? I guess I could have use one pair for each colour and should get half the resistance…? Anyway, I tested with a 3m cable which will probably put me over 0.1 ohm but everything appears to work.

      Might be something others can consider if they have a big printer and need longer cable.

      Now I need to design a better case for it.

      posted in Duet Hardware and wiring
      larsundefined
      lars
    • RE: Firmware 1.19 released

      Great work David! Lots of nice features in 1.19!

      posted in Firmware installation
      larsundefined
      lars
    • RE: Unretract on head change

      I find https://duet3d.com/wiki/G-code#T:_Select_Tool gives a good description of when tool change scrips are run, unless some thing changed?

      posted in Firmware installation
      larsundefined
      lars