浏览代码

2.0 IDEX Independent z offset and other fixes (#11862)

* Add Formbot Raptor board

Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com>

* Add a second Z probe Z offset

Co-Authored-By: InsanityAutomation <insanityautomation@users.noreply.github.com>

* Modify method to utilize live adjustment of hotend z offset

Should probably move config option to babystepping and rename as it may now apply to all multiextruder systems

* Move config item and catchup other code to current method
InsanityAutomation 6 年前
父节点
当前提交
1104054d73

+ 4
- 0
Marlin/Configuration_adv.h 查看文件

775
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
775
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
776
                                         // Note: Extra time may be added to mitigate controller latency.
776
                                         // Note: Extra time may be added to mitigate controller latency.
777
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
777
   //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
778
+
779
+  // Allow babystepping tool z offsets, allowing compensation for tools at different heights.
780
+  // Ignored in Independent X Carriage Duplicate mode, where tool 0 Z probe offset will be used.
781
+  //#define BABYSTEP_HOTEND_Z_OFFSET
778
 #endif
782
 #endif
779
 
783
 
780
 // @section extruder
784
 // @section extruder

+ 1
- 1
Marlin/src/config/examples/Formbot/T-Rex_2+/Configuration.h 查看文件

138
 // The following define selects which electronics board you have.
138
 // The following define selects which electronics board you have.
139
 // Please choose the name from boards.h that matches your setup
139
 // Please choose the name from boards.h that matches your setup
140
 #ifndef MOTHERBOARD
140
 #ifndef MOTHERBOARD
141
-  #define MOTHERBOARD BOARD_FORMBOT_TREX2
141
+  #define MOTHERBOARD BOARD_FORMBOT_TREX2PLUS
142
 #endif
142
 #endif
143
 
143
 
144
 // Optional custom name for your RepStrap or other custom machine
144
 // Optional custom name for your RepStrap or other custom machine

+ 3
- 2
Marlin/src/core/boards.h 查看文件

75
 #define BOARD_AZTEEG_X3_PRO     68    // Azteeg X3 Pro
75
 #define BOARD_AZTEEG_X3_PRO     68    // Azteeg X3 Pro
76
 #define BOARD_ULTIMAIN_2        72    // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
76
 #define BOARD_ULTIMAIN_2        72    // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
77
 #define BOARD_RUMBA             80    // Rumba
77
 #define BOARD_RUMBA             80    // Rumba
78
-#define BOARD_FORMBOT_TREX2     81    // Formbot version 1
79
-#define BOARD_FORMBOT_TREX3     82    // Formbot T-Rex 3 revision
78
+#define BOARD_FORMBOT_TREX2PLUS 95    // Formbot version 1
79
+#define BOARD_FORMBOT_TREX3     96    // Formbot T-Rex 3 revision
80
+#define BOARD_FORMBOT_RAPTOR    97    // Formbot version 1
80
 #define BOARD_BQ_ZUM_MEGA_3D    503   // bq ZUM Mega 3D
81
 #define BOARD_BQ_ZUM_MEGA_3D    503   // bq ZUM Mega 3D
81
 #define BOARD_MAKEBOARD_MINI    431   // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
82
 #define BOARD_MAKEBOARD_MINI    431   // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
82
 #define BOARD_TRIGORILLA_13     343   // TriGorilla Anycubic version 1.3 based on RAMPS EFB
83
 #define BOARD_TRIGORILLA_13     343   // TriGorilla Anycubic version 1.3 based on RAMPS EFB

+ 17
- 3
Marlin/src/gcode/motion/M290.cpp 查看文件

36
 
36
 
37
 #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
37
 #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
38
   FORCE_INLINE void mod_zprobe_zoffset(const float &offs) {
38
   FORCE_INLINE void mod_zprobe_zoffset(const float &offs) {
39
-    zprobe_zoffset += offs;
40
-    SERIAL_ECHO_START();
41
-    SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
39
+    #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
40
+      if (active_extruder == 0)
41
+      {
42
+        zprobe_zoffset += offs;
43
+        SERIAL_ECHO_START();
44
+        SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
45
+      } else {
46
+          hotend_offset[Z_AXIS][active_extruder] -= offs;
47
+          SERIAL_ECHO_START();
48
+          SERIAL_ECHOLNPAIR(MSG_IDEX_Z_OFFSET ": ", hotend_offset[Z_AXIS][active_extruder]);
49
+        }
50
+    #else
51
+      zprobe_zoffset += offs;
52
+      SERIAL_ECHO_START();
53
+      SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
54
+    #endif
55
+
42
   }
56
   }
43
 #endif
57
 #endif
44
 
58
 

+ 2
- 0
Marlin/src/gcode/probe/M851.cpp 查看文件

32
   if (parser.seenval('Z')) {
32
   if (parser.seenval('Z')) {
33
     const float value = parser.value_linear_units();
33
     const float value = parser.value_linear_units();
34
     if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
34
     if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
35
+    {
35
       zprobe_zoffset = value;
36
       zprobe_zoffset = value;
37
+    }
36
     else {
38
     else {
37
       SERIAL_ERROR_START();
39
       SERIAL_ERROR_START();
38
       SERIAL_ERRORLNPGM("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");
40
       SERIAL_ERRORLNPGM("?Z out of range (" STRINGIFY(Z_PROBE_OFFSET_RANGE_MIN) " to " STRINGIFY(Z_PROBE_OFFSET_RANGE_MAX) ")");

+ 24
- 4
Marlin/src/lcd/ultralcd.cpp 查看文件

1317
 
1317
 
1318
           const float new_zoffset = zprobe_zoffset + planner.steps_to_mm[Z_AXIS] * babystep_increment;
1318
           const float new_zoffset = zprobe_zoffset + planner.steps_to_mm[Z_AXIS] * babystep_increment;
1319
           if (WITHIN(new_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
1319
           if (WITHIN(new_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) {
1320
-            thermalManager.babystep_axis(Z_AXIS, babystep_increment);
1321
-            zprobe_zoffset = new_zoffset;
1320
+
1321
+
1322
+            #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
1323
+              if (active_extruder == 0)
1324
+              {
1325
+                thermalManager.babystep_axis(Z_AXIS, babystep_increment);
1326
+                zprobe_zoffset = new_zoffset;
1327
+              } else {
1328
+                  thermalManager.babystep_axis(Z_AXIS, babystep_increment);
1329
+                  hotend_offset[Z_AXIS][active_extruder] -= (planner.steps_to_mm[Z_AXIS] * babystep_increment);
1330
+                }
1331
+            #else
1332
+              zprobe_zoffset = new_zoffset;
1333
+            #endif
1322
             lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
1334
             lcdDrawUpdate = LCDVIEW_CALL_REDRAW_NEXT;
1323
           }
1335
           }
1324
         }
1336
         }
1325
         if (lcdDrawUpdate) {
1337
         if (lcdDrawUpdate) {
1326
-          lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
1338
+          #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
1339
+            if (active_extruder == 0) {
1340
+              lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
1341
+            } else {
1342
+              lcd_implementation_drawedit(PSTR(MSG_IDEX_Z_OFFSET), ftostr43sign(hotend_offset[Z_AXIS][active_extruder]));
1343
+            }
1344
+          #endif
1327
           #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
1345
           #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
1328
-            _lcd_zoffset_overlay_gfx(zprobe_zoffset);
1346
+            if (active_extruder == 0) {
1347
+              _lcd_zoffset_overlay_gfx(zprobe_zoffset);
1348
+            }
1329
           #endif
1349
           #endif
1330
         }
1350
         }
1331
       }
1351
       }

+ 1
- 0
Marlin/src/lcd/ultralcd.h 查看文件

46
     #include "../module/motion.h" // for active_extruder
46
     #include "../module/motion.h" // for active_extruder
47
   #endif
47
   #endif
48
 
48
 
49
+  void lcd_return_to_status();
49
   bool lcd_hasstatus();
50
   bool lcd_hasstatus();
50
   void lcd_setstatus(const char* message, const bool persist=false);
51
   void lcd_setstatus(const char* message, const bool persist=false);
51
   void lcd_setstatusPGM(const char* message, const int8_t level=0);
52
   void lcd_setstatusPGM(const char* message, const int8_t level=0);

+ 8
- 7
Marlin/src/module/configuration_store.cpp 查看文件

153
   //
153
   //
154
   // HAS_BED_PROBE
154
   // HAS_BED_PROBE
155
   //
155
   //
156
-  float zprobe_zoffset;                                 // M851 Z
156
+
157
+  float zprobe_zoffset;
157
 
158
 
158
   //
159
   //
159
   // ABL_PLANAR
160
   // ABL_PLANAR
494
       for (uint8_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_WRITE(dummy);
495
       for (uint8_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_WRITE(dummy);
495
     #endif // MESH_BED_LEVELING
496
     #endif // MESH_BED_LEVELING
496
 
497
 
497
-    _FIELD_TEST(zprobe_zoffset);
498
-
499
     #if !HAS_BED_PROBE
498
     #if !HAS_BED_PROBE
500
       const float zprobe_zoffset = 0;
499
       const float zprobe_zoffset = 0;
501
     #endif
500
     #endif
502
-    EEPROM_WRITE(zprobe_zoffset);
501
+
502
+      _FIELD_TEST(zprobe_zoffset);
503
+      EEPROM_WRITE(zprobe_zoffset);
503
 
504
 
504
     //
505
     //
505
     // Planar Bed Leveling matrix
506
     // Planar Bed Leveling matrix
1180
         for (uint16_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_READ(dummy);
1181
         for (uint16_t q = mesh_num_x * mesh_num_y; q--;) EEPROM_READ(dummy);
1181
       #endif // MESH_BED_LEVELING
1182
       #endif // MESH_BED_LEVELING
1182
 
1183
 
1183
-      _FIELD_TEST(zprobe_zoffset);
1184
-
1185
       #if !HAS_BED_PROBE
1184
       #if !HAS_BED_PROBE
1186
         float zprobe_zoffset;
1185
         float zprobe_zoffset;
1187
       #endif
1186
       #endif
1188
-      EEPROM_READ(zprobe_zoffset);
1187
+
1188
+        _FIELD_TEST(zprobe_zoffset);
1189
+        EEPROM_READ(zprobe_zoffset);
1189
 
1190
 
1190
       //
1191
       //
1191
       // Planar Bed Leveling matrix
1192
       // Planar Bed Leveling matrix

+ 6
- 6
Marlin/src/module/motion.cpp 查看文件

1502
           soft_endstop_max[X_AXIS] = dual_max_x;
1502
           soft_endstop_max[X_AXIS] = dual_max_x;
1503
         }
1503
         }
1504
         else if (dxc_is_duplicating()) {
1504
         else if (dxc_is_duplicating()) {
1505
-          // In Duplication Mode, T0 can move as far left as X_MIN_POS
1505
+          // In Duplication Mode, T0 can move as far left as X1_MIN_POS
1506
           // but not so far to the right that T1 would move past the end
1506
           // but not so far to the right that T1 would move past the end
1507
-          soft_endstop_min[X_AXIS] = base_min_pos(X_AXIS);
1508
-          soft_endstop_max[X_AXIS] = MIN(base_max_pos(X_AXIS), dual_max_x - duplicate_extruder_x_offset);
1507
+          soft_endstop_min[X_AXIS] = X1_MIN_POS;
1508
+          soft_endstop_max[X_AXIS] = MIN(X1_MAX_POS, dual_max_x - duplicate_extruder_x_offset);
1509
         }
1509
         }
1510
         else {
1510
         else {
1511
-          // In other modes, T0 can move from X_MIN_POS to X_MAX_POS
1512
-          soft_endstop_min[axis] = base_min_pos(axis);
1513
-          soft_endstop_max[axis] = base_max_pos(axis);
1511
+          // In other modes, T0 can move from X1_MIN_POS to X1_MAX_POS
1512
+          soft_endstop_min[X_AXIS] = X1_MIN_POS;
1513
+          soft_endstop_max[X_AXIS] = X1_MAX_POS;
1514
         }
1514
         }
1515
       }
1515
       }
1516
     #elif ENABLED(DELTA)
1516
     #elif ENABLED(DELTA)

+ 28
- 5
Marlin/src/module/tool_change.cpp 查看文件

22
 
22
 
23
 #include "tool_change.h"
23
 #include "tool_change.h"
24
 
24
 
25
+#include "probe.h"
25
 #include "motion.h"
26
 #include "motion.h"
26
 #include "planner.h"
27
 #include "planner.h"
27
 
28
 
28
 #include "../Marlin.h"
29
 #include "../Marlin.h"
29
 
30
 
30
-#include "../inc/MarlinConfig.h"
31
-
32
 #if ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0
31
 #if ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0
33
   #include "../gcode/gcode.h" // for dwell()
32
   #include "../gcode/gcode.h" // for dwell()
34
 #endif
33
 #endif
57
   #include "../feature/fanmux.h"
56
   #include "../feature/fanmux.h"
58
 #endif
57
 #endif
59
 
58
 
59
+#if ENABLED(ULTIPANEL)
60
+  #include "../lcd/ultralcd.h"
61
+#endif
62
+
60
 #if DO_SWITCH_EXTRUDER
63
 #if DO_SWITCH_EXTRUDER
61
 
64
 
62
   #if EXTRUDERS > 3
65
   #if EXTRUDERS > 3
498
             active_extruder = tmp_extruder;
501
             active_extruder = tmp_extruder;
499
             update_software_endstops(X_AXIS);
502
             update_software_endstops(X_AXIS);
500
             active_extruder = !tmp_extruder;
503
             active_extruder = !tmp_extruder;
504
+
505
+            // Don't move the new extruder out of bounds
506
+            if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS]))
507
+              no_move = true;
508
+
509
+          #else
510
+              // No software endstops? Use the configured limits
511
+              if (active_extruder == 0) {
512
+                if (!WITHIN(current_position[X_AXIS], X2_MIN_POS, X2_MAX_POS))
513
+                  no_move = true;
514
+              }
515
+              else if (!WITHIN(current_position[X_AXIS], X1_MIN_POS, X1_MAX_POS))
516
+                no_move = true;
501
           #endif
