Overriding feed rate in a subroutine

More
14 Aug 2013 23:17 #37674 by DaBit
Hi all,

For some repeating tasks I prefer to write a subroutine and call that either from a GUI, MDI or a small piece of G-code.
I also like to pass as little parameters as possible to the subroutines. For example: a 'mill circular hole' subroutine usually only needs diameter and depth; the current coordinates, tool radius, etc. are all accessible though numbered parameters (#5000-#5601). Feed rate, spindle speed, etc. should be aready set just like you do for a G1 move or canned cycle for example.

But sometimes I would like to temporarily reduce or increase feedrate in a subroutine. Sharp corners, a plunge move, a finish pass, etcetera.

Is there a method to alter the current set feedrate? Either by changing it percentually, or by accessing the current feed rate, doing the math, and executing an F #<NewFeedRate> command?

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

More
14 Aug 2013 23:41 #37677 by ArcEye
Hi

If you use the master (not sure how much has migrated down to 2.5)

see www.linuxcnc.org/docs/devel/html/gcode/o...ub:system-parameters

eg. F[#<_feed> * 0.8] would reduce by 20%

regards

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

More
15 Aug 2013 02:32 #37678 by BigJohnT
If your using Axis just move the Feed Override slider or press help to see the keyboard shortcuts.

JT

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

More
16 Aug 2013 02:40 - 16 Aug 2013 03:37 #37719 by DaBit

Hi

If you use the master (not sure how much has migrated down to 2.5)


This is exactly what I need. :)
But unfortunately running an F1234 followed by (debug, #<_feed>) in the MDI window of axis 2.5.3 results in '######'. So I suppose it is not supported in 2.5

Is there a guide on how to 'use the master'? And is it stable enough to run a hobby machine? I do not mind a glitch here and there, but endmills and stock material still cost money.

[edit]
Just found this: wiki.linuxcnc.org/cgi-bin/wiki.pl?Installing_LinuxCNC
Might be the answer to the previous question
[/edit]

[edit2]
I compiled 2.6.0~pre in a local VirtualBox session, and f1234 followed by (debug, #<_feed>) in MDI results in ' 1234.0'. Yay!
Might want to do that on the machine control PC too...
[/edit2]

If your using Axis just move the Feed Override slider or press help to see the keyboard shortcuts.


I am aware of that slider and it' s associated shortcut keys, but I want to do this from within an O-word subroutine.
Last edit: 16 Aug 2013 03:37 by DaBit.

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

More
16 Aug 2013 15:09 #37731 by ArcEye
Hi

Looks like you got there

Is there a guide on how to 'use the master'? And is it stable enough to run a hobby machine? I do not mind a glitch here and there, but endmills and stock material still cost money.


If you download the master as a snapshot release from buildbot, rather than the current git repo, you should get a pretty stable build.
I use it all the time, unless trying to answer a query specific to 2.5.x and have no problems.

Make sure you use the docs at
www.linuxcnc.org/docs/devel/html
and you should have all the correct info for the various changes

regards

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

More
16 Aug 2013 16:24 #37733 by DaBit
Works on my VirtualBox test machine also. Running axis 2.6.0-pre0-4677-g492421b at the moment :lol:
I will do the same on the CNC box.

Is there a list somewhere with 2.6.0-pre differences/enhancements compared to 2.5.3?
Since I'm running a pre-release now, are there specific areas the developers would like some testing/feedback?

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

More
16 Aug 2013 16:41 #37734 by ArcEye
Quite a lot of the new stuff comes under this heading

www.linuxcnc.org/docs/devel/html/remap/structure.html

but there are changes all over.

I should just use it however suits you and if you hit a problem that seems to be a bug, shout out (after checking several times :laugh: )

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

More
16 Aug 2013 19:10 - 16 Aug 2013 19:12 #37741 by DaBit
OK, thanks so far. This problem is perfectly solved.

I have two more:
- How do I rotate the coordinate system in such a way that jogging is also included? I am aware of 'G10 L2 P0 Rxx', but that doesn't work for jogging. The reason behind this: I would like to clamp a workpiece to the table without perfectly aligning it, touch off two known features, and calculate a coordinate transform. It would be nice if I can plug in a 4x4 matrix somewhere to convert workpiece coordinates to machine coordinates.
- How does one create a 'perfect spiral'? I can approximate one using line or (better) arc segments, but it is not a 'perfect continuous' spiral.

If you would like me to create separate topics for this: fine with me.
Last edit: 16 Aug 2013 19:12 by DaBit.

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

More
16 Aug 2013 19:51 #37743 by ArcEye

How does one create a 'perfect spiral'? I can approximate one using line or (better) arc segments, but it is not a 'perfect continuous' spiral.


Depends exactly what you mean by spiral.

This will produce a downwards cutting helix
G01 X0 Y0 Z0
G02 X0 Y0 Z-50 I0 J50
G02 X0 Y0 Z-100 I0 J50
G02 X0 Y0 Z-150 I0 J50



Or do you mean a plot which remains in the same Z plane and goes from outside diameter to the centre?

regards
Attachments:

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

More
16 Aug 2013 20:21 #37744 by DaBit
Same Z plane. Like this:



Code used to generate this is also in the image, and is hacked together quickly (so not too good).
Quite a close approximation to a spiral, but still an approximation consisting of multiple arc segments.

I keep on thinking that such a basic shape as a spiral should be very easy to generate, but I just don't see it.

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

Time to create page: 0.210 seconds
Powered by Kunena Forum