585,748 active members*
3,523 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Need help fanuc OiD parametric program instead M98 Q33 L5
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2011
    Posts
    32

    Need help fanuc OiD parametric program instead M98 Q33 L5

    Hello everyone, I'm a mechanical engineer who faces the cnc programming . I plan about a week a work center with Fanuc Hartford OID equipped with hard drives seen as dataserver , I just managed to make a profile path with repetitions and increase with M98 Q loaded on the memory of the CNC , the same path if given in DNC mode directly from hard drive gives me error file not found, from what I deduced that M98 only works when loaded into memory , the path is as follows:

    %
    O001
    G17 G54 G5.1Q1 R6
    T07 M06
    S4000 F8000 M03
    G00 G91 G28 Z0 (Z DI SICUREZZA)
    G90
    M58
    G43 H07 Z100
    G00 X0 Y-66
    G00 Z2
    G01 Z0 F100
    M98 Q33 L5
    G00 G91 G28 Z0
    G90
    G00 G53 X-700 Y0 (SPOST TAVOLA FRONTE OPERAT)
    G5.1Q0
    M30

    N33
    G01 G91 Z-0.5 F100
    G90
    G01 X0 Y-46 G41 F8000 D07
    G01 X-249
    G02 X-255 Y-40 I0 J6
    G01 Y40
    G02 X-249 Y46 I6 J0
    G01 X249
    G02 X255 Y40 I0 J-6
    G01 Y-40
    G02 X249 Y-46 I-6 J0
    G01 X0
    G00 X0 Y-66 G40
    M99
    %

    I ask you experts if I can create a path with the parameters that make me repeat the profile for XX times and increase Z . I hope I helped to load because a path on the memory without being able to create folders in fact I complicates things over to the production , manufacture progressive dies from 300 parts and then the career paths taken by cam, with some changes , I'd like you could to feed directly from HD DNC mode so that they are divided by folder and would not go into total confusion . I have a laptop on the machine from which I transfer the files to the dataserver and intake modifications to the paths . If you need more information do not hesitate to ask

  2. #2
    Join Date
    Dec 2009
    Posts
    952

    Re: Need help fanuc OiD parametric program instead M98 Q33 L5

    i made it for -0.5 for each step on Z
    the step of deep on Z you can easily set up on #101
    %
    O001
    G17 G54 G5.1Q1 R6
    T07 M06
    S4000 F8000 M03
    G00 G91 G28 Z0 (Z DI SICUREZZA)
    G90
    M58
    G43 H07 Z100
    G00 X0 Y-66
    G00 Z2
    G01 Z0 F100
    #100=0
    #101=-0.5(step of Z axis)
    #102=-5(the finish depth of cut--you can set it as much as you want to go with Z )
    N1
    #100=#100+#101
    G01 Z#100 F100

    G01 X0 Y-46 G41 F8000 D07
    G01 X-249
    G02 X-255 Y-40 I0 J6
    G01 Y40
    G02 X-249 Y46 I6 J0
    G01 X249
    G02 X255 Y40 I0 J-6
    G01 Y-40
    G02 X249 Y-46 I-6 J0
    G01 X0
    G00 X0 Y-66 G40
    G0Z0
    IF[#100 LE #102]GOTO 2
    GOTO 1
    N2

    G00 G91 G28 Z0
    G90
    G00 G53 X-700 Y0 (SPOST TAVOLA FRONTE OPERAT)
    G5.1Q0
    M30

    this program will go over and over untill Z will be -5.5mm deep in the workpiece.this because i put in the condition LE-less or equal ,if you can increase or decrease with #102
    good luck

  3. #3
    Join Date
    Sep 2011
    Posts
    78

    Re: Need help fanuc OiD parametric program instead M98 Q33 L5

    minor problem.
    if for example depth should be -5.6 the program wil create a overrun of 0.4 mm making a total depth op 6.0 mm.
    same happens if incremental cutting depth doesnt ad up to eccactly the needed total depth.
    Ones i programmed a macro with overrun protection.
    tryed to implement in zavateandu's program but be carful when trying out and if #102 is a Z+ value it might not work

    %
    O001
    G17 G54 G5.1Q1 R6
    T07 M06
    S4000 F8000 M03
    G00 G91 G28 Z0 (Z DI SICUREZZA)
    G90
    M58
    G43 H07 Z100
    G00 X0 Y-66
    G00 Z2
    G01 Z0 F100 (IF Z0 SHOULD BE YOUR START POSITION)
    #100=#5042 (start position Z axis)
    #101=-0.5(step of Z axis)
    #102=-5(the finish depth of cut--you can set it as much as you want to go with Z )
    WHILE[#100GT#102]DO1
    IF[[#100+#101]LT#102]THEN#101=#102-#100(PREVENT OVER-RUN)

    #100=#100+#101
    G01 Z#100 F100
    G01 X0 Y-46 G41 F8000 D07
    G01 X-249
    G02 X-255 Y-40 I0 J6
    G01 Y40
    G02 X-249 Y46 I6 J0
    G01 X249
    G02 X255 Y40 I0 J-6
    G01 Y-40
    G02 X249 Y-46 I-6 J0
    G01 X0
    G00 X0 Y-66 G40
    G0Z0
    END1
    N2
    G00 G91 G28 Z0
    G90
    G00 G53 X-700 Y0 (SPOST TAVOLA FRONTE OPERAT)
    G5.1Q0
    M30

  4. #4
    Join Date
    Sep 2010
    Posts
    1230

    Re: Need help fanuc OiD parametric program instead M98 Q33 L5

    Quote Originally Posted by duivenhok View Post
    minor problem.
    if for example depth should be -5.6 the program wil create a overrun of 0.4 mm making a total depth op 6.0 mm.
    same happens if incremental cutting depth doesnt ad up to eccactly the needed total depth.
    Ones i programmed a macro with overrun protection.
    tryed to implement in zavateandu's program but be carful when trying out and if #102 is a Z+ value it might not work

    %
    O001
    G17 G54 G5.1Q1 R6
    T07 M06
    S4000 F8000 M03
    G00 G91 G28 Z0 (Z DI SICUREZZA)
    G90
    M58
    G43 H07 Z100
    G00 X0 Y-66
    G00 Z2
    G01 Z0 F100 (IF Z0 SHOULD BE YOUR START POSITION)
    #100=#5042 (start position Z axis)
    #101=-0.5(step of Z axis)
    #102=-5(the finish depth of cut--you can set it as much as you want to go with Z )
    WHILE[#100GT#102]DO1
    IF[[#100+#101]LT#102]THEN#101=#102-#100(PREVENT OVER-RUN)

    #100=#100+#101
    G01 Z#100 F100
    G01 X0 Y-46 G41 F8000 D07
    G01 X-249
    G02 X-255 Y-40 I0 J6
    G01 Y40
    G02 X-249 Y46 I6 J0
    G01 X249
    G02 X255 Y40 I0 J-6
    G01 Y-40
    G02 X249 Y-46 I-6 J0
    G01 X0
    G00 X0 Y-66 G40
    G0Z0
    END1
    N2
    G00 G91 G28 Z0
    G90
    G00 G53 X-700 Y0 (SPOST TAVOLA FRONTE OPERAT)
    G5.1Q0
    M30
    The following is nearly the same, but with the Conditional Statement simplified. The logic will work with a + value for #102, #3 in my example. Your example and the following has a chance of working in a DNC session, but I don't believe the example in Post #2 does, because of the GOTO statements. The GOTO searches forward and if the target Sequence number is not found, the search continues from the top of the program.

    Regards,

    Bill

    %
    O001
    G17 G54 G5.1Q1 R6
    T07 M06
    S4000 F8000 M03
    G00 G91 G28 Z0 (Z DI SICUREZZA)
    G90
    M58
    G43 H07 Z100
    G00 X0 Y-66
    G00 Z2
    G01 Z0 F100 (IF Z0 SHOULD BE YOUR START POSITION)
    (Local Variables will suffice as no other program is using the Variables)
    #1 = #5043 (start position Z axis)
    #2 = -0.5 (step of Z axis)
    #3 = -5.0 (the finish depth of cut--you can set it as much as you want to go with Z )

    WHILE [#1 GT #3]DO1
    #1 = #1 + #2
    IF[#1 LT #3] THEN #1 = #3 (PREVENT OVER-RUN)
    G01 Z#1 F100
    G01 X0 Y-46 G41 F8000 D07
    G01 X-249
    G02 X-255 Y-40 I0 J6
    G01 Y40
    G02 X-249 Y46 I6 J0
    G01 X249
    G02 X255 Y40 I0 J-6
    G01 Y-40
    G02 X249 Y-46 I-6 J0
    G01 X0
    G00 X0 Y-66 G40
    G0Z0 (As the End X, Y Position in previous block is the same as the Start Position, this move to Z0 is not required.)
    END1
    G00 G91 G28 Z0
    G90
    G00 G53 X-700 Y0 (SPOST TAVOLA FRONTE OPERAT)
    G5.1Q0
    M30

  5. #5
    Join Date
    Jan 2011
    Posts
    32

    Re: Need help fanuc OiD parametric program instead M98 Q33 L5

    hello and thanks to all but in DNC mode from dataserver the machine give the error: illegal mode if/ while/ do. Instead if i load it on cnc memory it works fine. how can i resolve? thanks for your great works

  6. #6
    Join Date
    Sep 2010
    Posts
    1230

    Re: Need help fanuc OiD parametric program instead M98 Q33 L5

    Quote Originally Posted by bigodinos View Post
    hello and thanks to all but in DNC mode from dataserver the machine give the error: illegal mode if/ while/ do. Instead if i load it on cnc memory it works fine. how can i resolve? thanks for your great works
    I don't believe you will be able to. I knew the version using the GOTO branch wouldn't work, for the reason given in my previous Post, When supplying data to the control via DNC, the program code goes to God once its been executed by the control. Accordingly, branching to a previous block using GOTO wont work because that previous block no longer exists.

    I thought the DO Loop method may have had a chance of success due to the amount of code that's buffered and the different process of the WHILE/DO Loop, but I've since found that a repeat instruction or branch instruction is not possible. If such an instruction is executed, P/S alarm No. 123 is raised. Also, when reserved words such as IF, WHILE, COS, and NE etc are used used with User Macro Code in DNC operation, a blank is inserted between adjacent characters.

    Regards,

    Bill

  7. #7
    Join Date
    Jan 2011
    Posts
    32

    Re: Need help fanuc OiD parametric program instead M98 Q33 L5

    thanks but your give me bad news, i think that fanuc is an economic and simply control but it has limited functions, heidenhain is the best!!

Similar Threads

  1. parametric program for spiral helical interpolation
    By Bastida in forum Parametric Programing
    Replies: 25
    Last Post: 12-31-2011, 02:59 AM
  2. Can't run a program Fanuc O-M
    By laka in forum Fanuc
    Replies: 9
    Last Post: 09-27-2011, 10:20 PM
  3. PROGRAM ZERO ON FANUC M
    By mousongie in forum CNC Machining Centers
    Replies: 6
    Last Post: 12-29-2010, 03:24 AM
  4. New program on Fanuc 6t?
    By pob198 in forum European Club House
    Replies: 2
    Last Post: 01-14-2010, 10:31 AM
  5. macro B parametric Program mazak lathe
    By taperedbearings in forum MetalWork Discussion
    Replies: 0
    Last Post: 09-08-2009, 09:04 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
  •