Hello Guest it is April 16, 2024, 08:40:53 AM

Author Topic: "Z-Correction" problem after Tool-Probing  (Read 8413 times)

0 Members and 1 Guest are viewing this topic.

"Z-Correction" problem after Tool-Probing
« on: April 01, 2015, 04:13:46 PM »
Hello,

It seems that all my problems are related to some sort of weird axis movement (normally Z)

But now it should be a basic mach3 thing that i simply dont see.

How can this behaviour be disabled:

In my M6END file:

After probing a tool and retracting from the sensor I make X&Y movement to the workpiece but my Z-Axis moves the difference between the last during that move!

Code: [Select]

...
Tool_Offset = getVar(2002)+GetOEMDRO(49) 'get probe-trip abs
Call setOEMDRO(42, Tool_Offset)


        Code "g0 g53 Z" & GetOEMDRO(54)
While IsMoving()
Wend
Code "g0 g53 Y" & GetOEMDRO(1217) &"g0 g53 X" & GetOEMDRO(1216)  
While IsMoving()
Wend
...

means: on the "Code "g0 g53 Y" & GetOEMDRO(1217) &"g0 g53 X" & GetOEMDRO(1216)  
      While IsMoving()
      Wend" it also starts to moves the Z-Axis simultaneously (this often triggers the Z-Limit switch)

Any ideas what Im missing here?

Thanks!
« Last Edit: April 01, 2015, 04:33:42 PM by SteelWolf »

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #1 on: April 02, 2015, 02:59:06 AM »
Hi,

have you already tryed this:

Code "G0 G53 X" & GetOEMDRO(1216) &" Y" & GetOEMDRO(1217) 

While IsMoving()
Wend
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: "Z-Correction" problem after Tool-Probing
« Reply #2 on: April 02, 2015, 03:29:07 AM »
I also seperated the x and y commands
it doesnt matter
it tries to "correct" the zero plane to the mill tip on the first x or y move

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #3 on: April 02, 2015, 03:38:40 AM »
Hi,

tested your code snipped here on my Parallel Port test machine.
worked fine.

what controller are you using ?

Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: "Z-Correction" problem after Tool-Probing
« Reply #4 on: April 02, 2015, 04:05:19 AM »
Im using the ethernet smoothstepper, but no idea if this can be a problem with the controller?

This snippet is from the M6end file

basically the same code is used in a dedicted probing routine that just measures the tool height and works without problems.

It must have something to do with previous z-correction commands or something alike.

If i change the tool offset _before_ the M6end toolprobe routine. It even tries to correct it when approaching my tool-probe.
(That means it crashes into my 4th axis when given a more negative value because the tool sensor is right behind it and it makes an interpolated move between programmed move and Z correction value.

Max

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #5 on: April 02, 2015, 05:06:14 AM »
Hello Max,

can you post the complete M6End Macro.
maybe it something before this snippet.

Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: "Z-Correction" problem after Tool-Probing
« Reply #6 on: April 02, 2015, 05:24:43 AM »
Unfortunately m at work right now.
I will post it when im back home.

But the problem , as mentioned above, also occurs before the probing routine (when i change the tool length manually while the spindle is at the change position)
There is the same positioning code, except it has the sensor coordinates as target.
There are just some output switch commands for leds and one If(reference check I think) before the positioning (probably not the problem)

It just acts like it _has_ to set the tool zero as its absolute zero everytime in this M6end file

Max

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #7 on: April 02, 2015, 07:13:09 AM »
Hello Max,

i tested this:

      Call setOEMDRO(42, 100)

      Call setOEMDRO(1216, 40)
         Call setOEMDRO(1217, 60)

      
           Code "g0 g53 Z" & GetOEMDRO(54)
      While IsMoving()
      Wend
      Code "g0 g53 Y" & GetOEMDRO(1217) &"g0 g53 X" & GetOEMDRO(1216) 
      While IsMoving()
      Wend

on my testmachine (parallel port)

an it worked well.
so for the moment i am out off ideas.

Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: "Z-Correction" problem after Tool-Probing
« Reply #8 on: April 02, 2015, 08:09:24 AM »
I found my code on dropbox:

Code: [Select]
'code "M1002"

 DeActivateSignal(Output14)
 DeActivateSignal(Output16)
 DeActivateSignal(Output17)

If GetOEMDRO (24) <>0 Then


code "g0 g53 x" & GetOEMDRO(1218) & "g0 g53 y" & GetOEMDRO(1219) 'Move to Tool-Probe
While IsMoving()
Wend
   

code "g0 g53 x" & GetOEMDRO(1218) & "g0 g53 y" & GetOEMDRO(1219) 'Go to probe Position
While IsMoving()
Wend

'Probing process
code "g0 g53 z" & -GetOEMDRO(1220)
While IsMoving()
Wend
code "g31 z-1000 f700" 
While IsMoving()
Wend
code "M1002"
code "M1010"
code "g53 g0 z" & GetOEMDRO(85)+3
While IsMoving()
Wend
code "g31 z-1000 f50"
While IsMoving()
Wend
code "M1002"





Axis_Pos = GetOEMDRO(85)
Tool_Offset = Axis_Pos
Call setOEMDRO(42, Tool_Offset)

        Code "G0G53 Z" & GetOEMDRO(54) 'safe-Z
While IsMoving()
Wend
        Code "G0G53 X" & GetOEMDRO(1216) & "G0G53 Y" & GetOEMDRO(1217)
While IsMoving()
Wend


'Restart coolant
If GetUSERLED(1200)<>1 Then
If GetOEMLED(12) Then
Else
DoOEMButton(114)
End If
SetUSERLED(1200, 1)


End If



Else
MsgBox "Keine Werkzeug-Nummer gewählt",0
End If 

Still makes no sense to me :/
But thanks for your effort!

Max

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #9 on: April 02, 2015, 08:18:06 AM »
Hello Max,

i have seen you do macro calls inside the macro.
i had also unexpected courious things when i did this.
somewhere is written not to call macros in a macro.

yust a idea.

Thomas

Was macht der deutsche Text bei der Msgbox ?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.