From f8e30f49d7e4fb8ffa322edd71d88db19c9912e9 Mon Sep 17 00:00:00 2001 From: Rob Power Date: Wed, 8 Nov 2017 20:16:19 +0100 Subject: [PATCH 1/2] Add NanoDLP Z movement synchronization option Implemented synchronization message output for NanoDLP printers (nanodlp.com). If optional feature is enabled in `Configuration_adv.h`, Marlin will ouput "Z_move_comp" string to serial after completing any G0/G1 Z-axis movements. This feature patched on previous versions(1.0) is used by NanoDLP to synchronize Z-axis movement with projector exposure in DLP stereolithography printers. --- Marlin/Configuration_adv.h | 9 +++++++++ Marlin/Marlin_main.cpp | 8 ++++++++ .../AlephObjects/TAZ4/Configuration_adv.h | 9 +++++++++ .../example_configurations/Anet/A6/Configuration_adv.h | 9 +++++++++ .../example_configurations/Anet/A8/Configuration_adv.h | 9 +++++++++ .../BQ/Hephestos/Configuration_adv.h | 9 +++++++++ .../BQ/Hephestos_2/Configuration_adv.h | 9 +++++++++ .../example_configurations/BQ/WITBOX/Configuration_adv.h | 9 +++++++++ .../example_configurations/Cartesio/Configuration_adv.h | 9 +++++++++ .../Creality/CR-10/Configuration_adv.h | 9 +++++++++ Marlin/example_configurations/Felix/Configuration_adv.h | 9 +++++++++ .../FolgerTech/i3-2020/Configuration_adv.h | 9 +++++++++ .../Infitary/i3-M508/Configuration_adv.h | 9 +++++++++ .../Malyan/M150/Configuration_adv.h | 9 +++++++++ .../Micromake/C1/enhanced/Configuration_adv.h | 9 +++++++++ .../example_configurations/RigidBot/Configuration_adv.h | 9 +++++++++ Marlin/example_configurations/SCARA/Configuration_adv.h | 9 +++++++++ .../Sanguinololu/Configuration_adv.h | 9 +++++++++ .../example_configurations/TinyBoy2/Configuration_adv.h | 9 +++++++++ .../Velleman/K8200/Configuration_adv.h | 9 +++++++++ .../Velleman/K8400/Configuration_adv.h | 9 +++++++++ .../delta/FLSUN/auto_calibrate/Configuration_adv.h | 9 +++++++++ .../delta/FLSUN/kossel_mini/Configuration_adv.h | 9 +++++++++ .../delta/generic/Configuration_adv.h | 9 +++++++++ .../delta/kossel_mini/Configuration_adv.h | 9 +++++++++ .../delta/kossel_pro/Configuration_adv.h | 9 +++++++++ .../delta/kossel_xl/Configuration_adv.h | 9 +++++++++ .../gCreate/gMax1.5+/Configuration_adv.h | 9 +++++++++ .../example_configurations/makibox/Configuration_adv.h | 9 +++++++++ .../tvrrug/Round2/Configuration_adv.h | 9 +++++++++ Marlin/example_configurations/wt150/Configuration_adv.h | 9 +++++++++ Marlin/language.h | 1 + 32 files changed, 279 insertions(+) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index c48c3ac197..94fdc452fc 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 939fce6018..b46c3f337f 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -3430,6 +3430,14 @@ inline void gcode_G0_G1( #else prepare_move_to_destination(); #endif + + #if ENABLED(NANODLP_Z_SYNC) + // If G0/G1 command include Z-axis, wait for move and output sync text. + if (parser.seenval('Z')) { + stepper.synchronize(); + SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP); + } + #endif } } diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 2d5510a939..be85e3af9c 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index 125433c39a..7b259c83df 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 581ecfeeb8..89eee1aa58 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index 948caf4053..27c86438d0 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index ebb6a418bc..49bec295b5 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -1499,4 +1499,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index 948caf4053..27c86438d0 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 4ba31ef3f4..e41466ecd8 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index 18b468d6c3..3fda1f63cc 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -1505,4 +1505,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index b5faa8c1bc..08c0b3a033 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index 9584de4b1f..9f157902a6 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index f725a9d84b..d109c39234 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index ec3a6663cc..7cfdf520cd 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -1499,4 +1499,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index 684e8015dd..7e26a37872 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -1506,4 +1506,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index f0a2789c7c..373018c0ab 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index f8dca1f56e..15f460ca4a 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index f90c3899a5..06b398264d 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -1469,4 +1469,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 6ed20d1f9e..78ff161038 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index a71fba52f5..b55f5c4519 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -1510,4 +1510,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 33c7208b33..a961210cf3 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index b41aaf9234..02448e5814 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -1504,4 +1504,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 6c246e40fb..fd2f2e71a3 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -1504,4 +1504,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 6c246e40fb..fd2f2e71a3 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -1504,4 +1504,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 6c246e40fb..fd2f2e71a3 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -1504,4 +1504,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 107e98aa6a..38842d37a5 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -1509,4 +1509,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 407451cf1c..89126be235 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -1504,4 +1504,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index 193ed3a401..b2dbf7f195 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -1503,4 +1503,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index edd2dffe1d..dbea71ab63 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 3d0ddf164d..2eeac781e6 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -1502,4 +1502,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index 52490d33bb..38a12d5e07 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -1492,4 +1492,13 @@ // tweaks made to the configuration are affecting the printer in real-time. #endif +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/language.h b/Marlin/language.h index 94b8d76b3d..54de80c5a8 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -144,6 +144,7 @@ #define MSG_BUSY_PROCESSING "busy: processing" #define MSG_BUSY_PAUSED_FOR_USER "busy: paused for user" #define MSG_BUSY_PAUSED_FOR_INPUT "busy: paused for input" +#define MSG_Z_MOVE_COMP "Z_move_comp" #define MSG_RESEND "Resend: " #define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_ACTIVE_EXTRUDER "Active Extruder: " From 7cf4009838e8ace4d43a5a9b6264b9be28ad5943 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 24 Nov 2017 12:47:10 -0600 Subject: [PATCH 2/2] Fix MK2_MULTIPLEXER stepper indirection Addressing #8544 --- Marlin/stepper_indirection.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Marlin/stepper_indirection.h b/Marlin/stepper_indirection.h index 8b86246412..147a66b7dc 100644 --- a/Marlin/stepper_indirection.h +++ b/Marlin/stepper_indirection.h @@ -429,6 +429,10 @@ #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(INVERT_E1_DIR); } } #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); } } #endif +#elif ENABLED(MK2_MULTIPLEXER) // Even-numbered steppers are reversed + #define E_STEP_WRITE(v) E0_STEP_WRITE(v) + #define NORM_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR) + #define REV_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR) #elif EXTRUDERS > 4 #define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } } #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); } } @@ -472,14 +476,8 @@ #endif #else #define E_STEP_WRITE(v) E0_STEP_WRITE(v) - #if ENABLED(MK2_MULTIPLEXER) - // Even-numbered steppers are reversed - #define NORM_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR) - #define REV_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR) - #else - #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR) - #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR) - #endif + #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR) + #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR) #endif #endif // STEPPER_INDIRECTION_H