Hello Guest it is April 26, 2024, 04:12:50 PM

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

0 Members and 1 Guest are viewing this topic.

Re: Bit depth zeroing tool help
« Reply #40 on: May 24, 2022, 03:36:38 PM »
Not that I can think of.  You could look for a different script?
Re: Bit depth zeroing tool help
« Reply #41 on: May 24, 2022, 03:38:15 PM »
For example the code in reply 18 to this thread.

Offline garyn

*
  •  18 18
    • View Profile
Re: Bit depth zeroing tool help
« Reply #42 on: May 24, 2022, 04:24:54 PM »
That one didn't work--got same error message.
Re: Bit depth zeroing tool help
« Reply #43 on: May 24, 2022, 04:52:22 PM »
Right, so it's not a problem with the scripts but something more subtle.   I have no idea what I'm afraid,  I've never had any problem like this arise.

Offline garyn

*
  •  18 18
    • View Profile
Re: Bit depth zeroing tool help
« Reply #44 on: May 24, 2022, 08:03:21 PM »
How do you single step through the code?
Re: Bit depth zeroing tool help
« Reply #45 on: May 25, 2022, 01:38:20 AM »
Do a Google on scripter compile error  h - quite a few hits on this forum come up, in particular one long thread from 2018.  It seems to be some kind of problem with the visual basic interpreter, possibly interacting with particular character combinations in the code.  There seem to be two fixes - one is to make sure you are running the latest Mach version, I think that's .062.  The other is to open the macro in the operator/edit VB macro menu, then select save as, and save as compiled code (.mcc). 

To single step, open the code in the VB scripter window as above (before compiling I think), you will see a row of icons just below the menu bar.  The green right arrow runs the macro, the green one with two green bars immediately after it is the single step.  If you hover your cursor over each icon its function is shown after a second or so.

Offline garyn

*
  •  18 18
    • View Profile
Re: Bit depth zeroing tool help
« Reply #46 on: May 25, 2022, 08:28:55 AM »
Don't lnow at this point if that will work, but I want to thank you for your patience and persistence.  I know I don't have the latest version of  Mach 3, so I will get that downloaded and installed.  Then I will try single stepping the script and see what happens. I will let you know what happens.
Re: Bit depth zeroing tool help
« Reply #47 on: May 25, 2022, 09:03:04 AM »
Happy to (try to) help.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Bit depth zeroing tool help
« Reply #48 on: May 25, 2022, 11:39:46 AM »
i have tested this code:

Code: [Select]
CurrentFeed   = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode  = GetOemDRO(819) 'Get the current G0/G1 state

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 "G4 P3" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-4. F2" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend

'ZProbePos = GetVar(2002) 'get the exact point the probe was hit
'Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
'While IsMoving ()
'Wend

Call SetDro (2, .125) ' change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If   

here, running without any error.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline garyn

*
  •  18 18
    • View Profile
Re: Bit depth zeroing tool help
« Reply #49 on: May 26, 2022, 09:55:29 AM »
Will XP run the latest Mach 3 version?