Author Topic: Problem with M30 at end of program  (Read 369 times)

0 Members and 1 Guest are viewing this topic.

Offline KipKirol

  • Active Member
  • Posts: 20
    • View Profile
Problem with M30 at end of program
« on: July 11, 2018, 02:56:16 PM »
I would like an M30 at the end of my programs to rewind the program.

Below is a simple code I wrote, the M30 rewinds to program:

G21 G0 G17 G40 G49 G80 G90                  
G0 G90 Z35                  
T1 M6                  
G54     S   3250   M3
G0 Y0
G0 Y-70
G0 Z10
G1 Z3 F 1000
G1 Y-45 Z0
G1 Y 2070 F2000
G0 Z30   
M5
G0 Z-.1                  
M30


Below is header and footer from a similar program that does not rewind.

G21                           
G90                           
G53         Z   0               
T1 M6                           
G0 G90 G54   Y   -60                     
S   3250   M3
G43 H1         Z   15               
G1                F   250   

(program)

G0    Y   1810                     
M5                           
G0          Z   99               
G0    Y   2200                     
G53          Z   0               
M30   





Any idea why the M30 does not pickup in the second program?

   

   

Offline ger21

  • Global Moderator
  • *
  • Posts: 6,127
    • View Profile
    • The CNC Woodworker
Re: Problem with M30 at end of program
« Reply #1 on: July 11, 2018, 03:37:03 PM »
Put your cursor behind, it, hit the Enter key, and then save it.

Mach3 won't see it if there's no CR after it.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline KipKirol

  • Active Member
  • Posts: 20
    • View Profile
Re: Problem with M30 at end of program
« Reply #2 on: July 11, 2018, 04:22:29 PM »
This fixed the program, thanks!

Since the second code was created in Excel I just added a period to the line below the M30 and the program now rewinds.