Hello Guest it is March 28, 2024, 03:19:20 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JoonasM

Pages: 1 2
1
General Mach Discussion / "Auto tool zero" going up instead of down
« on: October 28, 2021, 07:11:57 AM »
Hello

It is quite a simple problem and I just need to know with minus symbol should I change to +. Long story short, Z axis goes up instead of going down after the first touchdown to the probe.

I'll post the code.

Code: [Select]
'X/Y/Z referenced?
If getoemled(807) Or getoemled(808) Or getoemled(809) Then 'Kontrolli kas nullimise ledid polevad
DoOEMBUTTON(1021)
MsgBox "Teljed nullimata"
Exit Sub
End If

'probe input allready active
If GetOemled(825) <> 0 Then
DoOEMBUTTON(1021)
MsgBox "Testi raadioandurit"
Exit Sub
End If

XWork = GetOEMDRO(800)  ' Get Current X Work Coordinate
YWork = GetOEMDRO(801)  ' Get Current Y Work Coordinate
XMachine = GetOemDRO(83)  ' Get Current X Machine Coordinate
YMachine = GetOemDRO(84)  ' Get Current Y Machine Coordinate
ZMachine = GetOemDRO(85)    ' Get Current Z Machine Coordinate

Code "G49" ' cancel tool lenght offset
Code "G0 G53 Z-1" ' Home Z
code "G53 X216.90 Y3069.85" ' Move into Probe Pos ***EDIT HERE***
DoOEMButton(179) ' machine coordinates
Tool_Number = GetDRO(24) ' get actual Tool number

'fast probe
code "G31 Z-200 F300" ' Z liigub alla 300 mm kuni probini
While IsMoving()
Sleep(30)
Wend

code "G91 G0 Z10" ' Z liigub üles 10  mm
Code "G90"
While IsMoving()
Sleep(30)
Wend


'slow probe
code "G31 Z-15 F20" ' Z liigub alla 15 mm kuni probini
While IsMoving()
  Sleep(10)
Wend

If Tool_Number = 0 Then ' Master tool Cal
z = GetOEMDRO(85) ' get Machine ZPos
Call SetOEMDRO(49,z) ' Set g54 z offset
Else
Call SetDRO(24,0) ' Turn off the tool offset by loading tool #0
Height = GetDRO(2) ' Get the pos of the Z axis without the Tool comp on
Call SetDRO(24,Tool_Number) ' Turn the tool Back on so the offset will go to the
Call SetoemDRO(42,Height) ' Set the Tool Height offset
End If

DoOEMButton(181) ' back To program coordinates
code "G0 G90 G53 Z-1  F1000"
code "G43"
While IsMoving()
Sleep 10
Wend

Code "G0 X" & XWork & " Y" & YWork ' Returns to the previous XY job location
sleep(500)
While IsMoving()
sleep(20)
Wend
Thanks.

2
General Mach Discussion / Error "Find No XHC NcEther!"
« on: October 25, 2021, 01:48:42 PM »
Good day

Woke up and started up the computer today and started Mach3 and all the typical things. Turned on the machine and stuff and then tried to move it a little to see if everything was fine. Turns out it wasn't. It did not move, at all. Upon further inspection I found that an odd notification had appeared to the so called "Error box" :D. It says "Find No XHC NcEther!". I even tried to restart the computer, but it decided that its hard drive will fail today, but that's another story.

Any suggestions of what could have went wrong or anything at all?


Thanks.

3
General Mach Discussion / Re: Question about spindle and RPM
« on: March 18, 2021, 04:02:59 AM »
I use downcut two flute end mills, mainly cut plywood. I don't really play around with the spindle speed at all. I sometimes cut plexiglass aswell, when is it better to increase and when is it better to decrease RPM?

4
General Mach Discussion / Question about spindle and RPM
« on: March 17, 2021, 10:37:22 AM »
Hello

I have a 3.5kw chinese spindle, that says 18000 rpm on it. My question is, is it better to run it on that given 18000 or is it better to go with 16000 just to save the motor. What do you guys think (or know)?

5
Thanks a lot! Can you try and explain to me what could have been the issue here? I'll try it and will let you know if it works or not! Thank you.

6
how far is your distance from Zhome to probepoint?

It depends on what bit I have on the spindle, but it ranges from 150 to 180mm. None of them go over 200 and the Z stops wayyyyyyy above the probe when I try to auto-tool zero back to back.

For example, at the moment I have a 6mm end mill, the Z value is -160.5828something. If I would try to auto-tool zero again (I have run a few gCodes through in this session), it would change the value to -25.00000.

7
Looks like something is missing at the begin of script.

there is a End if without an IF ... Then before?

Yup something is indeed missing, I let the mouse go a bit too early. Here is the full script.

Code: [Select]
If getoemled(807) Or getoemled(808) Or getoemled(809) Then 'Kontrolli kas nullimise ledid polevad

