Newbie What is wrong with this embedded subprogram code (MITSUBISHI M70)


Results 1 to 6 of 6

Thread: What is wrong with this embedded subprogram code (MITSUBISHI M70)

  1. #1
    Member Arin93's Avatar
    Join Date
    Jul 2020
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default What is wrong with this embedded subprogram code (MITSUBISHI M70)

    This doesn't work
    O112233(KANAL)
    N14 T03 M06(3.0 FREZE)
    N15 M13 S6000
    N16 G0 G56 G90 X-3.0 Y-89.5
    N17 G43 Z20.0 H03 T01
    #1=0.6326
    M98 H3980 L5
    #1=0.6326
    Y-83.5
    M98 H3980 L5(JUST REPEAT SAME THING ON DIFFERENT Y COORD)
    #1=0.6326
    Y-77.5
    M98 H3980 L5
    ...
    ..
    Y-40
    #1=0.6326
    M98 H3990 L5
    N362 G0 Z20.0
    N363 M09
    N364 G91 G28 Z0
    N365 G91 G28 Y0 M19
    N366 M02
    (ALTPROG)
    N3980 G1 Z-#1 F1000
    G90 X41.4
    G0 Z20.0
    X-3.0
    #1=#1+0.6326
    M99
    (ALTPROG2)
    N3990 G1 Z-#1 F1000
    X38.4
    G0 Z20.0
    X-3.0
    #1=#1+0.6326
    M99
    %
    Machine gives a P232 "No Prog. no" error on line M98 H3980 L5
    What I am trying to do is machining a horizantal open slot on different y values with a bit efficient way.
    On an mitsubishi machine this nc code has worked.
    This works:
    T11M06
    G43Z20H11
    G1Z0F1000
    M98G3330L3
    G90Z20
    X50
    Z0
    G98H3331L3
    G90Z20
    G91G28Z0
    M02

    (EOP)
    N3330
    G91G1Z-1F500
    G90Y10
    Y-10
    M99

    (EOP)
    N3331
    G91G1Z-1G500
    G90Y15
    Y-15
    M99
    %
    I think it is somehow related with a parameter so that machine does not search opened nc code automatically when "Pcode" ise omitted.
    I don't want to use seperated subprogram neither I can call subprogram from MD card.
    Any suggestions are appriciated.
    Regards

    Similar Threads:


  2. #2
    Member lucaswalker's Avatar
    Join Date
    Sep 2018
    Posts
    27
    Downloads
    0
    Uploads
    0

    Default Re: What is wrong with this embedded subprogram code (MITSUBISHI M70)

    Hi,

    You should try to use the standard way to declare and call subs :

    subs :
    O123 (declare sub n*123)
    ...
    ...
    M99 (return)

    Calls:
    M98 P123 L5 (Where L is repetitions)

    Your program will lokk like that :

    O112233(KANAL)
    N14 T03 M06(3.0 FREZE)
    N15 M13 S6000
    N16 G0 G56 G90 X-3.0 Y-89.5
    N17 G43 Z20.0 H03 T01
    #1=0.6326
    M98 P3980 L5
    #1=0.6326
    Y-83.5
    M98 P3980 L5(JUST REPEAT SAME THING ON DIFFERENT Y COORD)
    #1=0.6326
    Y-77.5
    M98 P3980 L5
    ...
    ..
    Y-40
    #1=0.6326
    M98 P3990 L5
    N362 G0 Z20.0
    N363 M09
    N364 G91 G28 Z0
    N365 G91 G28 Y0 M19
    N366 M02

    (ALTPROG)
    O3980
    G1 Z-#1 F1000
    G90 X41.4
    G0 Z20.0
    X-3.0
    #1=#1+0.6326
    M99

    (ALTPROG2)
    O3990
    G1 Z-#1 F1000
    X38.4
    G0 Z20.0
    X-3.0
    #1=#1+0.6326
    M99
    %


    Its looks like the Mitsubishi controller can understand the synthax you used (M98 H123 L5 to call a sub at block defined by H), but if you have trouble with such synthax I recommand you to stcik to the standard !

    Attached Thumbnails Attached Thumbnails What is wrong with this embedded subprogram code (MITSUBISHI M70)-immagine_2021-02-03_111553-png  


  3. #3
    Member Arin93's Avatar
    Join Date
    Jul 2020
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Re: What is wrong with this embedded subprogram code (MITSUBISHI M70)

    Thanks for the reply
    In Mitsubishi the common format [M98 P___ H___ L_]
    P searchs program and, H search the starting block in the program specified as P__
    If I omit P program searches on itself.
    I remember that M70 can't use multiple O commands in same file, but I'll give it a shot and give another reply.

    Its either something with macro variables or about a machine parameter.
    I am going to let you know if O command works or not.



  4. #4
    Member lucaswalker's Avatar
    Join Date
    Sep 2018
    Posts
    27
    Downloads
    0
    Uploads
    0

    Default Re: What is wrong with this embedded subprogram code (MITSUBISHI M70)

    Other possible issue;

    Use a parameter to specify a 4- or 8-digit subprogram No. starting with O. (from online doc)

    Your main program is 6 digit Number, (O112233); maybe the controller does not like that.



  5. #5
    Member Arin93's Avatar
    Join Date
    Jul 2020
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Re: What is wrong with this embedded subprogram code (MITSUBISHI M70)

    Okay I had a chance to try things again. It turns out the second code that I gave is actually working with one machine but does not work with another (and newer) machine.
    Both uses same controller.
    We are running the program from MD card.
    This problem made me really sad.
    I've already tried to use different O"numbers"



  6. #6
    Member Arin93's Avatar
    Join Date
    Jul 2020
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Re: What is wrong with this embedded subprogram code (MITSUBISHI M70)

    Quote Originally Posted by Arin93 View Post
    This doesn't work
    O112233(KANAL)
    N14 T03 M06(3.0 FREZE)
    N15 M13 S6000
    N16 G0 G56 G90 X-3.0 Y-89.5
    N17 G43 Z20.0 H03 T01
    #1=0.6326
    M98 H3980 L5
    #1=0.6326
    Y-83.5
    M98 H3980 L5(JUST REPEAT SAME THING ON DIFFERENT Y COORD)
    #1=0.6326
    Y-77.5
    M98 H3980 L5
    ...
    ..
    Y-40
    #1=0.6326
    M98 H3990 L5
    N362 G0 Z20.0
    N363 M09
    N364 G91 G28 Z0
    N365 G91 G28 Y0 M19
    N366 M02
    (ALTPROG)
    N3980 G1 Z-#1 F1000
    G90 X41.4
    G0 Z20.0
    X-3.0
    #1=#1+0.6326
    M99
    (ALTPROG2)
    N3990 G1 Z-#1 F1000
    X38.4
    G0 Z20.0
    X-3.0
    #1=#1+0.6326
    M99
    %
    Machine gives a P232 "No Prog. no" error on line M98 H3980 L5
    What I am trying to do is machining a horizantal open slot on different y values with a bit efficient way.
    On an mitsubishi machine this nc code has worked.
    This works:
    T11M06
    G43Z20H11
    G1Z0F1000
    M98G3330L3
    G90Z20
    X50
    Z0
    G98H3331L3
    G90Z20
    G91G28Z0
    M02

    (EOP)
    N3330
    G91G1Z-1F500
    G90Y10
    Y-10
    M99

    (EOP)
    N3331
    G91G1Z-1G500
    G90Y15
    Y-15
    M99
    %
    I think it is somehow related with a parameter so that machine does not search opened nc code automatically when "Pcode" ise omitted.
    I don't want to use seperated subprogram neither I can call subprogram from MD card.
    Any suggestions are appriciated.
    Regards
    Okay it turned out that the code is correct.
    The problem is with the machine because a specific machine gives p232 "no prog no." error.
    This format is important for me thus I am going to dig deeper. I'll let you know when I find the solution most probably about a parameter



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

What is wrong with this embedded subprogram code (MITSUBISHI M70)

What is wrong with this embedded subprogram code (MITSUBISHI M70)