- Posts: 106
- Thank you received: 0
Adapting Clough42's Keyway Broach code - subroutine/o-word newbie
I'm trying to use Clough42's cnc shaping ideas (as in this video: ) to cut keyways on my mill.
Attached is what I've got so far. I can't get the subroutine to happen. If I comment out this line:
48 o<plunge> call
then the file loads without error but ignores the repeat.
If I leave that line in, as I'm expecting to have to do to call the subroutine in the first place, running the file gives this error:
EOF in file:/home/freemoore/Desktop/GenericKeywayForLCNCSeparate.ngc seeking o-word: o<plunge> from line: 48
I must be missing something basic about the syntax of calling o-words. Is the sub supposed to be in a separate file, in a separate folder, or should it work with everything in one file?
Please Log in to join the conversation.
Here is my file and it works. This was a fun project and works great.
Please Log in to join the conversation.
What is the function of FIX in that line as you have it? Mine works without.
Also the reason for mucking around with it, was that LCNC threw an error about the M98 so I spent a chunk of today on the o-word doc pages before I found the bracket error.
Edited files in sublime text and textedit on both mac and linux, no intentional line-ending settings from me.
It is a fun project! Now my mill is a mini-shaper too (thank you Clough42!)
Please Log in to join the conversation.
Please Log in to join the conversation.
freemoore wrote: Thanks for your answer & example - I just got in from the workshop having managed to get the program working, but left the usb stick with it on, inside. Will come back later and post my working code, which is split into two files (probably unnecessary). I lost a square bracket from the equation for #103 when I was mucking around with the code, and put it back in the wrong place which led to it evaluating differently and resulting in no passes.
What is the function of FIX in that line as you have it? Mine works without.
Also the reason for mucking around with it, was that LCNC threw an error about the M98 so I spent a chunk of today on the o-word doc pages before I found the bracket error.
Edited files in sublime text and textedit on both mac and linux, no intentional line-ending settings from me.
It is a fun project! Now my mill is a mini-shaper too (thank you Clough42!)
The FIX function rounds down to an integer but I never looked into why it is need there. I just used Clough42's code and change the parameters to fit my machine/job. I may have changed/added some comments to aid my feeble brain but otherwise just used it,
Since you found the missing bracket to be the cause is appears that the EOL markers are not an issue.
John
Please Log in to join the conversation.
