This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5
CNC con marlin
#1
Hola decidi transformar la prusa I3 en router cnc. Tengo una placa Arduino 2560 mega ramps 1.4. Uso Marlin. Funciona todo menos los end stop que los configure como normalmente cerrados NC. El tema es que el codigo M119 los reconoce como presionado y no presionado. Pero cuando hago homing probe varias veces y el motor lo presiona y no para en ninguno de los 3 ejes.
La conexion de los end stops es NC a negativo en  la ramps  y COM a señal de la ramps (todo en la parte de end stop)
Configuration H en la parte de end stop:

const bool X_ENDSTOPS_INVERTING = true;
const bool Y_ENDSTOPS_INVERTING = true;
const bool Z_ENDSTOPS_INVERTING = true;


#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1 

Uso cnc js de software 
No use otros firmware porque no los entendi (preferi usar el de la prusa I3)y a parte ya tengo casi todo listo con este

Paso los estados de algunos end stops sin presionar y al presionar y el configuration.H

ESTO SON LOS END STOP los configure como normalmente cerrado
Reporting endstop status
x_min: open
x_max: TRIGGERED
y_min: open
y_max: TRIGGERED
z_min: open
z_max: TRIGGERED
>>> M119
SENDING:M119
Reporting endstop status
x_min: open
x_max: TRIGGERED
y_min: open
y_max: TRIGGERED
z_min: open
z_max: open

este es mi configuration H de marlin

#ifndef CONFIGURATION_H
#define CONFIGURATION_H

#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__
#define STRING_CONFIG_H_AUTHOR "(CNC, sin extrusor)"

//====================== Puerto Serie y Baudrate ============================
#define SERIAL_PORT 0
#define BAUDRATE 250000

//====================== Placa RAMPS 1.3/1.4 en Mega2560 ==================
#ifndef MOTHERBOARD
  #define MOTHERBOARD 34
#endif

//========================= Tipo de fuente de poder ========================
#define POWER_SUPPLY 1

//===========================================================================
//==================== Ajustes Térmicos Desactivados ========================
//===========================================================================
#define TEMP_SENSOR_0 0
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0

#define HEATER_0_MINTEMP 0
#define HEATER_1_MINTEMP 0
#define HEATER_2_MINTEMP 0
#define BED_MINTEMP 0

#define HEATER_0_MAXTEMP 999
#define HEATER_1_MAXTEMP 999
#define HEATER_2_MAXTEMP 999
#define BED_MAXTEMP 999

// Desactivar PIDTEMP
// #define PIDTEMP
#define PID_MAX 256
// #define PIDTEMPBED
#define MAX_BED_POWER 256

// #define PREVENT_DANGEROUS_EXTRUDE
#define EXTRUDE_MINTEMP 0
#define EXTRUDE_MAXLENGTH 999999

//==================== Ajustes Mecánicos/Cinemática =========================
//#define COREXY

#define ENDSTOPPULLUPS
#ifdef ENDSTOPPULLUPS
  #define ENDSTOPPULLUP_XMAX
  #define ENDSTOPPULLUP_YMAX
  #define ENDSTOPPULLUP_ZMAX
  #define ENDSTOPPULLUP_XMIN
  #define ENDSTOPPULLUP_YMIN
  #define ENDSTOPPULLUP_ZMIN
#endif

const bool X_ENDSTOPS_INVERTING = true;
const bool Y_ENDSTOPS_INVERTING = true;
const bool Z_ENDSTOPS_INVERTING = true;

// ANTES tenía: #define DISABLE_MAX_ENDSTOPS
// ---> Comentarla o eliminarla para que Marlin sí use Y_MAX_PIN y Z_MAX_PIN
// #define DISABLE_MAX_ENDSTOPS

// Pines de enable en bajo
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0

// Desactivar ejes si no se usan
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false

// Inversión de ejes
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR false
#define INVERT_E0_DIR true

// Homing en MIN o MAX
#define X_HOME_DIR  1
#define Y_HOME_DIR  1
#define Z_HOME_DIR -1

// Ajustes de límites suaves
#define min_software_endstops false
#define max_software_endstops true

#define X_MAX_POS 205
#define X_MIN_POS 0
#define Y_MAX_POS 205
#define Y_MIN_POS 0
#define Z_MAX_POS 200
#define Z_MIN_POS 0

#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)

// (Opcional) Homing manual
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0

#define NUM_AXIS 4

// Velocidad de homing
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}

//==================== Ajustes de movimiento y aceleraciones =================
#define DEFAULT_AXIS_STEPS_PER_UNIT  {53.33, 80, 2237.76, 97.06}
#define DEFAULT_MAX_FEEDRATE          {200, 200, 5, 45}
#define DEFAULT_MAX_ACCELERATION      {1000,1000,100,10000}
#define DEFAULT_ACCELERATION          400
#define DEFAULT_RETRACT_ACCELERATION  400
#define DEFAULT_XYJERK                10.0
#define DEFAULT_ZJERK                0.4
#define DEFAULT_EJERK                5.0

//#define EEPROM_SETTINGS
//#define EEPROM_CHITCHAT

#define G3D_PANEL
#if defined(ULTIPANEL) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  #define ULTIPANEL
  #define NEWPANEL
#endif



Gracias de antemano por cualquier ayuda
  Responder
#2
Hola @ezequielal42, bienvenid@ al foro.
Para el uso que quieres dar a la máquina, sería mucho mejor que utilizases GRBL en lugar de un Marlin tan antiguo: es bastante sencillo de instalar y configurar, siendo muy similar a Marlin (básicamente es su parte cinemática) y existe una versión para Mega2560.
En relación con tu consulta, si estás utilizando COM y NC del interruptor de final de carrera, conectados a señal y GND en la RAMPS, la configuración que debes poner en los parámetros *_ENDSTOPS_INVERTING es false en lugar de true: los finales de carrera MAX puedes desactivarlos si no los usas.
  Responder
#3
Muchas gracias. Lo voy a probar
  Responder
#4
Estaria bien desactivandolo asi porque no me funciona se siguien viendo todos con M119

// Deshabilitar end stops no utilizados
#define DISABLE_XMIN_ENDSTOP
#define DISABLE_YMIN_ENDSTOP
#define DISABLE_ZMAX_ENDSTOP
  Responder
#5
Como esa versión de Marlin es tan antigua, no recuerdo si el comando M119 solo reportaba los finales de carrera definidos o todos.
En principio, deberías desactivar los que no utilices, descomentando las líneas correspondientes, independientemente de lo que reporte el comando M119.
  Responder