mfunc6 file auto deleting

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
cncbuiltbyme
Posts: 36
Joined: Fri Nov 08, 2019 4:58 am
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DADED59C1-0531180950
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Ashburn, VA
Contact:

mfunc6 file auto deleting

Post by cncbuiltbyme »

Hey guys, I'm having some strange behavior with my mfunc6 file after installing 12 v5.06. I'm not 100% sure when the file gets deleted but if I add my mfunc6 touch plate file to the C:\cncm and run a job, the script load and everything appears to be OK. But upon reboot and I go to run a job, the mfunc6.mac file is gone and I'm guessing the default v5.06 file is loaded. Any help in the right direction would be appreciated.

Here's my mfunc6.mac content

Code: Select all

;----------------------------------------------------------------
; Setting Up the Touch Probe
;----------------------------------------------------------------

; Variables used: 
; #100 = Reset current Z part 0 selection. 0 = skip, 1 = Reset Z0
  #101 = 5 ;Length of time to display temporary M225 messages
; #102 = Fast probing rate
; #103 = Slow probing rate
; #104 = TT1 PLC input.
; #105 = Current user entered configuration value
  #106 = 0 ;Length of time to wait for cycle start M225 messages
; #107 = Z0 location after probing  

IF #50001
IF #4201 || #4202 THEN GOTO 1000
IF #50001

#100 = 0
#102 = 0
#103 = 0
#104 = 0
#105 = 0
#107 = 0

M5                                          
;Turn off spindle

