Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop #22648

Closed
r4ph488 opened this issue Aug 27, 2021 · 7 comments
Closed

[BUG] DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop #22648

r4ph488 opened this issue Aug 27, 2021 · 7 comments

Comments

@r4ph488
Copy link

r4ph488 commented Aug 27, 2021

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

Hi Guys,
changed my Firmware and my Board.
Used Bigtreetech Skr Pro v1.1 everthing ok !
Now i will use a Bigtreetech Octopus ( for idex )....
when i configure my marlin i become a sanity check error

DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop.

USE_XMAX_PLUG is activated

is it a bug ?

Bug Timeline

Changed board and new version of marlin

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

2.0.9.1

Printer model

No response

Electronics

No response

Add-ons

No response

Bed Leveling

No response

Your Slicer

No response

Host Software

No response

Additional information & file uploads

No response

@ellensp
Copy link
Contributor

ellensp commented Aug 28, 2021

In Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h It has this code

//
// Limit Switches
//
#ifdef X_STALL_SENSITIVITY
  #define X_STOP_PIN                  X_DIAG_PIN
  #if X_HOME_TO_MIN
    #define X_MAX_PIN                E0_DIAG_PIN  // E0DET
  #else
    #define X_MIN_PIN                E0_DIAG_PIN  // E0DET
  #endif
#elif ENABLED(X_DUAL_ENDSTOPS)
  #ifndef X_MIN_PIN
    #define X_MIN_PIN                 X_DIAG_PIN  // X-STOP
  #endif
  #ifndef X_MAX_PIN
    #define X_MAX_PIN                E0_DIAG_PIN  // E0DET
  #endif
#else
  #define X_STOP_PIN                  X_DIAG_PIN  // X-STOP
#endif

So if you have non sensorless endstops, it doesn't allocate a X_MAX_PIN unless you have X_DUAL_ENDSTOPS

you can add this feature for DUAL_X_CARRIAGE by changeling the following line in pins_BTT_OCTOPUS_V1_common.h
from

#elif ENABLED(X_DUAL_ENDSTOPS)

to

#elif EITHER(X_DUAL_ENDSTOPS, DUAL_X_CARRIAGE)

@r4ph488
Copy link
Author

r4ph488 commented Aug 28, 2021

He ellensp,
thank you for your answer !

I have changed the line at the code.
I use no sensorless homing ....

Changed but its greyed not colored ...

`//
// Trinamic Stallguard pins
//
#define X_DIAG_PIN PG6 // X-STOP
#define Y_DIAG_PIN PG9 // Y-STOP
#define Z_DIAG_PIN PG10 // Z-STOP
#define Z2_DIAG_PIN PG11 // Z2-STOP
#define E0_DIAG_PIN PG12 // E0DET
#define E1_DIAG_PIN PG13 // E1DET
#define E2_DIAG_PIN PG14 // E2DET
#define E3_DIAG_PIN PG15 // E3DET

// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PB7
#endif

//
// Limit Switches
//
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
#define X_MAX_PIN E0_DIAG_PIN // E0DET
#else
#define X_MIN_PIN E0_DIAG_PIN // E0DET
#endif
#elif EITHER(X_DUAL_ENDSTOPS, DUAL_X_CARRIAGE)
#ifndef X_MIN_PIN
#define X_MIN_PIN X_DIAG_PIN // X-STOP
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN E0_DIAG_PIN // E0DET
#endif
#else
#define X_STOP_PIN X_DIAG_PIN // X-STOP
#endif`

The same error

In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:49, from Marlin\src\HAL\STM32\HAL.cpp:30: Marlin\src\HAL\STM32\../../inc/SanityCheck.h:1897:6: error: #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." 1897 | #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." | ^~~~~ In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:49, from Marlin\src\HAL\STM32\MarlinSerial.cpp:23: Marlin\src\HAL\STM32\../../inc/SanityCheck.h:1897:6: error: #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." 1897 | #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." | ^~~~~ In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:49, from Marlin\src\HAL\STM32\HAL_SPI.cpp:27: Marlin\src\HAL\STM32\../../inc/SanityCheck.h:1897:6: error: #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." 1897 | #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." | ^~~~~ *** [.pio\build\BIGTREE_OCTOPUS_V1_USB\src\src\HAL\STM32\HAL.cpp.o] Error 1 In file included from Marlin\src\HAL\STM32\../../inc/MarlinConfig.h:49, from Marlin\src\HAL\STM32\Sd2Card_sdio_stm32duino.cpp:26: Marlin\src\HAL\STM32\../../inc/SanityCheck.h:1897:6: error: #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." 1897 | #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop."

