A RhinoCAM program generated with the Tormach post stops with Bug unknown motion code line 5. The suspect output is N60 G43 0: the post’s first-tool-change template shows that this line is intended to include an H word and the tool adjustment register.
Locate the malformed tool-offset block
N50 T1 M6
N60 G43 0
N70 S4000 M03
The reported line number is ambiguous because the displayed sequence numbers do not identify a line numbered 5. Inspect the generated block itself instead. N60 G43 0 contains a bare numeric value after G43, while the cited post template emits G43 followed by H[TOOL_ADJST_REG].
Correct the Tormach post output
| Location | Current output | Evidence-supported correction |
|---|---|---|
| Generated program | G43 0 |
Regenerate the block with an H word and the selected tool adjustment register. |
| First-tool-change template | Inspect the post configuration. | [SEQ_PRECHAR][SEQNUM][DELIMITER]G43[DELIMITER]H[TOOL_ADJST_REG] |
Check the post’s tool-change section, specifically its first-tool-change output. Restore or correct the template so that [TOOL_ADJST_REG] resolves to the intended register rather than producing 0 without the H prefix.
Use removal only as a diagnostic
- Remove the malformed
G43 0block and rerun the program as a diagnostic check. - If the program runs, the test isolates the failure to the tool-height-offset block, as reported in the evidence.
- Before machining with an offset, restore valid
G43 H...output and confirm that the generated register matches the intended tool adjustment register.
Deleting the block is not a complete repair when tool-height compensation is required. The evidence confirms only that removal allows this program to run; it does not establish that machining without the offset is safe.
Verify the regenerated program
Post the program again and inspect the first tool change. Confirm that the malformed G43 0 line is gone, the replacement includes H plus the intended register, and the controller passes that block without the unknown-motion-code error. Verify the actual tool-offset selection before permitting cutting motion.
FAQ
What causes “Bug unknown motion code line 5” in this Tormach post output?
The evidence isolates the problem to the generated G43 0 block. The post template indicates that this output should contain H[TOOL_ADJST_REG].
Can I delete G43 0 to make the program run?
Removing it allowed the reported program to run and is useful as a diagnostic. Do not treat deletion as the final solution when the operation requires a tool-height offset.
What should I check in the RhinoCAM Tormach post?
Inspect the first-tool-change section for [SEQ_PRECHAR][SEQNUM][DELIMITER]G43[DELIMITER]H[TOOL_ADJST_REG], then confirm that the generated program contains the intended H register.