517
           #endif
502
 
518
 
503
-          // Don't move the new extruder out of bounds
504
-          if (!WITHIN(current_position[X_AXIS], soft_endstop_min[X_AXIS], soft_endstop_max[X_AXIS]))
505
-            no_move = true;
519
+          #if ENABLED(ULTIPANEL)
520
+            lcd_return_to_status();
521
+          #endif
506
 
522
 
507
           if (!no_move) set_destination_from_current();
523
           if (!no_move) set_destination_from_current();
508
           dualx_tool_change(tmp_extruder, no_move); // Can modify no_move
524
           dualx_tool_change(tmp_extruder, no_move); // Can modify no_move
569
           #if ENABLED(DEBUG_LEVELING_FEATURE)
585
           #if ENABLED(DEBUG_LEVELING_FEATURE)
570
             if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
586
             if (DEBUGGING(LEVELING)) DEBUG_POS("Move back", destination);
571
           #endif
587
           #endif
588
+          #if ENABLED(DUAL_X_CARRIAGE)
589
+            // Dual x carriage does not properly apply these to current position due to command ordering
590
+            // So we apply the offsets for y and z to the destination here. X cannot have an offset in this mode
591
+            // as it is utilized for X2 home position.
592
+            destination[Y_AXIS] -= hotend_offset[Y_AXIS][active_extruder] - hotend_offset[Y_AXIS][tmp_extruder];
593
+            destination[Z_AXIS] -= hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
594
+          #endif
572
           // Move back to the original (or tweaked) position
