Hello Guest it is April 19, 2024, 03:52:44 AM

Author Topic: my macros are resetting, any idea why?  (Read 2495 times)

0 Members and 1 Guest are viewing this topic.

my macros are resetting, any idea why?
« on: June 01, 2020, 01:43:26 PM »
upon closing, and reopening. my tool change macro and auto tool zero macros reset to default. i cant figure out why and ita driving me insane.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: my macros are resetting, any idea why?
« Reply #1 on: June 01, 2020, 02:14:37 PM »
Show us your macro code and we will see.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: my macros are resetting, any idea why?
« Reply #2 on: June 01, 2020, 02:21:18 PM »
 i just made a few text files on my desktop that i can copy/paste because i have to reset them every time i restart. but while the program is up they stay and work fine.


 Tool change location just goes to the side of my machine where i can access it easily
M6Start.m1s

  tool = GetSelectedTool()
  SetCurrentTool( tool )
 
  Code" f400 g53 y -46 z -.2" 


for my tool 0 , works great. i have a plate attached to my table at that location and a dro to set the material thickness.

HiddenScript.m1s

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
Plate = .2525 - GetUserDRO(1202)

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
Code "G1 P0" ' this delay gives me time to get from computer to hold probe in place
Code"z2"
Code "f400 g53 x0 y0"
While IsMoving() 'wait while it happens
Wend
Code "G54 Z0"
While IsMoving() 'wait while it happens
Wend
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G90 G31Z-4. F10" '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, Plate) ' change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z1 f400" '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"x0 y0"
Code "z0"
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                                                                             

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: my macros are resetting, any idea why?
« Reply #3 on: June 01, 2020, 02:45:38 PM »
just a quick test. shot down Mach3, goto c:\mach3\macros\ your Profile Name\ Folder open M6Start.M1S with a a text Editor copy paste your code and save the file. restart Mach3 and havs a look for teh M6Start.m1s file wether it is still the modified one-
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: my macros are resetting, any idea why?
« Reply #4 on: June 01, 2020, 02:52:57 PM »
okay, so when i do this. the file INSIDE the folder shows correct. but when i open it through mach3 it just reverts back. and changes the file in the mach folder under my profile

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: my macros are resetting, any idea why?
« Reply #5 on: June 02, 2020, 02:01:44 AM »
ok when you say you open it throught Mach you mean Operator -> VBScript Editor ?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: my macros are resetting, any idea why?
« Reply #6 on: June 02, 2020, 03:59:14 AM »
Yes, or edit button script for auto tool zero. Either way

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: my macros are resetting, any idea why?
« Reply #7 on: June 02, 2020, 04:01:56 AM »
witch Version of Mach3 are you using?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: my macros are resetting, any idea why?
« Reply #8 on: June 02, 2020, 04:04:46 AM »
I’m not entirely sure, I downloaded it straight from the website around March and I haven’t updated it. It should be the latest since Mach 4 wa already out and I was told Mach 3 was a finished product that was longer getting support

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: my macros are resetting, any idea why?
« Reply #9 on: June 02, 2020, 04:09:20 AM »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.