Skip to content

Commit f8e30f4

Browse files
robpowerthinkyhead
authored andcommitted
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.
1 parent 5c08772 commit f8e30f4

File tree

32 files changed

+279
-0
lines changed

32 files changed

+279
-0
lines changed

Marlin/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,4 +1502,13 @@
15021502
// tweaks made to the configuration are affecting the printer in real-time.
15031503
#endif
15041504

1505+
/**
1506+
* NanoDLP Sync support
1507+
*
1508+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1509+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1510+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1511+
*/
1512+
//#define NANODLP_Z_SYNC
1513+
15051514
#endif // CONFIGURATION_ADV_H

Marlin/Marlin_main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3430,6 +3430,14 @@ inline void gcode_G0_G1(
34303430
#else
34313431
prepare_move_to_destination();
34323432
#endif
3433+
3434+
#if ENABLED(NANODLP_Z_SYNC)
3435+
// If G0/G1 command include Z-axis, wait for move and output sync text.
3436+
if (parser.seenval('Z')) {
3437+
stepper.synchronize();
3438+
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
3439+
}
3440+
#endif
34333441
}
34343442
}
34353443

Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,4 +1502,13 @@
15021502
// tweaks made to the configuration are affecting the printer in real-time.
15031503
#endif
15041504

1505+
/**
1506+
* NanoDLP Sync support
1507+
*
1508+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1509+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1510+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1511+
*/
1512+
//#define NANODLP_Z_SYNC
1513+
15051514
#endif // CONFIGURATION_ADV_H

Marlin/example_configurations/Anet/A6/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,4 +1502,13 @@
15021502
// tweaks made to the configuration are affecting the printer in real-time.
15031503
#endif
15041504

1505+
/**
1506+
* NanoDLP Sync support
1507+
*
1508+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1509+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1510+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1511+
*/
1512+
//#define NANODLP_Z_SYNC
1513+
15051514
#endif // CONFIGURATION_ADV_H

Marlin/example_configurations/Anet/A8/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,4 +1502,13 @@
15021502
// tweaks made to the configuration are affecting the printer in real-time.
15031503
#endif
15041504

1505+
/**
1506+
* NanoDLP Sync support
1507+
*
1508+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1509+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1510+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1511+
*/
1512+
//#define NANODLP_Z_SYNC
1513+
15051514
#endif // CONFIGURATION_ADV_H

Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,4 +1502,13 @@
15021502
// tweaks made to the configuration are affecting the printer in real-time.
15031503
#endif
15041504

1505+
/**
1506+
* NanoDLP Sync support
1507+
*
1508+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1509+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1510+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1511+
*/
1512+
//#define NANODLP_Z_SYNC
1513+
15051514
#endif // CONFIGURATION_ADV_H

Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,4 +1499,13 @@
14991499
// tweaks made to the configuration are affecting the printer in real-time.
15001500
#endif
15011501

1502+
/**
1503+
* NanoDLP Sync support
1504+
*
1505+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1506+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1507+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1508+
*/
1509+
//#define NANODLP_Z_SYNC
1510+
15021511
#endif // CONFIGURATION_ADV_H

Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,4 +1502,13 @@
15021502
// tweaks made to the configuration are affecting the printer in real-time.
15031503
#endif
15041504

1505+
/**
1506+
* NanoDLP Sync support
1507+
*
1508+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1509+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1510+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1511+
*/
1512+
//#define NANODLP_Z_SYNC
1513+
15051514
#endif // CONFIGURATION_ADV_H

Marlin/example_configurations/Cartesio/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,4 +1502,13 @@
15021502
// tweaks made to the configuration are affecting the printer in real-time.
15031503
#endif
15041504

1505+
/**
1506+
* NanoDLP Sync support
1507+
*
1508+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1509+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1510+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1511+
*/
1512+
//#define NANODLP_Z_SYNC
1513+
15051514
#endif // CONFIGURATION_ADV_H

Marlin/example_configurations/Creality/CR-10/Configuration_adv.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,4 +1505,13 @@
15051505
// tweaks made to the configuration are affecting the printer in real-time.
15061506
#endif
15071507

1508+
/**
1509+
* NanoDLP Sync support
1510+
*
1511+
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1512+
* string to enable synchronization with DLP projector exposure. This change will allow to use
1513+
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1514+
*/
1515+
//#define NANODLP_Z_SYNC
1516+
15081517
#endif // CONFIGURATION_ADV_H

0 commit comments

Comments
 (0)