Hello Guest it is April 19, 2024, 06:29:18 AM

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

0 Members and 1 Guest are viewing this topic.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #10 on: April 02, 2015, 08:22:41 AM »
found it,

The only restriction is that you are advised not to call another script from within a script


from:

http://www.machsupport.com/Mach3Wiki/index.php?title=Mach_specific_Subroutines/Functions_grouped_by_purpose

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 #11 on: April 02, 2015, 08:44:29 AM »
I already commented the macro call out (just blinking leds..) without any success :/
But ill try it again when im back home.. maybe i missed something.

Is this a wrong syntax for msgbox?
The german text says that no tool number was chosen


Max

PS:

The M6start:

Code: [Select]


'Save coolant
SetUSERLED(1200, 1)
If GetOEMLED(12) Then
DoOEMButton(114)
SetUSERLED(1200, 0)
End If


SetOEMDRO(1216,GetOEMDRO(83))  'Save x
SetOEMDRO(1217,GetOEMDRO(84))  'save y

Code "M1001"
Code "G0G53 Z" & GetOEMDRO(54)
While IsMoving()
Wend
code "g0 g53 x" & GetOEMDRO(33) & "g0 g53 y" & GetOEMDRO(34)
While IsMoving()
Wend



tool = GetSelectedTool()
SetCurrentTool( tool )
« Last Edit: April 02, 2015, 08:47:41 AM by SteelWolf »

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #12 on: April 02, 2015, 08:53:59 AM »
ich kann den deutschen Text schon lesen, kein Problem.

ok let's carry on in english to keep al the others in the race.

maybe one of the ethernet SS guy's can test this code, because as said
it is running here fine.

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 #13 on: April 02, 2015, 11:46:00 AM »
The problem is that its hard to reproduce outside of the M6end file
But I will try this today to maybe isolate it a bit more.
Isnt there maybe a basic mach3 setting or "mode" that triggers this behaviour? (that I missed)

Max
Re: "Z-Correction" problem after Tool-Probing
« Reply #14 on: April 03, 2015, 04:30:20 AM »
Still no results.. it seems to only act this way inside a tool-change cycle.
It also moves Z-Axis when approaching the sensor.. so even before any G43 movement.

Greetings,
Max

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #15 on: April 03, 2015, 07:31:11 AM »
Hi,

this macros worked here.

M6Start
Code: [Select]
 
'Save coolant
SetUSERLED(1200, 1)
If GetOEMLED(12) Then
DoOEMButton(114)
SetUSERLED(1200, 0)
End If


SetOEMDRO(1216,GetOEMDRO(83))  'Save x
SetOEMDRO(1217,GetOEMDRO(84))  'save y

'Code "M1001"
message "Fahre Save-Z"
Code "G0G53 Z" & GetOEMDRO(54)
While IsMoving()
Wend
message "Fahre zur Ref-Switch Pos."
code "g0 g53 x" & GetOEMDRO(33) & "g0 g53 y" & GetOEMDRO(34)
While IsMoving()
Wend



tool = GetSelectedTool()
SetCurrentTool( tool )


M6End:
Code: [Select]
'code "M1002"

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

If GetOEMDRO (24) <>0 Then

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

'Probing process
   message "Z-Vorpos"
     code "g0 g53 z" & -GetOEMDRO(1220)
While IsMoving()
Wend
        message "Z-Probe schnell"
code "g31 z-1000 f700"  
While IsMoving()
Wend
' code "M1002"
' code "M1010"
        message "Z-Probe Rückzug"
code "g53 g0 z" & GetOEMDRO(85)+3
While IsMoving()
Wend
        message "Z-Probe langsam"
code "g31 z-1000 f50"
While IsMoving()
Wend
' code "M1002"





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

        message "Z Save Pos."
        Code "G0G53 Z" & GetOEMDRO(54) 'safe-Z
While IsMoving()
Wend
        message "X/Y zurück"
        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  


    



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 #16 on: April 03, 2015, 10:12:32 AM »
I will try it when im back from work and IKEA o:

Did you test it with differen tool length? Because with only one tool I think the error wont occur.

Max

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: "Z-Correction" problem after Tool-Probing
« Reply #17 on: April 03, 2015, 10:13:47 AM »
Might want to readup on RunScript ()