September 16, 2022 at 4:01 pm #2063sebasshareParticipant
Reading the forum queries, it is not clear to me where in the code the optical limit switches are used for homming. I have the pins defined in the cpu_map_atmega2560.h (which by the way I don’t understand the second comment in the line “#define C_LIMIT_BIT 5 // MEGA2560 Digital Pin 44 //3 // MEGA2560 Digital Pin 46”) and then in “limits.c there are some functions that read the state of the bits corresponding to those pins. However, I don’t see if I just need to connect the sensor wires to the arduino Mega and it is solved or somewhere in the python script (Asgard) there are the lines of code that perform the home. The question arises since I am not going to use the Asgard interface but I send with another board by serial communication strings strings that define the instructions in Grbl.
I hope I have made myself understood.
Leyendo las consultas del foro, no tengo claro en qué parte del código se emplean los finales de carrera ópticos para hacer el homming. Tengo los pines definidos en el cpu_map_atmega2560.h (que a propósito no comprendo el segundo comentario en la línea “#define C_LIMIT_BIT 5 // MEGA2560 Digital Pin 44 //3 // MEGA2560 Digital Pin 46“) y luego en “limits.c existen algunas funciones que leen el estado de los bits correspondientes a esos pines. Sin embargo, no veo si sólamente debo conectar los cables de los sensores al arduino Mega y está resuelto o en alguna parte del script de python (Asgard) se presenta las lineas de código que realizan el home. La pregunta surge dado que no voy a emplear la interfaz Asgard sino que envío con otra placa por comunicación serial cadenas de strings que definen las instrucciones en Grbl.
Espero me haya hecho entender.
October 2, 2022 at 2:46 pm #2081Angel LMAdmin
- This topic was modified 11 months, 3 weeks ago by Angel LM. Reason: Translated
Hi! I may not be able to give a very concise and accurate answer on this, as I did it many years ago and don’t remember it very well. I will try to do the best I can-
The home cycle is a function of GRBL that I just tuned to work with Thor. In the firmware file
config.h(lines 75 to 79) I added the homming sequence. The firmware file
motion_control.ccalls a function called
limits_go_homethat appears to be in charge of the homming process. And sadly that’s all I can remember :S
About the second comment, I may be wrong but I guess that when I was tunning the configuration file, I wrote the BIT and the digital pin of each sensor associated with its motor. As the motor C uses the same homming sensor as the motor B (as they both power the articulation 2) I copied the configuration of the B motor on the C one and I left the previous comment just in case I would need to locate the sensor’s pins. Same goes for the G motor.
Hope it helps! 😉
- You must be logged in to reply to this topic.