N100                                        
;Check to make sure a TT1 is correctly configured
											
    IF !#9011 && !#9044 THEN M225 #106 "No PLC input has been configured for the Tool Touch Off device.\nPlease enter the PLC input for the Tool Touch Off device in parameter 11\nPress Cycle Cancel to end job now."
    IF #50001
    IF !#9011 && !#9044 THEN GOTO 100

    IF [#9044 > 8] && [#9044 <= 50000] THEN M225 #106 "The PLC input entered into parameter 44 in invalid.\nPlease enter a value of between 1 and 8 into parameter 44\nPress Cycle Cancel to end job now."
    IF #50001
    IF [#9044 > 8] && [#9044 <= 50000] THEN GOTO 100
    IF #50001

    IF [[#9044 != 0] && [#9044 < 50000]] && [[#9044 < 1] || [#9044 > 8]] THEN M225 #106 "The PLC input entered into parameter 44 in invalid.\nPlease enter a value of between 1 and 8 into parameter 44\nPress Cycle Cancel to end job now."
    IF #50001
    IF [[#9044 != 0] && [#9044 < 50000]] && [[#9044 < 1] || [#9044 > 8]] THEN GOTO 100
    IF #50001

    IF [[#9044 != 0] && [#9044 >= 50000]] && [[#9044 < 50001] || [#9044 > 50008]] THEN M225 #106 "The PLC input entered into parameter 44 in invalid.\nPlease enter a value of between 1 and 8 into parameter 44\nPress Cycle Cancel to end job now."
    IF #50001
    IF  [[#9044 != 0] && [#9044 >= 50000]] && [[#9044 < 50001] || [#9044 > 50008]] THEN GOTO 100
    IF #50001

    IF [#9044 == 0] && [#9011 < 50000] && [[#9011 < 1] || [#9011 > 8]] THEN M225 #106 "The PLC input entered into parameter 11 in invalid.\nPlease enter a value of between 1 and 8 into parameter 11\nPress Cycle Cancel to end job now." 
    IF #50001
    IF [#9044 == 0] && [#9011 < 50000] && [[#9011 < 1] || [#9011 > 8]] THEN GOTO 100

    IF [#9044 == 0] && [#9011 >= 50000] && [[#9011 < 50001] || [#9011 > 50008]] THEN M225 #106 "The PLC input entered into parameter 11 in invalid.\nPlease enter a value of between 1 and 8 into parameter 11\nPress Cycle Cancel to end job now." 
    IF #50001
    IF [#9044 == 0] && [#9011 >= 50000] && [[#9011 < 50001] || [#9011 > 50008]] THEN GOTO 100
    IF #50001

    IF #9071 == 0 THEN M225 #106 "The height for the tool touch off device has not been set in parameter 71.\nPlease measure the height of your tool touch off device and enter it parameter 71\nPress Cycle Cancel to end job now."		
    IF #50001
    IF #9071 == 0 THEN GOTO 100									

    IF #50001
    IF #9044 != 0 THEN #104 = #9044            
    IF #50001
    IF #9044 == 0 THEN #104 = #9011             
    IF #50001

    IF #104 > 50000 THEN #104 = #104 - 50000
    IF #50001

    IF [#9014 == 0] && [#4006 == 20] THEN #102 = 10            
    IF #50001
    IF [#9014 != 0] && [#4006 == 20] THEN #102 = #9014
    IF #50001

    IF [#9014 == 0] && [#4006 == 21] THEN #102 = 254
    IF #50001
    IF [#9014 != 0] && [#4006 == 21] THEN #102 = #9014 
    IF #50001

    IF [#9015 == 0] && [#4006 == 20] THEN #103 = 1 
    IF #50001 
    IF [#9015 != 0] && [#4006 == 20] THEN #103 = 1
    IF #50001 

    IF [#9015 == 0] && [#4006 == 21] THEN #103 = 25.4        
    IF #50001
    IF [#9015 != 0] && [#4006 == 21] THEN #103 = 25.4      
    IF #50001

N150
    ;G28            ;Hamid changed this default location
    ;G53 X-100 Y100 ;Instead move spindle to this location
    M225 #106 "#)You may change the tool bit #%.0f\nPress CYCLE START to continue" #4120


N200                                        
    ;Prompt user for resetting Z0 position
    M224 #100 "#)Would you like to RESET the current Z0 position?\n#)Press 0 to continue without resetting Z0\n#)Press 1 to auto reset current Z0\n#)Press CYCLE START to continue"
    IF #50001
    IF #100 == 0 THEN GOTO 400                  ;Skip if user chose not to reset Z0 
    IF #50001
    IF #100 == 1 THEN GOTO 250                  ;Reset Z0 
    IF #50001    
    IF #100 > 1  THEN GOTO 200                  ;Go back to prompt user if invalid value was selected
    IF #50001

N250							
    M200 "#)If needed, jog the spindle over the touch plate\nPress CYCLE START to touch plate"

N300									
    M115 /Z P[#104] F[#102]                     ;Move at fast probing rate until TT1 detected
    G91 Z#9013 F[#102]                          ;Move up the distance set in P13.
    M115 /Z P[#104] F[#103]                     ;Move at slow probing rate until TT1 detected
    G90

    G92 Z[#9071]                                ;Set Z position to 0 + height stored in parameter 71 
    G4 P1                                       ;Wait 1 second
    G53 Z0                                      ;Retract Z

    ;M225 #106 "#)Turn spindle On\nPress CYCLE START to continue" 

N350                                        
    ;Prompt user for moving bit to X0Y0Z0
    M224 #107 "#)Would you like to move the cutter to X0Y0Z0?\n#)Press 0 to continue without moving the cutter to Z0\n#)Press 1 to move the cutter to X0Y0Z0\n#)Press CYCLE START to continue"
    IF #50001
    IF #107 == 0 THEN GOTO 400                  ;Skip if user chose not to reset Z0 
    IF #50001
    IF #107 == 1 THEN GOTO 375                  ;Move bit to Z0     
    IF #50001
    IF #107 > 1  THEN GOTO 350                  ;Go back to prompt user if invalid value was selected
    IF #50001

N375 
    G0X0Y0Z0
    M200 "#) If it's all GOOD, jog cutter up Z axis and TURN ON SPINDLE :) \nPress CYCLE START to continue" 

N400 									
IF #50001
				
N1000                                       
;End of macro  
Last edited by cncbuiltbyme on Sun Sep 10, 2023 2:59 am, edited 2 times in total.
Do what you love or love what you do...
Image
Sword
Posts: 667
Joined: Fri Nov 30, 2018 1:04 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Thorp WI

Re: mfunc6 file auto deleting

Post by Sword »

Check to see what you have set in the wizard under ATC, there's a switch there for using a custom M6 file. Even if you don't have an ATC, this will overwrite or delete yours if not set.

Edited: Only when writing changes with the Wizard will it overwrite or delete your custom one, not upon reboot. If it happens without writing any changes with the wizard, then you may have something else going on.
Last edited by Sword on Sat Sep 09, 2023 2:37 pm, edited 1 time in total.
Scott
cncbuiltbyme
Posts: 36
Joined: Fri Nov 08, 2019 4:58 am
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DADED59C1-0531180950
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Ashburn, VA
Contact:

Re: mfunc6 file auto deleting

Post by cncbuiltbyme »

OK will do as soon as I get back in the shop, thanks Scott.
cncbuiltbyme
Posts: 36
Joined: Fri Nov 08, 2019 4:58 am
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DADED59C1-0531180950
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Ashburn, VA
Contact:

Re: mfunc6 file auto deleting

Post by cncbuiltbyme »

OK, that did it... everything running smoothly again, thanks.
Do what you love or love what you do...
Image
Post Reply