Hello Guest it is April 24, 2024, 03:37:40 PM

Author Topic: Bit depth zeroing tool help  (Read 4942 times)

0 Members and 1 Guest are viewing this topic.

Offline Hobbs

*
  •  28 28
    • View Profile
Re: Bit depth zeroing tool help
« Reply #20 on: April 07, 2022, 05:44:25 AM »
this is a very simple code to check that probing is basicly working:

Code: [Select]
If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G90 G31 Z-50 F50" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
Sleep(200)
If GetOemLed (825)=1 Then 'Check to see if the probe is hit
Call SetDro (2, 5) 'set the Z axis DRO to whatever is set as plate thickness
Sleep(200) 'pause for Dro update.
Code "G1 Z10 F500" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
MSGBox "probe not hit !"
Exit Sub
End If
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If

Thanks very much for your help I will take a look at this, appreciate your help
Re: Bit depth zeroing tool help
« Reply #21 on: April 07, 2022, 08:03:49 AM »
OK, I've been looking again at the script I supplied and single-stepping it and there is a line:

DoOemButton (1003) 'Clear a possible feed-hold condition

When it reaches this point it jumps up 20mm or so then goes down again.  I have no idea why that line is there, and removing it restores the functionality that I remember.  Try editing it out and see what happens.

TPS' script also looks worth trying.

As background, my script is based on one I found on here with a few mods to suit my machine, but I've never taken the time to go through it and understand every line.  I think there's quite a lot of history lurking in it!  One day I think I will rewrite it from scratch so I fully understand it.

Offline Hobbs

*
  •  28 28
    • View Profile
Re: Bit depth zeroing tool help
« Reply #22 on: April 09, 2022, 10:29:43 AM »
Hi all after a little playing around  i tried the modified line in the script and although it touches the probe, and i set it to 75mm to return above the tool, my z acis will still return to its upper limit and give me a limit switch error message.

I then tried the entire new script kindly offered by TPS and i get the probe not hit message even though it does look as if it has touched, however my z axis does not return to its upper limit with this code.

i have removed the z axis work offset that was stored to see if this offered and improvements.

i hope ive explained this well, this is not soemthing i am familiar with but continually learning from you guys and your help.

any advise as always is much appreciated thanks

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Bit depth zeroing tool help
« Reply #23 on: April 10, 2022, 04:29:00 AM »
if you run my script

-z-axis goes down
-hit the probe
-then message "probe not hit"

is this the sequence what is happening?

if you do this pls go to diagnostic page , message came up. without moving z-axis, and have a look for
diditize LED.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Hobbs

*
  •  28 28
    • View Profile
Re: Bit depth zeroing tool help
« Reply #24 on: April 10, 2022, 09:54:45 AM »
Hi yes with your script that is what happened I will take a look at the diagnostic page and get back to you thanks

Offline Hobbs

*
  •  28 28
    • View Profile
Re: Bit depth zeroing tool help
« Reply #25 on: April 10, 2022, 03:38:34 PM »
Hi yes your script does exactly as you say and diagnostic page shows digitize light in green thanks

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Bit depth zeroing tool help
« Reply #26 on: April 11, 2022, 01:18:35 AM »
i have added some debug messages to the code.
pls run the script and post then the last 10 lines of the file. C:\Mach3\LastErrors.txt

Code: [Select]
If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
Message("starting z-probe at z: " &GetDro(2))
Sleep(200)
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G90 G31 Z-50 F50" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
Sleep(200)
Message("z-Position after probe: " &GetDro(2))
Sleep(200)
Message("probe input after probe: " &GetOemLed(805))
Sleep(200)
If GetOemLed (825)=1 Then 'Check to see if the probe is hit
Call SetDro (2, 5) 'set the Z axis DRO to whatever is set as plate thickness
Sleep(200) 'pause for Dro update.
Code "G1 Z10 F500" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
MSGBox "probe not hit !"
Exit Sub
End If
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Hobbs

*
  •  28 28
    • View Profile
Re: Bit depth zeroing tool help
« Reply #27 on: April 27, 2022, 08:15:11 AM »
Thanks for the code, sorry its taken a while to get back. struggling work hours, ive attached all the info from the last error txt doc .

thanks again for the continued support

Tue - 14:07:06 ---Program Startup
Tue - 14:07:11 ---ReConfiguration Estop.
Tue - 14:07:35 ---starting z-probe at z: 46.97
Tue - 14:07:42 ---z-Position after probe: -3.85
Tue - 14:07:42 ---probe input after probe: False

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Bit depth zeroing tool help
« Reply #28 on: April 27, 2022, 02:00:57 PM »
looks like you have noise on the probe signal, because probe tripped after 3.85mm and
then probe signal was off again.

try to play with the debounce in Config-General Config or search what causes the noise.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Hobbs

*
  •  28 28
    • View Profile
Re: Bit depth zeroing tool help
« Reply #29 on: April 29, 2022, 02:37:17 AM »
Thank you for the advice, Ive been wondering if I need some sort of grounding from the main body of the CNC to earth road in the building, as I've been having random stops when cutting and an error code of is xpod still connected. Do you think this could be related? Would 1 x ground from frame be enough or could you recommend any other grounds that should be in place thank you