510,124 active members
3,261 visitors online
Register for free
Login
Page 1 of 2 12
Results 1 to 12 of 23
  1. #1
    Registered
    Join Date
    Apr 2018
    Posts
    42

    Start From Selected Line

    Is there anyway to edit the start from selected line script? I just had to stop my program and then restarted. The machine plunged down into my part and broke my tool. This behavior is different then TNGV1. I searched for the script but it is no where to be found. PLEASE HELP!

  2. #2
    Moderator PlanetCNC's Avatar
    Join Date
    Mar 2017
    Posts
    404

    Re: Start From Selected Line

    Start ftom selected line is same script as "OnStart" but you can check #<line> parameter to see if machine started from first line.
    there are also options to restore Mist, Flood and Spindle to what it should be.

    Your machine should not plunge down by itself. Perhaps some offsets were wrong.

    If you can reproduce this then send me your profile, g-code and line number and I'll check what happened.

  3. #3
    Registered
    Join Date
    Apr 2018
    Posts
    42

    Re: Start From Selected Line

    It seems to be ignoring the "OnStart" script. The only time I can get the script to run is running from the first line. I've sent all my files to the PlanetCNC support email. this is probably the most frustrating thing for me. I need a good routine for starting in the middle of a program. When I break a tool or something else. Back in my days of Mach 3, they had a nice dialog that would safely get you back to where you wanted to start from. I have no problem working on a script to do something similar but I believe there is something else going on here. It may be possible that I'm just not doing something right.

    FS

  4. #4
    Moderator PlanetCNC's Avatar
    Join Date
    Mar 2017
    Posts
    404

    Re: Start From Selected Line

    I've added some very useful stuff for "OnStart" script that should solve all of your problems. Version 11-22 is scheduled for Friday

  5. #5
    Registered
    Join Date
    Apr 2018
    Posts
    42
    This is great news! Im very happy that you can react so quickly. Are you thinking you will add separate scripts for this? Would you be able to explain a little more?

  6. #6
    Moderator PlanetCNC's Avatar
    Join Date
    Mar 2017
    Posts
    404

    Re: Start From Selected Line

    It is same "OnStart" script. You can check #<line> parameter to see it it is greater than 0 (start from selected line...) . I've also added other parameters to bheck basic IO state ad position state. For example:

    Code:
    (print,OnStart script @ Line: #<line,0>)
    (print,  PosState: X#<posstate_x,3>, Y#<posstate_y,3>, Z#<posstate_z,3>)
    O<chk> if [#<line>]
      (print,  MistState: #<miststate,0>)
      (print,  FloodState: #<floodstate,0>)
      (print,  SpindleState: #<spindlestate,0>)
      (print,  MotorsState: #<motorsstate,0>)
      (print,  LimitsState: #<limitsstate,0>)
    
    
      G53 G00 Z#<_probe_safeheigh>
      G53 G00 X#<posstate_x> Y#<posstate_y> 
      G53 G00 Z#<posstate_z>
    O<chk> endif
    This script will print some values and then traverse to last position on safe height.

  7. #7
    Registered
    Join Date
    Apr 2018
    Posts
    42
    So ive had a chance to install the new update and test the "onstart" script. I'm wondering if its possible to store the program position when stopping in the middle of the program?
    If a tool breaks and i hit stop or estop. I would like to jog or move to a tool change position, change tool, probe to set the tool offset, and then continue back to the line that i select. Hopefully, this makes sense and is acheievable.

    Im curious to what other users are doing.

  8. #8
    Moderator PlanetCNC's Avatar
    Join Date
    Mar 2017
    Posts
    404

    Re: Start From Selected Line

    You can use OnStop script to store position and/or line number where program stopped.

  9. #9
    Registered
    Join Date
    Apr 2018
    Posts
    42

    Re: Start From Selected Line

    That's sounds like what I need, unfortunately, I do not know how to write the script to do this. Is it possible to help me with an example? How do I store and then call back position state?

  10. #10
    Moderator PlanetCNC's Avatar
    Join Date
    Mar 2017
    Posts
    404

    Re: Start From Selected Line

    Why do you need this?

    OnStop script prints line number to output window.
    "Start from selected line" resumes from correct position. OnStart script can be used to manipulate this position.
    Right click on g-code line gives you "Move to selected line" option.

    I think everything is already in there and there is no need for special scripting unless you have special needs.
    Attached Thumbnails Attached Thumbnails 25-11-2019 12-44-03.png  

  11. #11
    Registered
    Join Date
    Apr 2018
    Posts
    42
    I think youve misunderstood what i was explaining to you. I know where the menus are and i understand how they work. Currently the scripts that exist will work if i stop the machine and use the "start from selected line" command to start in the exact spot again. But what if my tool broke whil cutting and i needed to stop, replace the tool? I would need to return to the beginning of that line where the tool broke. Currently this does not work. Unless, im completely missing something.

    What i need is to store the gcode position on stop so i can always start where i need to. This all worked in the previous TNG version.

  12. #12
    Moderator PlanetCNC's Avatar
    Join Date
    Mar 2017
    Posts
    404

    Re: Start From Selected Line

    This also works in this version even without any scripts.
    Did you forget to set new tool offsets after you changed tool?

Page 1 of 2 12

Similar Threads

  1. Set Start line (;-)
    By vmax549 in forum Tormach PathPilot™
    Replies: 2
    Last Post: 11-08-2019, 02:57 AM
  2. Replies: 4
    Last Post: 02-10-2019, 10:24 AM
  3. Replies: 3
    Last Post: 12-19-2015, 02:29 AM
  4. line out start point
    By kendo in forum Mazak, Mitsubishi, Mazatrol
    Replies: 2
    Last Post: 06-26-2010, 01:00 AM
  5. Run From Selected Line- works
    By Dan Falck in forum LinuxCNC (formerly EMC2)
    Replies: 0
    Last Post: 01-28-2009, 05:16 AM

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
  •