595
           // Move back to the original (or tweaked) position
573
           do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
596
           do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
574
           #if ENABLED(DUAL_X_CARRIAGE)
597
           #if ENABLED(DUAL_X_CARRIAGE)

+ 4
- 2
Marlin/src/pins/pins.h 查看文件

132
   #include "pins_AZTEEG_X3_PRO.h"     // ATmega2560                                 env:megaatmega2560
132
   #include "pins_AZTEEG_X3_PRO.h"     // ATmega2560                                 env:megaatmega2560
133
 #elif MB(ULTIMAIN_2)
133
 #elif MB(ULTIMAIN_2)
134
   #include "pins_ULTIMAIN_2.h"        // ATmega2560                                 env:megaatmega2560
134
   #include "pins_ULTIMAIN_2.h"        // ATmega2560                                 env:megaatmega2560
135
-#elif MB(FORMBOT_TREX2)
136
-  #include "pins_FORMBOT_TREX2.h"     // ATmega2560                                 env:megaatmega2560
135
+#elif MB(FORMBOT_RAPTOR)
136
+  #include "pins_FORMBOT_RAPTOR.h"    // ATmega2560                                 env:megaatmega2560
137
+#elif MB(FORMBOT_TREX2PLUS)
138
+  #include "pins_FORMBOT_TREX2PLUS.h" // ATmega2560                                 env:megaatmega2560
137
 #elif MB(FORMBOT_TREX3)
