Results 1 to 8 of 8

Thread: Program Looping

  1. #1
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default Program Looping

    I'm trying to get my programs to either repeat x amount of times and/or loop continuously. I'm using a CamSoft Pro unit that controls an X-Y table. Reading the GCode programming.rtf file I was given for reference, it has M97 as being used for jumping and goto line numbers. Here's what I tried:

    N00 G20 G91
    N10 G01 X0.1 Y0.1 F30
    N20 M97 N10

    That didn't work. Any ideas on repeating program lines and continuous loops?

    Similar Threads:


  2. #2
    Registered Karl_T's Avatar
    Join Date
    Mar 2004
    Location
    Dassel,MN,USA
    Posts
    1403
    Downloads
    0
    Uploads
    0

    Default

    Change your line to M97 P10

    Here's clip from "Search for Solutions"

    If you look at M97 you will see JUMP. This way instead of the machine operator using CamSoft logic they use M97 like this:

    M97 P100

    This is the same as JUMP N100. The reason you use P instead of N in the Default.CBK is because the logic in M97 uses the lowercase p character as the line number to jump to, much like M98 uses P, also to follow industry standards. However, if you want to change this to use N instead, you could write JUMP Nn



  3. #3
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default

    Excellent tip Karl. Adding the P instead of the N did the trick.

    I got a slight lag where the motors hesitated once it got to the end of my program, then looped. I removed the hesitation with a G08 which is spline smoothing on I discovered, but now the only way to stop my program is with E-STOP. Is that normal with the G08 command?



  4. #4
    Registered Karl_T's Avatar
    Join Date
    Mar 2004
    Location
    Dassel,MN,USA
    Posts
    1403
    Downloads
    0
    Uploads
    0

    Default

    I've never needed G08. Its been a LONG time but I do remember working with other parameters to get smooth jerk free cuts. Investigate commands like BLEND TOLERANCE, others. Use Search for Solutions on words like jerk, rough, etc. I know there's a lot on this subject in there.

    The G08 command issues the SMOOTH command. As it dumps commands way ahead to the motion card, I can see where you could have trouble with an endless loop G code program. Probably not a good practice to program this way.

    Karl



  5. #5
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    36
    Downloads
    0
    Uploads
    0

    Default

    I'll do as you suggest by searching with the keywords and checking how the BLEND TOLERANCE works.

    I do need the non-stop program to send my rotary fixtures turning without the need of wondering if my program and fixture will stop turning soon. It's also necessary to continue my movement from where I left off instead of restarting the program.



  6. #6
    Registered Karl_T's Avatar
    Join Date
    Mar 2004
    Location
    Dassel,MN,USA
    Posts
    1403
    Downloads
    0
    Uploads
    0

    Default

    Do you have "Feed Hold" and "Cycle Start" buttons connected directly to inputs? Me thinks you'll need this.

    Sounds like you have an unusual application. I'd talk to Rueben and Earnie (Camsoft Techs.) after you've read up on the subject.

    Karl



  7. #7
    Moderator HuFlungDung's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    4826
    Downloads
    0
    Uploads
    0

    Default

    The SMOOTH ON command should only be issued at the start of a continuous unbroken chain of entities (on the same line as a G1). Then, a SMOOTH OFF command must be issued concurrently with the last entity in that chain.

    No rapid movements should be incorporated within the chain of entities.

    I have no idea how one could incorporate such smoothing gcodes within a standard CAM program, so I usually just hand edit the program, find the finishing pass, and insert the gcodes that call SMOOTH ON and SMOOTH OFF myself.

    First you get good, then you get fast. Then grouchiness sets in.

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


  8. #8
    Registered Karl_T's Avatar
    Join Date
    Mar 2004
    Location
    Dassel,MN,USA
    Posts
    1403
    Downloads
    0
    Uploads
    0

    Default

    Didn't hear back from Bohemund, so he may have already solved the issue.

    As I understand, the need is to turn a rotary fixture on and leave it run. Needs to be able to stop/start rotation.

    I think I'd write a custom Gcode that contains:
    COMMAND JG ,,{speed value} <note this would be axis3>
    COMMAND BG

    This would start that axis rotating. You'd then need inputs that would enter COMMAND ST to stop rotation and COMMAND BG to restart rotation

    There may be reasons this won't work, need to know more about application needs.

    Karl



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 from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed