585,768 active members*
4,068 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    4

    Fanuc macro b program advice

    I am trying to make a program that runs on a makino with macro b. It has a harddrive where the program from
    the cnc programmers go. They have a main program in memory that runs that program on hardrive thru 1 to 8 positions.
    No biggie, common main program that cuts electrodes in 3r fixtures.

    m198 is the code used to run the file off the harddrive. thats why im here, if it was m98 i could test it on one of the macro sims.
    But using m198 i dont know if the variables pass to the hardrive.
    My problem is debug time, the machines are busy all the time. I can get a little time here and there, so im trying to cut down
    on my debug time. (I work in another area in the shop)

    I cant believe this program doesnt exist easily to find?

    So here's the jest of it, the program runs from memory, program O0010.
    It calls up tool 1 from the hardrive program made in the cam, O0020 and runs that tool thru all the positions.
    then, it grabs the next tool and runs it thru all the positions, etc... till all tools are done.

    10 toolchanges as opposed to 80.
    Heat control since each position isnt running tools from 2000rpm to 30000 rpm, and then going to the next position. it stays at 2000 till
    all positions are done, then goes to the next tool at a different rpm.
    The machine can be warmed up with dwells before the finish tools run.
    consistancy is what im after.

    here's the code, please dont be afraid to insult me. Im on version 3. Id love to go to version 4!

    See a better way, please let me know.
    *********************

    main in memory ********

    %
    O0010

    #100 = 10 ; ENTER PROGRAM NUMBER FROM SETUP SHEET
    #101 = 8 ; ENTER NUMBER OF POSITIONS 1-8
    #102 = 1 ; ENTER STARTING TOOL FROM SETUP SHEET
    #103 = 10 ; ENTER ENDING TOOL FROM SETUP SHEET



    N40
    IF [#102 GT 8] GOTO 50
    G00 G54.#101 X0. Y0.
    M198 P#100
    #101= #101 - 1
    #102=#102 + 1
    GOTO 40
    N50
    #3000=5(YOU TYPED IN TOO MANY POSITIONS);
    %

    ***************

    sub on hardrive posted from cam system (ug)************

    %
    O0020 ;


    IF [#102 > #103] GOTO 100
    GOTO #102




    N1 T1
    M99
    N2 T2
    M99
    N3 T3
    M99



    N100
    G91G28Z0
    M20
    %

    *********************

    Please help me make this better and debug free....thanks.

  2. #2
    Have you attempted to run this through NCplot? I think it works with M198 but otherwise you can configure it internally and specify where your subprograms are stored.

Similar Threads

  1. Replies: 5
    Last Post: 12-16-2012, 08:43 AM
  2. Fanuc 18: macro program execution speed
    By xingchengting in forum Fanuc
    Replies: 8
    Last Post: 08-27-2011, 01:01 AM
  3. Fanuc repeat macro advice needed...
    By TheDane in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 2
    Last Post: 12-08-2010, 04:58 PM
  4. Fanuc 0M-C Macro Program
    By KARD in forum Fanuc
    Replies: 2
    Last Post: 11-10-2009, 02:26 PM
  5. Replies: 2
    Last Post: 03-27-2009, 09:15 PM

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
  •