LinuxCNC Features - a kind of NGCGUI

More
31 Jul 2013 20:34 #37291 by pacoblasco
Problem with probe tenmplate on mill machine

Hi:

Now, Im really working with your stuff (nice!), and I've found waht I beleive it is a mistake and now I'm trying to solve (as help). The problem is the sign of the latch direction. On most of the mill machine, the Z axis is working in opposite direction. So, the conditions for latch couldn't be if the latch is bigger or lower than zero. It must be bigger than zero, and in the OPPOSITE direction to the probing direction.

(Probe down)
(Probe SUB)
(G38.2 - probe toward workpiece, stop on contact, signal error if failure)
(G38.3 - probe toward workpiece, stop on contact)
(G38.4 - probe away from workpiece, stop on loss of contact, signal error if failure)
(G38.5 - probe away from workpiece, stop on loss of contact)

O<th_probe> SUB
#<probe_func> = #1
#<feed> = #2
#<latch> = #3
#<latch_feed> = #4
(#5-#13 - axes)

G91 (incremental distance)

G#<probe_func> F#<feed> X#5 Y#6 Z#7
#<l> = [ #<latch> / SQRT[#5*#5 + #6*#6 + #7*#7] ] (probe length)

O<probe-if-00> IF [#<latch> GT 0] AND (latch towards material)
#<l> = [-#<l>]
G0 X[#5*#<l>] Y[#6*#<l>] Z[#7*#<l>]
#<l> = [-#<l>*2]
G#<probe_func> F#<latch_feed> X[#5*#<l>] Y[#6*#<l>] Z[#7*#<l>]
O<probe-if-00> ENDIF

O<probe-if-01> IF [#<latch> LT 0] (latch backwards material)
(print ["%s - %s"%/i,/ for i in [38.2,38.3,38.4,38.5]])
(Flip probe func )
#<probe_func> = [[#<probe_func>*10-380] MOD 4 / 10 + 38.2]
G#<probe_func> F#<latch_feed> X[#5*#<l>] Y[#6*#<l>] Z[#7*#<l>]
O<probe-if-01> ENDIF
G1 X[#8] F[#<_global_probe_feed>]

G90 (Absolute distance mode)

O<th_probe> ENDSUB


(O<th_probe> call [38.2] [#<_global_probe_feed>] [#<_global_latch>] [#<_global_latch_feed>] [0] [0] [-100] [5])
O<th_probe> call [38.2] [50.0 ] [-0.5] [10.0 ] [0] [0] [-100] [5]

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

More
31 Jul 2013 20:41 - 31 Jul 2013 20:59 #37292 by pacoblasco
That's is working for me:
	G#<probe_func> F#<feed> X#5 Y#6 Z#7 
	#<l> = [ #<latch> / SQRT[#5*#5 + #6*#6 + #7*#7] ]  (probe length)		
	
	O<probe-if-00> IF [[#<latch> NE 0] AND [[#5+#6+#7]*#<latch> GT 0]]  (latch towards material)
		#<l> = [-#<l>] 
		G0 X[#5*#<l>] Y[#6*#<l>] Z[#7*#<l>] 
		#<l> = [-#<l>*2] 
		G#<probe_func> F#<latch_feed> X[#5*#<l>] Y[#6*#<l>] Z[#7*#<l>] 
	O<probe-if-00> ENDIF
	
	O<probe-if-01> IF [[#<latch> NE 0] AND [[#5+#6+#7]*#<latch> LT 0]] (latch backwards material)
		(print ["%s - %s"%/i,/ for i in [38.2,38.3,38.4,38.5]])
		(Flip probe func ['38.2 - 38.4', '38.3 - 38.5', '38.4 - 38.2', '38.5 - 38.3'])
		#<probe_func> = [[#<probe_func>*10-380] MOD 4 / 10 + 38.2]
		#<l> = [-#<l>] 
		G#<probe_func> F#<latch_feed> X[#5*#<l>] Y[#6*#<l>] Z[#7*#<l>] 
	O<probe-if-01> ENDIF
        G1 Z[#8] F[#<_global_probe_feed>]
Last edit: 31 Jul 2013 20:59 by pacoblasco.

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

More
31 Jul 2013 21:29 #37297 by Nick
That's is working for me:
What have you changed exactly?
As I remember if latch is less than 0 then we are latching in oposite direction. No mater of direction of the axis.
So probe in the direction
(0,0,-10) (downwards) with latch -1 will do
probing to Z-10
then probing to
Z[-10*latch] = Z[-10*-1/10] = Z1 (in relative coords, i.e. upwards)

if latch is GT 0, latch =1
probe to Z-10
go up to Z[-10 * [-latch]] = Z1
then probe to Z[2*[-latch]] = Z-2

That is how it supposed to work...
is it possible to launch directly pressing one button, or you must save the g-code and then, launche the g-code?
You will have to press refresh or select autorefresh and you'll have to open probing subroutine or remove all features and add new Probing feature.

Working perfectly!!!!
Great, can you shoot any videos? :)

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

More
01 Aug 2013 04:23 #37309 by pacoblasco

That's is working for me:
What have you changed exactly?
I've attached the probe_file. Only one line chnage. I believe that the fix it is needed.
As I remember if latch is less than 0 then we are latching in oposite direction. No mater of direction of the axis.
So probe in the direction
(0,0,-10) (downwards) with latch -1 will do
probing to Z-10
then probing to
Z[-10*latch] = Z[-10*-1/10] = Z1 (in relative coords, i.e. upwards)

if latch is GT 0, latch =1
probe to Z-10
go up to Z[-10 * [-latch]] = Z1
then probe to Z[2*[-latch]] = Z-2

That is how it supposed to work...
is it possible to launch directly pressing one button, or you must save the g-code and then, launche the g-code?
You will have to press refresh or select autorefresh and you'll have to open probing subroutine or remove all features and add new Probing feature.

Working perfectly!!!!
Great, can you shoot any videos? :)

Attachments:

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

More
01 Aug 2013 13:41 #37321 by Nick
You've added: #<l> = [-#<l>]
to
O<probe-if-01> IF [#<latch> LT 0] (latch backwards material)
		(print ["%s - %s"%/i,/ for i in [38.2,38.3,38.4,38.5]])
		(Flip probe func ['38.2 - 38.4', '38.3 - 38.5', '38.4 - 38.2', '38.5 - 38.3'])
		#<probe_func> = [[#<probe_func>*10-380] MOD 4 / 10 + 38.2]
		#<l> = [-#<l>] 
		G#<probe_func> F#<latch_feed> X[#5*#<l>] Y[#6*#<l>] Z[#7*#<l>] 
	O<probe-if-01> ENDIF
Why?
Lets take probing to Z-10 and latch = -1
Then we will have
l = -1/10
and G#<probe_func> F#<latch_feed> Z[-10 * [-1/10 ]]
I.e. probe to Z1 that is seems to be fine

But if we add #<l> = [-#<l>]
we will probe on the same direction again...

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

More
06 Aug 2013 04:36 #37423 by pacoblasco
Think on it.
When you are detectecting by approaching to the material, there are three moves:
- 1. Goto marterial
- 2. Go back (l = -l)
- 1. Goto material slower

When you are using the other aproaching (detecting by separating from the material):
- 1. Goto matertial
- 2. Go back slower until no contact (l must be l=-l)

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

More
06 Aug 2013 14:49 - 06 Aug 2013 14:49 #37425 by Nick

When you are using the other aproaching (detecting by separating from the material):
- 1. Goto matertial
- 2. Go back slower until no contact (l must be l=-l)


Yep, but latch is already less than zerro:
IF [#<latch> LT 0]
So to latch backwards we need to probe in the direction that will point to (first probing vector)*latch, where latch is less than 0.
Last edit: 06 Aug 2013 14:49 by Nick.

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

More
06 Aug 2013 19:37 #37440 by EmcRules
Nick,

I've Installed features on 2.5.3 and am testing it now. Looks really good!!! The only difference was that i had to move my features.ui file to the same directory as my linuxcnc.ini file. Is there a drawing feature for milling or is that only for lathe work? It would be nice to have the drawing feature for milling.

Great work!!!

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

More
06 Aug 2013 19:46 #37441 by Nick
You can try to add it into milling catalog.... but as of now I'm not sure that it will work together with multipass mill....

As of now we have to figure out what to develop next or which features should be modified...

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

More
06 Aug 2013 19:57 #37442 by EmcRules
Yeah I hear you. Looking at the source code I can try to play with what i'm thinking. Additions don't seem to be too bad.

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

Time to create page: 0.211 seconds
Powered by Kunena Forum