139
 #elif MB(FORMBOT_TREX3)
138
   #include "pins_FORMBOT_TREX3.h"     // ATmega2560                                 env:megaatmega2560
140
   #include "pins_FORMBOT_TREX3.h"     // ATmega2560                                 env:megaatmega2560
139
 #elif MB(RUMBA)
141
 #elif MB(RUMBA)

+ 184
- 0
Marlin/src/pins/pins_FORMBOT_RAPTOR.h 查看文件

1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Formbot pin assignments
25
+ */
26
+
27
+#ifndef __AVR_ATmega2560__
28
+  #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29
+#endif
30
+
31
+#if E_STEPPERS > 3 || HOTENDS > 3
32
+  #error "Formbot supports up to 3 hotends / E-steppers. Comment this line to keep going."
33
+#endif
34
+
35
+#define DEFAULT_MACHINE_NAME "Formbot Raptor"
36
+#define BOARD_NAME           "Formbot Raptor"
37
+
38
+//
39
+// Servos
40
+//
41
+#define SERVO0_PIN         11
42
+#define SERVO1_PIN          6
43
+#define SERVO2_PIN          5
44
+#define SERVO3_PIN         -1
45
+
46
+//
47
+// Limit Switches
48
+//
49
+#define X_MIN_PIN           3
50
+#ifndef X_MAX_PIN
51
+  #define X_MAX_PIN         2
52
+#endif
53
+#define Y_MIN_PIN          14
54
+#define Y_MAX_PIN          15
55
+#define Z_MIN_PIN          18
56
+#define Z_MAX_PIN          19
57
+
58
+//
59
+// Z Probe (when not Z_MIN_PIN)
60
+//
61
+#ifndef Z_MIN_PROBE_PIN
62
+  #define Z_MIN_PROBE_PIN  32
63
+#endif
64
+
65
+//
66
+// Steppers
67
+//
68
+#define X_STEP_PIN         54
69
+#define X_DIR_PIN          55
70
+#define X_ENABLE_PIN       38
71
+#ifndef X_CS_PIN
72
+  #define X_CS_PIN         53
73
+#endif
74
+
75
+#define Y_STEP_PIN         60
76
+#define Y_DIR_PIN          61
77
+#define Y_ENABLE_PIN       56
78
+#ifndef Y_CS_PIN
79
+  #define Y_CS_PIN         49
80
+#endif
81
+
82
+#define Z_STEP_PIN         46
83
+#define Z_DIR_PIN          48
84
+#define Z_ENABLE_PIN       62
85
+#ifndef Z_CS_PIN
86
+  #define Z_CS_PIN         40
87
+#endif
88
+
89
+#define E0_STEP_PIN        26
90
+#define E0_DIR_PIN         28
91
+#define E0_ENABLE_PIN      24
92
+#ifndef E0_CS_PIN
93
+  #define E0_CS_PIN        42
94
+#endif
95
+
96
+#define E1_STEP_PIN        36
97
+#define E1_DIR_PIN         34
98
+#define E1_ENABLE_PIN      30
99
+#ifndef E1_CS_PIN
100
+  #define E1_CS_PIN        44
101
+#endif
102
+
103
+#define E2_STEP_PIN        42
104
+#define E2_DIR_PIN         43
105
+#define E2_ENABLE_PIN      44
106
+
107
+//
108
+// Temperature Sensors
109
+//
110
+#define TEMP_0_PIN         13   // Analog Input
111
+#define TEMP_1_PIN         15   // Analog Input
112
+#define TEMP_BED_PIN       14   // Analog Input
113
+
114
+// SPI for Max6675 or Max31855 Thermocouple
115
+#if DISABLED(SDSUPPORT)
116
+  #define MAX6675_SS       66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
117
+#else
118
+  #define MAX6675_SS       66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
119
+#endif
120
+
121
+//
122
+// Augmentation for auto-assigning RAMPS plugs
123
+//
124
+#if DISABLED(IS_RAMPS_EEB) && DISABLED(IS_RAMPS_EEF) && DISABLED(IS_RAMPS_EFB) && DISABLED(IS_RAMPS_EFF) && DISABLED(IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
125
+  #if HOTENDS > 1
126
+    #if TEMP_SENSOR_BED
127
+      #define IS_RAMPS_EEB
128
+    #else
129
+      #define IS_RAMPS_EEF
130
+    #endif
131
+  #elif TEMP_SENSOR_BED
132
+    #define IS_RAMPS_EFB
133
+  #else
134
+    #define IS_RAMPS_EFF
135
+  #endif
136
+#endif
137
+
138
+//
139
+// Heaters / Fans
140
+//
141
+#define HEATER_0_PIN       10
142
+#define HEATER_1_PIN        7
143
+#define HEATER_BED_PIN     8
144
+
145
+#define LED4_PIN            5
146
+
147
+#define FAN_PIN             9
148
+
149
+#if DISABLED(FILAMENT_RUNOUT_SENSOR)
150
+  #define FAN1_PIN          4
151
+#endif
152
+
153
+//
154
+// Misc. Functions
155
+//
156
+#define SDSS               53
157
+#define LED_PIN            13
158
+
159
+// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
160
+#define FILWIDTH_PIN        5   // Analog Input
161
+
162
+#ifndef PS_ON_PIN
163
+  #define PS_ON_PIN        12
164
+#endif
165
+
166
+//
167
+// LCD / Controller
168
+//
169
+// Formbot only supports REPRAP_DISCOUNT_SMART_CONTROLLER
170
+//
171
+#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
172
+  #define LCD_PINS_RS      16
173
+  #define LCD_PINS_ENABLE  17
174
+  #define LCD_PINS_D4      23
175
+  #define LCD_PINS_D5      25
176
+  #define LCD_PINS_D6      27
177
+  #define LCD_PINS_D7      29
178
+  #define BEEPER_PIN       37
179
+  #define BTN_EN1          31
180
+  #define BTN_EN2          33
181
+  #define BTN_ENC          35
182
+  #define SD_DETECT_PIN    49
183
+  #define KILL_PIN         41
184
+#endif

