585,925 active members*
3,356 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2007
    Posts
    36

    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?

  2. #2
    Join Date
    Mar 2004
    Posts
    1542
    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
    Join Date
    May 2007
    Posts
    36
    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
    Join Date
    Mar 2004
    Posts
    1542
    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
    Join Date
    May 2007
    Posts
    36
    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
    Join Date
    Mar 2004
    Posts
    1542
    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
    Join Date
    Mar 2003
    Posts
    4826
    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
    Join Date
    Mar 2004
    Posts
    1542
    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

Similar Threads

  1. Sub Looping
    By murphyspost in forum Daewoo/Doosan
    Replies: 8
    Last Post: 12-27-2006, 05:28 PM
  2. E-Stop Looping Errors in CamSoft
    By DA Dave in forum CamSoft Products
    Replies: 1
    Last Post: 05-17-2006, 06:05 PM
  3. Looping Wire Drive for axis?
    By Dongle in forum Linear and Rotary Motion
    Replies: 29
    Last Post: 04-13-2006, 04:49 PM
  4. Cutting at multiple depths.. looping ??
    By esmiller in forum Mach Software (ArtSoft software)
    Replies: 9
    Last Post: 01-31-2006, 12:48 PM
  5. Replies: 11
    Last Post: 10-09-2005, 05:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •