Simple macro question


Results 1 to 4 of 4

Thread: Simple macro question

  1. #1
    Member Azalin's Avatar
    Join Date
    Mar 2014
    Location
    Turkey
    Posts
    1131
    Downloads
    0
    Uploads
    0

    Default Simple macro question

    Hi,

    I'm opening this thread for a friend and I'll try to ask it as simple as I can.

    He'll put a line somewhere in the code (let's say M900). He wants Mach3 to pause the code at the line where the M900 is and wait for the operator to trigger a hardware switch then continue executing the program from there. Please see the very simple gcode bellow.

    Code:
    M200
    M202
    G01 X-40 F50000
    G01 Z-690.5 F50000
    G01 X40 F85000
    G01 X100 F3000
    G4 P1
    M208
    G4 P500
    M206
    G4 P500
    M209
    G4 P500
    G01 X0 F85000
    G4 P1
    G01 Z0 F85000
    G4 P100
    M211
    G4 P100
    M201
    M203
    M204
    G4 P1000
    G01 X-420 Y1000 F70000
    G4 P1
    M900 -----------------------------------------> This is where the code waits for the switch input.
    G01 Z-940 F50000
    G4 P1
    G01 Z-960 F2000
    G4 P1
    M207
    G4 P500
    G01 Z0 F70000
    G4 P1
    G01 X0 Y0
    G4 P1
    M205
    G4 P1
    M30
    %
    Is there a sample macro to play around to achieve what he wants?

    Thanks in advance,

    Similar Threads:
    Suat
    Proud father, C# developer, Model heli pilot, newbie free time machinist for hobby


  2. #2
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Simple macro question

    Just use M1 and turn on Optional M1 Stop.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Member Azalin's Avatar
    Join Date
    Mar 2014
    Location
    Turkey
    Posts
    1131
    Downloads
    0
    Uploads
    0

    Default Re: Simple macro question

    Thanks Gerry. I'll pas your answer to him.

    Suat
    Proud father, C# developer, Model heli pilot, newbie free time machinist for hobby


  4. #4
    Member Azalin's Avatar
    Join Date
    Mar 2014
    Location
    Turkey
    Posts
    1131
    Downloads
    0
    Uploads
    0

    Default Re: Simple macro question

    Hi again,

    I think I misunderstand his question.

    Say, he has a hardware switch (connected to somewhere in the BOB). So the new question is as follows:

    - He starts a program (gcode runs).
    - If he did not pushed that switch the program will stop at the M900 (or whatever) line. Programs waits for the switch input. He pushes the switch and program runs trough that point.
    - If he already pushed the switch even before the code hasn't got to the M900 line then Mach3 will skip the M900 and keep running.

    I really don't know why he need such operation but anyway. Any helpe would be apreciated.

    Best,
    Suat

    Suat
    Proud father, C# developer, Model heli pilot, newbie free time machinist for hobby


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Simple macro question

Simple macro question