Helical milling with a diagonal repeat ?

More
03 Dec 2010 20:20 #5852 by grey1beard
Good clue in that page.
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.

More
03 Dec 2010 20:25 #5853 by andypugh
grey1beard wrote:

.
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.

In that case the original author was not a native english speaker, and then I hacked it about a bit to simplify it.
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.

More
03 Dec 2010 20:31 #5854 by grey1beard
As I hit the submit button, it came to me that your reply might be along those lines.
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.

More
04 Dec 2010 13:01 #5859 by grey1beard
Perhaps I'm doomed to hand write endless code. :(
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

File Attachment:

File Name: diagonal.ngc
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
04 Dec 2010 13:49 #5860 by BigJohnT
Hang in there John and we will figure it out. I'm heading out for the day so if no one solves it by Sunday I can look at it then.

John

Please Log in or Create an account to join the conversation.

More
04 Dec 2010 16:10 #5861 by grey1beard
:laugh:

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

File Attachment:

File Name: 2ndattempt.ngc
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
06 Dec 2010 00:34 - 06 Dec 2010 00:36 #5872 by BigJohnT
grey1beard wrote:

:laugh:

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
Last edit: 06 Dec 2010 00:36 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
06 Dec 2010 10:58 - 06 Dec 2010 11:03 #5876 by grey1beard
grey1beard wrote:

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:

Also that there are some places that you can't switch from incremental to absolute and back again without problems.

I haven't got an example of this at the moment, having got to the final file, I deleted all the earlier attempts.
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. :laugh:
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

File Attachment:

File Name: baffleboard.ngc
File Size:6 KB
Attachments:
Last edit: 06 Dec 2010 11:03 by grey1beard. Reason: explanatory note

Please Log in or Create an account to join the conversation.

More
09 Dec 2010 18:05 #5946 by ArcEye
Hi,

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.

More
09 Dec 2010 18:29 - 09 Dec 2010 18:30 #5947 by grey1beard
ArcEye wrote:

........I'm afraid that at a very basic level you have failed to appreciate what Andy was doing in his first reply.......

Hi ArcEye.
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
Last edit: 09 Dec 2010 18:30 by grey1beard.

Please Log in or Create an account to join the conversation.

Time to create page: 0.169 seconds
Powered by Kunena Forum