584,858 active members*
4,947 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Apr 2018
    Posts
    45

    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
    Join Date
    Mar 2017
    Posts
    1295

    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
    Join Date
    Apr 2018
    Posts
    45

    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
    Join Date
    Mar 2017
    Posts
    1295

    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
    Join Date
    Apr 2018
    Posts
    45
    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
    Join Date
    Mar 2017
    Posts
    1295

    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
    Join Date
    Apr 2018
    Posts
    45
    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
    Join Date
    Mar 2017
    Posts
    1295

    Re: Start From Selected Line

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

  9. #9
    Join Date
    Apr 2018
    Posts
    45

    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
    Join Date
    Mar 2017
    Posts
    1295

    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
    Join Date
    Apr 2018
    Posts
    45
    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
    Join Date
    Mar 2017
    Posts
    1295

    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?

  13. #13
    Join Date
    Apr 2018
    Posts
    45
    I did not forget. I will try a new blank script. The current script, which you wrote will store the current position when i use start from selected line. So if i move the machine to change a tool it will just start the gcode from that new position. I dont have special requirements. I feel this is just something that is essential. I need the ability to control the start position in case of a problem during cutting. I will try and put an example together to hopefully better explain myself. Am i alone on this? Please other users, what do you do in these situations?

  14. #14
    Join Date
    Mar 2017
    Posts
    1295

    Re: Start From Selected Line

    Script posted on previous page adds functionality to traverse to selected line position on safe height. This feature is new in TNGv2 and was not possible before.
    By default machine still goes to correct position just not on safe height.

    I believe we got it right.If you have example that does not work please send us g-code and your exported profile to email an I will examine it ASAP. This is truly essential feature and will have top priority.

  15. #15
    Join Date
    Apr 2013
    Posts
    110

    Re: Start From Selected Line

    With TNG V2 I have not tried yet, but with the old CNCUSB I often had to interrupt the processing for various reasons and I have always successfully used the "Start from selected line" function. I hope it works well in TNG V2.

  16. #16
    Join Date
    Apr 2018
    Posts
    45
    I've been on vacation so im back now and ive had a chance to go back and experiment with the start from "selected line" command again. Ive downloaded and installed the 11-29 version and retested the "start from selected line" command.

    It appears to have many issues still. I have all tool offsets and machine offsets at zero and the machine still travels to some location way outside of the limits. I must be missing something. Sooo frustrating, when this worked in the previous version. I would like a script written for me to remember the gcode position on stop, so once i stop the machine i can jog the machine to a location to replace a broken tool and then i return to that remembered position in the X and Y only at the safe z height. Then the script would propmpt the user to confirm the start. The machine would then plunge at a nice slow feedrate. Then continue in the cur.

  17. #17
    Join Date
    Mar 2017
    Posts
    1295

    Re: Start From Selected Line

    Please send me your profile (.zip), g-code and line number from where you want to start.

    Whatever I try it works like it should. Perhaps there is something in your files.

  18. #18
    Join Date
    Apr 2018
    Posts
    45
    I just sent my files to the support email. Please understand that i was experimenting with a file that i previously used in the original TNG and it worked.

  19. #19
    Join Date
    Mar 2017
    Posts
    1295

    Re: Start From Selected Line

    Thank you. Your files helped me locate a bug. It was units related. I converted millimeters to inches incorrectly.
    New version will be released on Friday.

    PS
    Nice UI customization.

  20. #20
    Join Date
    Apr 2018
    Posts
    45
    This is great news. In the mean time would you be able to help me with a custom script based on my previous posts?

    Im not a programming expert so i do need some guidance.

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
  •