MsgBox "Teljed nullimata"
 DoOEMBUTTON(1021)

 Exit Sub
  End If

 If GetOemled(825) <> 0 Then
   MsgBox "Testi raadioandurit"

 Exit Sub
   End If

XWork = GetOEMDRO(800)  ' Get Current X Work Coordinate
YWork = GetOEMDRO(801)  ' Get Current Y Work Coordinate
XMachine = GetOemDRO(83)  ' Get Current X Machine Coordinate
YMachine = GetOemDRO(84)  ' Get Current Y Machine Coordinate
ZMachine = GetOemDRO(85)   ' Get Current Z Machine Coordinate

Code "G49"
Code "G0 G53 Z-1." 'Home Z
code "G53 X216.90 Y3069.85" 'Move into Probe Pos ***EDIT HERE***
DoOEMButton(179) ' machine coordinates
Tool_Number = GetDRO(24)
code "G91 g31 z-200. f300." ' Z liigub alla 300 mm kuni probini
While (IsMoving())
  Sleep 30
Wend

code " g0 z 10" ' Z liigub üles 10  mm


code "G91 g31 z-15 f20." ' Z liigub alla 15 mm kuni probini

While (IsMoving())
  Sleep 10
Wend

If Tool_Number = 0 Then 'Master tool Cal
z = GetOEMDRO(85) 'get Machine ZPos
Call SetOEMDRO(49,z) 'Set g54 z offset
Else

Call SetDRO(24,0) 'Turn off the tool offset by loading tool #0
Height = GetDRO(2) 'Get the pos of the Z axis without the Tool comp on
Call SetDRO(24,Tool_Number) 'Turn the tool Back on so the offset will go to the
Call SetoemDRO(42,Height) 'Set the Tool Height offset
End If

DoOEMButton(181) 'back To program coordinates
code "G0 G90 G53 Z-1.0  F1000"
code "G43"
While (IsMoving())
  Sleep 10
Wend

Code "G0 X" & XWork & " Y" & YWork ' Returns to the previous XY job location
sleep(500)
While IsMoving()
sleep(20)
Wend


rem End If
           
   
rem End If
           
   

8
Show us your script, and we will see.

If you mean the "'Auto-tool zero" script then here it is. There are some Estonian phrases there, but it doesn't really affect anything. They're rather informative.

           
Code: [Select]
MsgBox "Teljed nullimata"
 DoOEMBUTTON(1021)

 Exit Sub
  End If

 If GetOemled(825) <> 0 Then
   MsgBox "Testi raadioandurit"

 Exit Sub
   End If

XWork = GetOEMDRO(800)  ' Get Current X Work Coordinate
YWork = GetOEMDRO(801)  ' Get Current Y Work Coordinate
XMachine = GetOemDRO(83)  ' Get Current X Machine Coordinate
YMachine = GetOemDRO(84)  ' Get Current Y Machine Coordinate
ZMachine = GetOemDRO(85)   ' Get Current Z Machine Coordinate

Code "G49"
Code "G0 G53 Z-1." 'Home Z
code "G53 X216.90 Y3069.85" 'Move into Probe Pos ***EDIT HERE***
DoOEMButton(179) ' machine coordinates
Tool_Number = GetDRO(24)
code "G91 g31 z-200. f300." ' Z liigub alla 300 mm kuni probini
While (IsMoving())
  Sleep 30
Wend

code " g0 z 10" ' Z liigub üles 10  mm


code "G91 g31 z-15 f20." ' Z liigub alla 15 mm kuni probini

While (IsMoving())
  Sleep 10
Wend

If Tool_Number = 0 Then 'Master tool Cal
z = GetOEMDRO(85) 'get Machine ZPos
Call SetOEMDRO(49,z) 'Set g54 z offset
Else

Call SetDRO(24,0) 'Turn off the tool offset by loading tool #0
Height = GetDRO(2) 'Get the pos of the Z axis without the Tool comp on
Call SetDRO(24,Tool_Number) 'Turn the tool Back on so the offset will go to the
Call SetoemDRO(42,Height) 'Set the Tool Height offset
End If

DoOEMButton(181) 'back To program coordinates
code "G0 G90 G53 Z-1.0  F1000"
code "G43"
While (IsMoving())
  Sleep 10
Wend

Code "G0 X" & XWork & " Y" & YWork ' Returns to the previous XY job location
sleep(500)
While IsMoving()
sleep(20)
Wend


rem End If

9
How exactly does that work, havent jiggled around with the scripts yet :D

10
Hello

Since the beginning of me CNC'ing with Mach3 it has only let me automatically zero my tools only once per session (with expections that I have not ran a program before). Every time I want to re-zero a tool, it goes to the probe and stops wayyyyyy above the probe itself and sets the Z value to something like -25.0000, which normally for me should stay in the range of -150.0000 to -180.0000. So everytime I want to zero a new tool, I have to restart Mach3, home all the axises and then auto tool zero it. Is there a way to avoid that?

Pages: 1 2