Helical milling with a diagonal repeat ?
- grey1beard
- Offline
- Elite Member
- Posts: 167
- Thank you received: 0
I've now found the PROGRAM_PREFIX , nc files directory, so I should be able to make some progress.
Did spot a "Spiral.ngc" file in the examples folder, so I must watch that one.
John
Please Log in or Create an account to join the conversation.
In that case the original author was not a native english speaker, and then I hacked it about a bit to simplify it..
Why are so many pages of examples of coding written so poorly ?
The coding is probably perfect, but the language that surrounds it is appalling.
Perhaps a good proof that you have it all figured out would be for you to convert it to a more lyrical phraseology. The Wiki pages are all freely editable once you follow the instructions here: wiki.linuxcnc.org/cgi-bin/emcinfo.pl?BasicSteps
Please Log in or Create an account to join the conversation.
- grey1beard
- Offline
- Elite Member
- Posts: 167
- Thank you received: 0
So I'd better get myself in gear, and add yet another string to the bow
Thanks again
John
Please Log in or Create an account to join the conversation.
- grey1beard
- Offline
- Elite Member
- Posts: 167
- Thank you received: 0
Perhaps not.
I can't get the program to call the helix file each time the tool steps an increment.
The best so far was to show the helix path for the first hole, but none of the others. Only the moves to the new locations were displayed.
So I went back to the User manual V2.3, and explored further and found in para 13.4 "Repeat".
The text described exactly what I was trying to do - repeat a milling code(my helix) with a diagonal step between each.
Curiously, it works perfectly for two repeats (drills two holes) but if I try to increase the number it refuses to display any more than two.
I must stress that this is all being done in an AXIS sim, not in a running system.
I think this is the way for me to get what I need, but I can't see what's preventing the display showing the extra repeats.
The code loads, and displays without error reports, but the plot doesn't show the extra holes.
Could someone load my code and see if the AXIS displays more than two helix ? It should be 5.
John
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
- grey1beard
- Offline
- Elite Member
- Posts: 167
- Thank you received: 0
Got it.
Much trial and error, and along the way discovered that it's possible to put "error-free" g-code
into AXIS have it displayed as you typed it, but the plot shows different.
Also that there are some places that you can't switch from incremental to absolute and back again without problems.
Attached code to mill a series of holes along a diagonal path.
Thanks for the help and encouragement,
John
Please Log in or Create an account to join the conversation.
Got it.
Much trial and error, and along the way discovered that it's possible to put "error-free" g-code
into AXIS have it displayed as you typed it, but the plot shows different.
I'm not sure what you mean by this. Do you have an example of what you mean? Are you talking about the backplot when you run your program in the sim?
grey1beard wrote:
Also that there are some places that you can't switch from incremental to absolute and back again without problems.
Attached code to mill a series of holes along a diagonal path.
Thanks for the help and encouragement,
John
Is it a situation where you think you should be able to switch from incremental to absolute but bad things happen?
Sounds like your making some headway... in the warmth of your house.
John
Please Log in or Create an account to join the conversation.
- grey1beard
- Offline
- Elite Member
- Posts: 167
- Thank you received: 0
Got it.
Much trial and error, and along the way discovered that it's possible to put "error-free" g-code
into AXIS have it displayed as you typed it, but the plot shows different.
.....
I now suspect this was operator error - an unnoticed m-code when I started to paste several parts of the final file from two different pages.
grey1beard wrote:
I haven't got an example of this at the moment, having got to the final file, I deleted all the earlier attempts.Also that there are some places that you can't switch from incremental to absolute and back again without problems.
Again, I've had Axis throw up an error code that quotes "near line...." which refers to a part of the code that I've already run without any problems, but I have then pasted in more code further down which seems to produce a retrogressive effect.
If I click OK on the error notice, and inspect the plot, it looks OK, but as this is only in a sim, I can't do an air cut to see what happens.
But if I come across any of these effects again, I'll post it.
One other thing I found, having been shown the quickest way to get two instances of gedit on the desktop(by dragging a tab onto it).
Selecting lines of code in one open file, then dragging them across to the other open file, copies them to that position. A sort of visual "copy & paste" that makes the building up of complex designs much easier for me.
I've attached my finished file to show what I'm making, but I doubt anyone will be any the wiser.
If you're wondering what the comment regarding Dragons is about, that's an in-joke to make me spot problems.(I have a 150 ft long privet hedge in the shape of a dragon)
Managed to get out to the workshop and bring the system into the warm to thaw out and update, but it might be some time before the chips start flying.
Thanks again for helping me get to grips with O-codes and the advantages of the Repeat.
Regards
John
Please Log in or Create an account to join the conversation.
Looking at your 2ndattempt.ngc, I'm afraid that at a very basic level you have failed to appreciate what Andy was doing in his first reply.
Sub(routine)s are discrete portions of code which do a particular task, the exact details of which are determined by the parameters passed to them.
They are declared either in the main gcode file (at the foot of it normally) or in separate files.
O123 sub
code here using params passed
O123 endsub
They must be called by the main program with the
O123 CALL [param1] [param2] etc syntax
A psuedo program block might be
Initial settings
Move to first hole position
do{
CALL sub to cut hole
More holes to cut? -> move to next one
}while(more holes to cut) - loop again
Move to safe position
End program
If you keep the actual code simple (just drilling a hole) and go back to the original reply and work from that, hopefully it will become clear and you can build up from there.
regards
ArcEye
Please Log in or Create an account to join the conversation.
- grey1beard
- Offline
- Elite Member
- Posts: 167
- Thank you received: 0
Hi ArcEye.........I'm afraid that at a very basic level you have failed to appreciate what Andy was doing in his first reply.......
This is the story of my life.
Thanks for your input which I shall study.
It will be a bonus for me to find better ways of coding, for it was a hard slog to get to the stage now where the code actually does what I need it to do.
Regards
John
Please Log in or Create an account to join the conversation.