585,749 active members*
3,781 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1

    subprogram calls

    Hello everyone,

    Writing a program with multiple subprogram calls (7) for 4 different work offsets. I usually start my sub program calls with a P9000, then increment for each subprogram. Trouble is, I have more than 10000 lines of code in the program. I was going to remove the line numbers, but I believe that the haas controller automatically inserts line numbers. And I also believe that your sub program calls need to begin at a certain numerical value.. Am I wrong about this? Could someone offer some help or ideas?

    Thanks.

  2. #2
    Join Date
    Jul 2005
    Posts
    12177
    The Haas controller does not automatically insert line numbers so you can remove them; the editor has that function to make it easy.

    Are you doing external, M98, subprograms or internal M97? With the M97 you can have any number you like. The way the Haas control works is that if you have M97 P2000 it looks for line N2000 in the program that is running and goes to that line; actually if you had more than one line labelled N2000 it will go to the first one it finds.

    Are you calling the subprograms for each tool as well as each work offset? A bit more explanation would make ity easier to come up with suggestions.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  3. #3
    I am calling each work offset with each tool change, to minimize tool changes. And yes just picked up on the non automatic line number insertion. Almost have it hammered out without bugs, just something minor to fix. Now my M99 is taking me back to the very beginning of the program.

  4. #4
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by sleeper142 View Post
    ....Now my M99 is taking me back to the very beginning of the program.
    Do you have anything else on the M99 line. It should take you back to the line below the M97 line. But M99 can also be used to jump to any line in the program so if you put a Pnnnn on the same line it will jump to Nnnnn.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  5. #5
    Got it figured out. I had nothing else on the M99 line, and it was not working. went through it again in the editor... then it worked fine. Maybe I missed something. Oh well, program runs flawlessly now. Time to head home! Thanks for the help Geof!

Similar Threads

  1. Help with subprogram
    By 69owb in forum G-Code Programing
    Replies: 7
    Last Post: 09-05-2008, 11:06 PM
  2. eia subprogram
    By rs1982 in forum Mazak, Mitsubishi, Mazatrol
    Replies: 4
    Last Post: 04-11-2008, 02:10 PM
  3. MAZAK LATHE QUADRENT CALLS
    By CAMCRASH in forum G-Code Programing
    Replies: 0
    Last Post: 01-14-2008, 08:50 PM

Posting Permissions

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