- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We use Manual NC to engrave serial numbers and other text using G-Code commands built into the HAAS control (where the Manual NC allows us to pass along a combination of G-code and text parameters to the control).
We need to engrave "Zanesville, OH" which should work with the code:
T41 M6, S15000 M3,G54, M8, G0 X.7432 Y-1.4322, G43 Z.1 H41, G01 Z.1 F100., G187 P3 E0.002, G47 P0 (MADE IN ZANESVILLE,OH.) X.7432 Y-1.4322 I45. J0.125 R.1 Z-0.025 F15. E15. ;, G187
However, the comma in Manual NC is removed from the posted code, as it is interpreted as a carriage return (a.k.a. new line of code).
How can we keep the comma?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi John,
Is that the function that you are using in your postprocessor?
function onPassThrough(text) {
var commands = String(text).split(",");
for (text in commands) {
writeBlock(commands[text]);
}
}It is from: https://knowledge.autodesk.com/support/hsm/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-use-M...
You could replace the comma in the split method with some other ASCII character that generally does not appear in a text and use that character to move to another line. You could use "~" (tilde) for example.
function onPassThrough(text) {
var commands = String(text).split("~");
for (text in commands) {
writeBlock(commands[text]);
}
}
Fusion