Incorporating Switch into CNC Code


Results 1 to 3 of 3

Thread: Incorporating Switch into CNC Code

  1. #1

    Default Incorporating Switch into CNC Code

    Does anyone know if it is possible to incorporate a switch into CNC Program. Basically I want to run the X axis towards a part until a switch is made. When switch is made the x axis will stop and the program will advance to the next line of code and the Y axis will kick in. Sort of like how probing works. I know it can be hard wired without cnc control using arduino, but wondering if there was any way to do this in Mach 3? Thanks in advance.

    Similar Threads:


  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Incorporating Switch into CNC Code

    Maybe use M1 (optional stop) or M0 (program pause), then wait for the input to trigger before proceeding.

    Not sure if this will work in Mach3, but worth looking at.

    Jim Dawson
    Sandy, Oregon, USA


  3. #3
    Member
    Join Date
    Nov 2013
    Posts
    4282
    Downloads
    0
    Uploads
    0

    Default Re: Incorporating Switch into CNC Code

    Hi,
    Mach3 and Mach4Hobby DO NOT have conditional Gcode whereas Mach4Industrial does.

    With conditional Gcode, sometimes called Fanuc B, you can have a statement like:

    If (signal/switch/condition) then
    ..................................
    else
    ...................................
    endif

    As Jim points out you may be able to use a trick to accomplish what you want in Mach3, there was a guy BR548, a regular on the Mach3 forum, and he was
    famous for these little tricks to get Mach3 behave as if it had conditional programming. Could be worth posting there...

    Craig



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

Incorporating Switch into CNC Code

Incorporating Switch into CNC Code