Marlin/src/pins/pins_FORMBOT_TREX2.h → Marlin/src/pins/pins_FORMBOT_TREX2PLUS.h 查看文件

143
 #define HEATER_BED_PIN     58
143
 #define HEATER_BED_PIN     58
144
 
144
 
145
 #define FAN_PIN             9
145
 #define FAN_PIN             9
146
-//#define FAN1_PIN            4
147
-
146
+#if(DISABLED(FILAMENT_RUNOUT_SENSOR))
147
+  // Though defined as a fan pin, it is utilized as a dedicated laser pin by Formbot. May
148
+  // swapped plug and play with a fil;ament runout sensor.
149
+  #define FAN1_PIN            4 
150
+#endif
148
 
151
 
149
-#if DISABLED(ICSP_PORT_SWITCHES)
150
-  //#define FIL_RUNOUT_PIN    22
151
-  //#define FIL_RUNOUT2_PIN   21
152
-#elif ENABLED(FILAMENT_RUNOUT_SENSOR)
153
-  #define FIL_RUNOUT_PIN   52
154
-  #define FIL_RUNOUT2_PIN  50
152
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
153
+  #define FIL_RUNOUT_PIN   4
154
+  //#define FIL_RUNOUT2_PIN  -1
155
 #endif
155
 #endif
156
 
156
 
157
 //
157
 //

正在加载...
取消
保存