MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 03, 2018 05:48AM |
Registered: 6 years ago Posts: 211 |
#if ENABLED(HAVE_TMC2130) // Select this if use software SPI. Choose pins in Configuration_pins.h //#define SOFT_SPI_TMC2130 // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY #define X_IS_TMC2130 //#define X2_IS_TMC2130 #define Y_IS_TMC2130 //#define Y2_IS_TMC2130 #define Z_IS_TMC2130 #define Z2_IS_TMC2130 #define E0_IS_TMC2130 //#define E1_IS_TMC2130 //#define E2_IS_TMC2130 //#define E3_IS_TMC2130 //#define E4_IS_TMC2130 //#define E5_IS_TMC2130 /** * Stepper driver settings */ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #define X_MICROSTEPS 16 // 0..256 #define Y_CURRENT 800 #define Y_MICROSTEPS 16 #define Z_CURRENT 800 #define Z_MICROSTEPS 16 #define X2_CURRENT 800 #define X2_MICROSTEPS 16 #define Y2_CURRENT 800 #define Y2_MICROSTEPS 16 #define Z2_CURRENT 800 #define Z2_MICROSTEPS 16 #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E1_CURRENT 800 #define E1_MICROSTEPS 16 #define E2_CURRENT 800 #define E2_MICROSTEPS 16 #define E3_CURRENT 800 #define E3_MICROSTEPS 16 #define E4_CURRENT 800 #define E4_MICROSTEPS 16 #define E5_CURRENT 800 #define E5_MICROSTEPS 16 /** * Use Trinamic's ultra quiet stepping mode. * When disabled, MK4duo will use spreadCycle stepping mode. */ //#define STEALTHCHOP /** * Monitor Trinamic TMC2130 drivers for error conditions, * like overtemperature and short to ground. * In the case of overtemperature MK4duo can decrease the driver current until error condition clears. * Other detected conditions can be used to stop the current print. * Relevant g-codes: * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. * M911 - Report stepper driver overtemperature pre-warn condition. * M912 - Clear stepper driver overtemperature pre-warn condition flag. * M922 S0/1 - Report driver parameters (Requires TMC_DEBUG) */ //#define MONITOR_DRIVER_STATUS #if ENABLED(MONITOR_DRIVER_STATUS) #define CURRENT_STEP_DOWN 50 // [mA] #define REPORT_CURRENT_CHANGE #define STOP_ON_ERROR #endif /** * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. * This mode allows for faster movements at the expense of higher noise levels. * STEALTHCHOP needs to be enabled. * M913 X/Y/Z/E to live tune the setting */ //#define HYBRID_THRESHOLD #define X_HYBRID_THRESHOLD 100 // [mm/s] #define X2_HYBRID_THRESHOLD 100 #define Y_HYBRID_THRESHOLD 100 #define Y2_HYBRID_THRESHOLD 100 #define Z_HYBRID_THRESHOLD 2 #define Z2_HYBRID_THRESHOLD 2 #define E0_HYBRID_THRESHOLD 30 #define E1_HYBRID_THRESHOLD 30 #define E2_HYBRID_THRESHOLD 30 #define E3_HYBRID_THRESHOLD 30 #define E4_HYBRID_THRESHOLD 30 #define E5_HYBRID_THRESHOLD 30 /** * Use stallGuard2 to sense an obstacle and trigger an endstop. * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. * X, Y and Z homing will always be done in spreadCycle mode. * * X/Y/Z HOMING SENSITIVITY is used for tuning the trigger sensitivity. * Higher values make the system LESS sensitive. * Lower value make the system MORE sensitive. * Too low values can lead to false positives, while too high values will collide the axis without triggering. * It is advised to set X/Y/Z HOME BUMP MM to 0. * M914 X/Y/Z to live tune the setting */ //#define SENSORLESS_HOMING #if ENABLED(SENSORLESS_HOMING) #define X_HOMING_SENSITIVITY 8 #define Y_HOMING_SENSITIVITY 8 #define Z_HOMING_SENSITIVITY 8 #endif /** * Enable M922 debugging command for TMC stepper drivers. * M922 S0/1 will enable continous reporting. */ //#define TMC_DEBUG /** * M915 Z Axis Calibration * * - Adjust Z stepper current, * - Drive the Z axis to its physical maximum, and * - Home Z to account for the lost steps. * * Use M915 Snn to specify the current. * Use M925 Znn to add extra Z height to Z_MAX_POS. */ //#define TMC_Z_CALIBRATION #if ENABLED(TMC_Z_CALIBRATION) #define CALIBRATION_CURRENT 250 #define CALIBRATION_EXTRA_HEIGHT 10 #endif /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page * [github.com] * * Example: * #define TMC_ADV() { \ * stepperX.diag0_temp_prewarn(1); \ * stepperY.interpolate(0); \ * } */ #define TMC_ADV() { } #endif // ENABLED(HAVE_TMC2130)
"C:\Users\xxxx\Desktop\xxxx\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\xxxx\Desktop\xxxx\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\cores\arduino" "-IC:\Users\xxxx\Desktop\xxxx\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\variants\mega" "-IC:\Users\xxxx\Desktop\xxxx\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\xxxx\Documents\Arduino\libraries\TMC2130Stepper-master\src" "-IC:\Users\xxxx\Desktop\xxxx\arduino-1.8.5-windows\arduino-1.8.5\libraries\LiquidCrystal\src" "-IC:\Users\xxxx\Documents\Arduino\libraries\U8glib\src" "C:\Users\xxxx\AppData\Local\Temp\arduino_build_473987\sketch\src\core\commands\commands.cpp" -o "C:\Users\xxxx\AppData\Local\Temp\arduino_build_473987\sketch\src\core\commands\commands.cpp.o" In file included from C:\Users\xxxx\AppData\Local\Temp\arduino_build_473987\sketch\src\core\commands\gcode/gcode.h:118:0, from C:\Users\xxxx\AppData\Local\Temp\arduino_build_473987\sketch\src\core\commands\commands.cpp:30: C:\Users\xxxx\AppData\Local\Temp\arduino_build_473987\sketch\src\core\commands\gcode/feature/m911_m915.h: In function 'void gcode_M912()': C:\Users\xxxx\AppData\Local\Temp\arduino_build_473987\sketch\src\core\commands\gcode/feature/m911_m915.h:82:57: error: 'extended_axis_codes' was not declared in this scope if (clearZ || clearAll) tmc_clear_otpw(stepperZ2, extended_axis_codes[TMC_Z2]); ^ Uso la libreria SPI alla versione 1.0 nella cartella: C:\Users\xxxx\Desktop\xxxx\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\libraries\SPI Uso la libreria TMC2130Stepper-master alla versione 2.3.0 nella cartella: C:\Users\xxxx\Documents\Arduino\libraries\TMC2130Stepper-master Uso la libreria LiquidCrystal alla versione 1.0.7 nella cartella: C:\Users\xxxx\Desktop\xxxx\arduino-1.8.5-windows\arduino-1.8.5\libraries\LiquidCrystal Uso la libreria U8glib alla versione 1.19.1 nella cartella: C:\Users\xxxx\Documents\Arduino\libraries\U8glib exit status 1 Errore durante la compilazione per la scheda Arduino/Genuino Mega or Mega 2560.
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 03, 2018 01:44PM |
Registered: 12 years ago Posts: 414 |
--- Prusa i3 Steel (20x20x20) --- Prusa i3 Steel XL (30x30x30)
Motori 200 passi Motori 400 passi
Stepper drive - DRV8825 Stepper drive - DRV8825
RAMPS 1.4 RADDS 1.5
HotEnd IeC HotEnd IeC
FW MK4DUO 4.3.2 FW MK4DUO 4.3.5
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 03, 2018 04:51PM |
Registered: 6 years ago Posts: 211 |
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 04, 2018 02:16AM |
Registered: 12 years ago Posts: 414 |
--- Prusa i3 Steel (20x20x20) --- Prusa i3 Steel XL (30x30x30)
Motori 200 passi Motori 400 passi
Stepper drive - DRV8825 Stepper drive - DRV8825
RAMPS 1.4 RADDS 1.5
HotEnd IeC HotEnd IeC
FW MK4DUO 4.3.2 FW MK4DUO 4.3.5
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 04, 2018 03:11AM |
Registered: 6 years ago Posts: 211 |
#if ENABLED(X2_IS_TMC2130) || (ENABLED(X2_IS_TMC2208) && PIN_EXISTS(X2_SERIAL_RX)) if (clearX || clearAll) tmc_clear_otpw(stepperX2, TMC_X2); #endif
#if ENABLED(Z2_IS_TMC2130) || (ENABLED(Z2_IS_TMC2208) && PIN_EXISTS(Z2_SERIAL_RX)) if (clearZ || clearAll) tmc_clear_otpw(stepperZ2, extended_axis_codes[TMC_Z2]);
extended_axis_codes[TMC_Z2]La quale non risulta essere dichiarata da nessuna parte, ho spulciato quasi tutti i file del FW senza trovare la dichiarazione necessaria.
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 04, 2018 03:38AM |
Registered: 12 years ago Posts: 414 |
Quote
whitedavil
PS: Come si può vedere nel config_overall ho selezionato la board MKS gen L, in quanto la mia non è presente, ma dando una rapida occhiata allo schema elettrico, le differenze sono irrilevanti.
Oltre al file per la configurazione dei TMC postato nel primo post e il config_overall in allegato non ho modificato altro, il resto l'ho configurato a mano online direttamente, senza usare il vecchio overall che in molti casi mi crea più problemi che benefici.
--- Prusa i3 Steel (20x20x20) --- Prusa i3 Steel XL (30x30x30)
Motori 200 passi Motori 400 passi
Stepper drive - DRV8825 Stepper drive - DRV8825
RAMPS 1.4 RADDS 1.5
HotEnd IeC HotEnd IeC
FW MK4DUO 4.3.2 FW MK4DUO 4.3.5
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 04, 2018 06:11AM |
Registered: 6 years ago Posts: 211 |
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 04, 2018 03:54PM |
Registered: 10 years ago Posts: 6,409 |
extended_axis_codes[TMC_Z2]
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 05, 2018 03:22AM |
Registered: 7 years ago Posts: 1,059 |
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 05, 2018 08:08AM |
Registered: 6 years ago Posts: 211 |
Re: MK4DUO 4.3.6 + TMC2130SPI e 2 motori Z May 06, 2018 12:12PM |
Registered: 10 years ago Posts: 6,409 |
Quote
whitedavil
Per sfizio ho buttato un occhio a Marlin, relativo alla stessa parte di codice. Si nota subito che sono 2 fw completamente differenti.