OnHomingSwitchTriggered
-
I am trying to get OnHomingSwitchTriggered running while prototyping custom firmware and im having problems with getting the dda.SetDriveCoordinates working. Activating usb debug mode, the firmware log tells me that the cartesian values are always set to nan,nan,nan. Any idea of what I am doing wrong?
Also, how do I save the homing position in to an array when the homing switch is triggered? How do I get my hands on the the machinePos and motorPos coordinates in the function OnHomeingSwitchTriggered?
-
@niku said in OnHomingSwitchTriggered:
I am trying to get OnHomingSwitchTriggered running while prototyping custom firmware and im having problems with getting the dda.SetDriveCoordinates working. Activating usb debug mode, the firmware log tells me that the cartesian values are always set to nan,nan,nan. Any idea of what I am doing wrong?
The Cartesian values are calculated by the kinematics class in use, and use the steps/mm values. What kinematics have you selected, and what steps/mm have you declared using M92 commands in config.g?
Also, how do I save the homing position in to an array when the homing switch is triggered? How do I get my hands on the the machinePos and motorPos coordinates in the function OnHomeingSwitchTriggered?
The DDA is passed as a parameter to OnHomingSwitchTriggered, and it contains the endPoint array (the motor positoins) and the endCoordinates array (that Cartesian position). The endPoint array can be read via function DriveCoordinates, and endCoordinate elements can be retrieved via function GetEndCoordinate.
-
The kinematics selected is code modded from the hangprinterkinematics. The code is now includes some changed functionality for a 4 wire machine and other things I am experimenting with. For testing purposes, I added the new kinematics to position M669 K13.
I will ask for instructions in how to add the kinematics to the repo when I get the code ready and tested The machine seems to be moving as it should(not taking homing into account) and steps/mm is set to 100 at the moment. Homing mode is homeIndividualMotors.And cool thanks, I'll check the DDA endPoint array, I am trying to get the machine to automatically calculate its dimensions by using the stallguard functionality.