584,842 active members*
4,311 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > PlanetCNC > Syntax for commanding jog until limit switch is tripped
Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2007
    Posts
    60

    Syntax for commanding jog until limit switch is tripped

    Hi All,

    Anyone else out there able to advise me, what is the G-code command syntax I need to be able to command an axis to jog until it has triggered an input switch?

    Thanks in advance.

    BR,

    Francois

  2. #2
    Join Date
    Apr 2013
    Posts
    110

    Re: Syntax for commanding jog until limit switch is tripped

    I have not tried and I would not say nonsense but I think it is enough to have a look at the tool length script or any of the measure scripts

  3. #3
    Join Date
    Aug 2020
    Posts
    131

    Re: Syntax for commanding jog until limit switch is tripped

    The homing scripts use G38.1
    This moved the axis till a enstop is triggered. At the same time it stores the position in a variable.
    Have a look at the GCode pdf document for details.

  4. #4
    Join Date
    Mar 2017
    Posts
    1295

    Re: Syntax for commanding jog until limit switch is tripped

    If you configure input as probe then machine stops if probe is hit when jogging.
    I use this all the time specially when positioning workpiece.

  5. #5
    Join Date
    Apr 2007
    Posts
    60

    Re: Syntax for commanding jog until limit switch is tripped

    Thanks Sir, will try assigning this input as a probe input. It will sort out getting the Z-axis to stop independently from the Z-axis limit switch commanding it to stop. Should I then be able to follow up with a move up 3mm command, to get it to jog up 3mm once the probe input is hit?

    Thanks for taking the time to respond.

    BR, Francois

    Quote Originally Posted by PlanetCNC View Post
    If you configure input as probe then machine stops if probe is hit when jogging.
    I use this all the time specially when positioning workpiece.

  6. #6
    Join Date
    Apr 2007
    Posts
    60

    Re: Syntax for commanding jog until limit switch is tripped

    Hi, I do not think using the limit switches as stop command will work for my application. My Z-axis is a torch height positioner. I have got limit switches on both ends of the travel limits, and a sense switch that senses torch touch-off. This touch-off sensing can happen anywhere within the travel limits, this is why it is configured as a separate input sense. When I do the torch positioning, I need the torch to jog down until it senses the torch touch, (which is not the travel limit), then jog back a minute distance. I have a different retract script set up for the homing, this is why utilising the limit switch input and homing script will not work for the touch-off. I feel the probe input may be able to do the trick, I shall report back.

    Thanks for responding, Cheers, Francois.

    Quote Originally Posted by ScorpionTDL View Post
    The homing scripts use G38.1
    This moved the axis till a enstop is triggered. At the same time it stores the position in a variable.
    Have a look at the GCode pdf document for details.

  7. #7
    Join Date
    Aug 2020
    Posts
    131

    Re: Syntax for commanding jog until limit switch is tripped

    G38 should work fine for this case. (it stops at the limit switches but also for the probe inputs, it does not distinguish between the two)
    As long as the input for your sense switch is configured as a probe input it will stop when the sense switch is triggered. You get the coordinates from this point and you can travel back whatever distance you want to go back. In essence its nothing different from using a probe to get the workpiece offset.
    Have a look at the probing routines for Z Hight, they should give you everything you need.

    best regards,
    Klaus

  8. #8
    Join Date
    Apr 2007
    Posts
    60

    Re: Syntax for commanding jog until limit switch is tripped

    Thanks Klaus, I will give it a try this weekend, much appreciated.

    B,

    Francois

    Quote Originally Posted by ScorpionTDL View Post
    G38 should work fine for this case. (it stops at the limit switches but also for the probe inputs, it does not distinguish between the two)
    As long as the input for your sense switch is configured as a probe input it will stop when the sense switch is triggered. You get the coordinates from this point and you can travel back whatever distance you want to go back. In essence its nothing different from using a probe to get the workpiece offset.
    Have a look at the probing routines for Z Hight, they should give you everything you need.

    best regards,
    Klaus

Similar Threads

  1. Replies: 1
    Last Post: 10-12-2020, 09:23 AM
  2. Limit Switch in DSP0501 - Can I use a simple NO switch as limit switch
    By silver_fx in forum CNC Machine Related Electronics
    Replies: 2
    Last Post: 08-24-2020, 12:23 PM
  3. Replies: 5
    Last Post: 05-07-2020, 03:36 PM
  4. MACH 3, Warp9 smooth stepper, Leadshine mx4660 Limit switch home switch woes HELP
    By cabinman in forum Mach Software (ArtSoft software)
    Replies: 0
    Last Post: 01-14-2018, 08:26 PM

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
  •