Difference between revisions of "Installing a New Tool"

From Jubilee
Jump to navigation Jump to search
Line 10: Line 10:
 
  T1 ; After this command finishes, the machine will be holding "tool 1."  
 
  T1 ; After this command finishes, the machine will be holding "tool 1."  
 
  ...
 
  ...
To handle this line, we need to write the behavior of the machine such that the tool is holding "tool 1" when that line of GCode finishes executing. Duet handles this by having us write a ''macro'', a short snippet of GCode that executes when the machine encounters a tool change command. There are 3 files that need to be added ''per tool''. They are ''tfreeX.g'', ''tpreX.g'', ''tpostX.g'', where ''X'' is a placeholder for the tool number (starting from 0).
+
To handle this line, we need to write the behavior of the machine such that the tool is holding "tool 1" when that line of GCode finishes executing. Duet handles this by having us write a ''macro'', a short snippet of GCode that executes when the machine encounters a tool change command. There are 3 files that need to be added ''per tool''. They are ''tfreeX.g'', ''tpreX.g'', and  ''tpostX.g'', where ''X'' is a placeholder for the tool number (starting from 0).
  
 
====Writing tfreeX.g====
 
====Writing tfreeX.g====
 
====Writing tpreX.g====
 
====Writing tpreX.g====
 
====Writing tpostX.g====
 
====Writing tpostX.g====

Revision as of 01:18, 11 May 2020

Software

Hardware

Tool Offsets

Tool Parking Post Positions

Tool Change Macros

From a software perspective, executing a tool change is as simple as invoking the T Command of the tool you want to pick up next. In code, it would look like this:

...
T1 ; After this command finishes, the machine will be holding "tool 1." 
...

To handle this line, we need to write the behavior of the machine such that the tool is holding "tool 1" when that line of GCode finishes executing. Duet handles this by having us write a macro, a short snippet of GCode that executes when the machine encounters a tool change command. There are 3 files that need to be added per tool. They are tfreeX.g, tpreX.g, and tpostX.g, where X is a placeholder for the tool number (starting from 0).

Writing tfreeX.g

Writing tpreX.g

Writing tpostX.g