Hello Guest it is March 28, 2024, 04:50:34 PM

Author Topic: Need Help on a Mcode Macro  (Read 2587 times)

0 Members and 1 Guest are viewing this topic.

Offline TomR

*
  •  17 17
    • View Profile
Need Help on a Mcode Macro
« on: May 02, 2012, 02:45:01 PM »
I am having problems with a mcode macro which consists on the following:

'M5001 Macro
DoButton(169)  'Close Current G-Code file
LoadFile("C:\Mach3\Gcode\RR2.tap") 'Load Next G-Code File
DoButton(1000)  'Start Cycle after Loading File

What I'm trying to do is daisy chain a series of G-Code programs such that when one program completes, the next program loads, regenerates a new tool path and cycle starts without operator interaction.  The above macro (M5001) will load the G-Code file (C:\Mach3\Gcode\RR2.tap) and regenerate the new tool path, although it does not start the cycle without mousing the "Cycle Start" button.

As an option, I used the "LoadRun" command  which did successfully load and start the G-Code without mousing the "Cycle Start" button.  However this command does not regenerate a new tool path on the Tool Path screen.

What am I doing wrong?

Regards, TomR

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Need Help on a Mcode Macro
« Reply #1 on: May 02, 2012, 04:59:34 PM »
Instead of the dooembutton TRY

RunFile()

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Need Help on a Mcode Macro
« Reply #2 on: May 02, 2012, 05:26:25 PM »
OK I had to test this

This works here

'M5001 Macro
DoButton(169)  'Close Current G-Code file
LoadRun("C:\Mach3\Gcode\RR2.tap") 'Load Next G-Code File

Offline TomR

*
  •  17 17
    • View Profile
Re: Need Help on a Mcode Macro
« Reply #3 on: May 04, 2012, 11:31:14 AM »
I have tried this earlier and it works fine with one exception.  The tool path is regenerated properly on the first program only.  On all subsequent programs the tool path screen is blank leaving the operator blind to what is being machined.

Thanks, TomR