@ellensp
Copy link
Contributor

ellensp commented Aug 28, 2021

USE_XMAX_PLUG must also be defined
I have tested this. it compiles fine

@ellensp
Copy link
Contributor

ellensp commented Aug 28, 2021

full diff from stock config in Marlin

diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 78112d0b76..f7c8b4eed4 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -102,7 +102,7 @@
  *
  * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
  */
-#define SERIAL_PORT 0
+#define SERIAL_PORT -1
 
 /**
  * Serial Port Baud Rate
@@ -139,7 +139,7 @@
 
 // Choose the name from boards.h that matches your setup
 #ifndef MOTHERBOARD
-  #define MOTHERBOARD BOARD_RAMPS_14_EFB
+  #define MOTHERBOARD BOARD_BTT_OCTOPUS_V1_0
 #endif
 
 // Name displayed in the LCD "Ready" message and Info menu
@@ -192,7 +192,7 @@
 
 // This defines the number of extruders
 // :[0, 1, 2, 3, 4, 5, 6, 7, 8]
-#define EXTRUDERS 1
+#define EXTRUDERS 2
 
 // Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
 #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
@@ -461,7 +461,7 @@
  *   999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
  */
 #define TEMP_SENSOR_0 1
-#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_1 1
 #define TEMP_SENSOR_2 0
 #define TEMP_SENSOR_3 0
 #define TEMP_SENSOR_4 0
@@ -751,7 +751,7 @@
 //#define USE_IMIN_PLUG
 //#define USE_JMIN_PLUG
 //#define USE_KMIN_PLUG
-//#define USE_XMAX_PLUG
+#define USE_XMAX_PLUG
 //#define USE_YMAX_PLUG
 //#define USE_ZMAX_PLUG
 //#define USE_IMAX_PLUG
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index 8de88b9507..5c2fc9ca58 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -716,7 +716,7 @@
  *       Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
  *       follow with M605 S3 to initiate mirrored movement.
  */
-//#define DUAL_X_CARRIAGE
+#define DUAL_X_CARRIAGE
 #if ENABLED(DUAL_X_CARRIAGE)
   #define X1_MIN_POS X_MIN_POS   // Set to X_MIN_POS
   #define X1_MAX_POS X_BED_SIZE  // Set a maximum so the first X-carriage can't hit the parked second X-carriage
diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
index 2cf1ee1447..0db3a80964 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
@@ -72,7 +72,7 @@
   #else
     #define X_MIN_PIN                E0_DIAG_PIN  // E0DET
   #endif
-#elif ENABLED(X_DUAL_ENDSTOPS)
+#elif EITHER(X_DUAL_ENDSTOPS, DUAL_X_CARRIAGE)
   #ifndef X_MIN_PIN
     #define X_MIN_PIN                 X_DIAG_PIN  // X-STOP
   #endif
diff --git a/platformio.ini b/platformio.ini
index f55f5f5a93..e89f4fe7ea 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -13,7 +13,7 @@
 [platformio]
 src_dir      = Marlin
 boards_dir   = buildroot/share/PlatformIO/boards
-default_envs = mega2560
+default_envs = BIGTREE_OCTOPUS_V1
 include_dir  = Marlin
 extra_configs =
     ini/avr.ini

@r4ph488
Copy link
Author

r4ph488 commented Aug 28, 2021

Sorry :)
At the bugfix compile fine.
Normal Version gives me the error after changed the line .
Thank you 👍 compiling finish

@ellensp
Copy link
Contributor

ellensp commented Aug 28, 2021

PR to fix this created. Closing.

@ellensp ellensp closed this as completed Aug 28, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants