Hello Guest it is April 19, 2024, 11:01:46 PM

Author Topic: Auto tool zero script problems  (Read 2972 times)

0 Members and 1 Guest are viewing this topic.

Auto tool zero script problems
« on: October 27, 2017, 01:55:38 PM »
Hello guys, i am working on this code, for my custom build height presseter. The hardware is good, i checked everything.

But, the macro is producing different results than i would expect, first.. i thought that with G31 the probe would stop when
it hits the copper circle i have connected with a wire, but it doesn't, it's working like a G1, nothing different.

I'll put the code below
Code: [Select]
Dim preset(2)
preset(0) = -294.4045 'X
preset(1) = -16.6935 'Y
preset(2) = -279 'Z

Dim preset_feed As Integer
preset_feed = 4000

Dim safe_z As Integer
safe_z = -150


If IsSafeZ() Then
SetSafeZ(safe_z)
Else
Call MsgBox("SafeZ desabilitado" & Chr(10) & "Programa será parado", 0, "Alerta")
DoOEMButton(1003)
Exit Sub
End If

Call Preset_Tool()




Function Preset_Tool()
GotoSafeZ()
Code("G53 G0 X" & preset(0) & "Y" & preset(1))
While IsMoving()
Sleep(100)
Wend
Code("G31 Z" & preset(2) & "F" & preset_feed)
While IsMoving()
Sleep(100)
Wend
Dim presseted_tool_z As Double
presseted_tool_z = GetVar(2002)
SetToolParam(1, 2, presseted_tool_z)
GotoSafeZ()
While IsMoving()
Sleep(100)
Wend
End Function

Can anyone point me what i am doing wrong ?

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Auto tool zero script problems
« Reply #1 on: October 27, 2017, 02:49:25 PM »
preset_feed = 4000  -->mm/s ?? what ever

in witch dream are you living??

what acc/dcc ??

what Motion Controller ??

try to learn a Little bit about lineare movement's
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Auto tool zero script problems
« Reply #2 on: October 27, 2017, 02:54:38 PM »
I am not running at 4K, relax it's running on 500mm/min

I am using from a company of my country, NEVEX.

And using 400w servos from hiwin, acc, deacc it's not a problem, the problem it moves to the coordinate in preset(2). It stops at -278.5(i think this is the coordinate),
exactly at 278.5, but when it trips it's like 3 mm before.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Auto tool zero script problems
« Reply #3 on: October 28, 2017, 04:32:20 AM »
have you checked your probe Input in diagnostic Screen ?

try to hit the probe Signal long before you reach the -278,5 to see that your Motion controller is working ok.

in dont know this Motion controller, and i don't know wether your Motion controller is doing the
handling for G31 maybe probing needsto be Setup somewhere else , plugin ?

could no find a Manual on their Homepage.

goog workinh G31 is very Controller specivic.

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Auto tool zero script problems
« Reply #4 on: October 28, 2017, 09:22:11 AM »
Okay, i'll try hitting the probe before it hits the presseter. But yes, it's working perfectly at the diagnostics screen.

I'll be emailing NEVEX, and yes they have a small manual, it doesn't say anything about G31.
Re: Auto tool zero script problems
« Reply #5 on: October 30, 2017, 07:36:37 AM »
Imitheo,

Feed rate is too high !
(velocidade de avanço está muito alta)

For probing, you will want to use a low feed rate - for example, 200 or 300 mm/min or even lower speed (para este tipo de tarefa seria conveniente usar velocidades de avanço mais baixas - por exemplo 200 ou 300 mm/mim ou até menos)
Dica - quanto menor a velocidade de avanço durante o probing, menos "overshooting" terá

Talvez esteja parando antes por excesso de velocidade
Re: Auto tool zero script problems
« Reply #6 on: October 30, 2017, 10:36:12 AM »
Hi, it did work, i think it was because my tool was not very 'fixed' in the spindle, i was not testing with the full grip.

But now G31 is properly working on my controller. BUT, there is other problem, but i think it's because of miss contact
on my auto tool hardware, because it stops on G31 properly, but it's not getting the coordinate.

On the other hand when i put the +24v on a wire and just touch the machine while it 'G31' it records the correct coordinate, just
to simulate the touch.

Just when it touches my hardware it doesn't record the correct coordinate. Maybe the solder on my copper disk, something.
Re: Auto tool zero script problems
« Reply #7 on: November 02, 2017, 07:52:47 AM »
My G31 was tripping but it wasn't recording everytime the coordinate, to fix this problem i added this line of code right after G31.
Code: [Select]
SetVar(2002, GetOEMDRO(802))

It records everytime the same position, got a repeatability of 0.005mm.