587,092 active members*
4,173 visitors online*
Register for free
Login
IndustryArena Forum > Community Club House > New to forum & needing help
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2008
    Posts
    7

    Question New to forum & needing help

    Hello folks. I'm new to this forum and looking for some help. I have 15 years experience using Fanuc controls but have not touched a CNC control in about 8 years now.

    I have been given the task of programming a production machining job on an Okuma MC-4VA with an OSP5000M-G control. I have everything doing what I need to do in my main program. What is kicking my tail is calling a sub-program from within my main program.

    ALL help and suggestions is greatly appreciated.

  2. #2
    Join Date
    Feb 2008
    Posts
    86

    Here a "LM" Sample

    I believe the formatting is the same for a Mill.
    Could find a mill sample, but found this.

    (************ VARIABLE SET ****************)
    V1 = .236 (A DIM BOTTOM OF CONDYLE TO FACE)
    V2 = 2.300 (OVERALL HGT. OF PART ACTUAL )
    V3 = 3.500 (DIA. OF PART DURING TURN )
    V7 = 65 (SIZE IN MM. )
    (*****************************************)
    V5 = V1+.720+1.250
    (*****************************************)
    G50 S1500
    (TURN)
    NLAP1 G81
    N070 G0 G42 X-.030 Z=V2+.05
    N080 G1 Z=V5 F.003
    N090 G1 X.292 Z=V5
    N100 G1 X.3695 Z=[V5-.040]
    N110 G1 X.3695 Z=[V5-.2516]
    N120 G2 X.3758 Z=[V5-.2733] L.125
    N125 G1 X.6960 Z=[V5-1.1814]
    N130 G2 X.8594 Z=[V5-1.2500] L.083
    N140 G1 X=V3
    N150 G0 X=V3+.100 G40
    G80
    N160 G97 G95 G0 X21 Z10 T101010 S1500 F.006 M3 M42
    N170 G0 X=V3+.100 Z=[V2+.100]
    N180 G85 NLAP1 D.200 U.010 W.002 F.006
    N190 G0 X=V3+.100 Z=[V2+.100]
    N200 G87 NLAP1
    N210 G0 X21 Z10 M5
    M00 (CHECK TAPER)
    N220 M110
    N230 G00 C0 M16
    N240 G00 X4.3628 Z=[V5+.500] T080808 SB=1750 M13
    N250 G90 G94
    N260 G137
    N270 G17
    IF [V7 EQ 55] NTP55
    IF [V7 EQ 60] NTP60
    IF [V7 EQ 65] NTP65
    IF [V7 EQ 70] NTP70
    IF [V7 EQ 75] NTP75
    GOTO N410
    NTP55 CALL OSUBE
    GOTO N410
    NTP60 CALL OSUBA
    GOTO N410
    NTP65 CALL OSUBB
    GOTO N410
    NTP70 CALL OSUBC
    GOTO N410
    NTP75 CALL OSUBD
    N410 G00 Z=[V5+.500]
    N420 M12
    N430 G136
    N450 M109
    N460 G00 X20 Z20 M5
    M2
    (**************)
    OSUBA (60MM CHAMFER)
    N280 G00 X-2.5000 Y-.9500
    N290 G00 Z=[V5-1.25+.050]
    N300 G01 Z=[V5-1.25-.05] F10.
    N310 G101G41 X-1.2001 Y-.9500 F10.
    N320 G101 X-1.2001 Y-.4171
    N330 G102 X-1.1294 Y-.1413 L.5730
    N340 G102 X1.1292 Y-.1413 L1.2884
    N350 G102 X1.2000 Y-.4171 L.5730
    N360 G101 X1.2000 Y-.6416
    N370 G102 X.6067 Y-.9272 L.3654
    N375 G103 X-0.6069 Y-.9272 L.9730
    N380 G102 X-1.2001 Y-.6416 L.3654
    N390 G101 X-1.2001 Y.9500
    N400 G00G40 Z=[V5+.5]
    RTS
    OSUBB (65MM CHAMFER)
    N280 G00 X-1.9938 Y-.9500
    N290 G00 Z=[V5-1.25+.050]
    N300 G01 Z=[V5-1.25-.05] F10.
    N310 G101G41 X-1.2938 Y-.9500 F10.
    N320 G101 Y-.4335
    N330 G102 X-1.2085 Y-.1182 L.625
    N340 G102 X1.2085 Y-.1182 L1.400
    N350 G102 X1.2938 Y-.4335 L.625
    N360 G101 Y-.6950
    N365 G102 X.6473 Y-1.0100 L.400
    N370 G103 X-.6473 Y-1.0100 L1.050
    N380 G102 X-1.2938 Y-.6950 L.400
    N390 G101 Y-.250
    N400 G00G40 Z=[V5+.5]
    RTS
    OSUBC (70MM CHAMFER)
    N280 G00 X-2.1814 Y-.9500
    N290 G00 Z=[V5-1.25+.050]
    N300 G01 Z=[V5-1.25-.05] F10.
    N310 G101G41 X-1.3876 Y-.9500 F10.
    N320 G101 X-1.3876 Y-.4509
    N330 G102 X-1.2870 Y-.0959 L.6769
    N340 G102 X1.2870 Y-.0959 L1.5115
    N350 G102 X1.3876 Y-.4508 L.6769
    N360 G101 X1.3876 Y-.7485
    N330 G102 X.6877 Y-1.0928 L.435
    N340 G103 X-.6877 Y-1.0928 L1.127
    N350 G102 X-1.3876 Y-.7485 L.435
    N395 G101 X-1.3876 Y.9500
    N400 G00G40 Z=[V5+.5]
    RTS
    OSUBD (75MM CHAMFER)
    N280 G00 X-2.1814 Y-.9500
    N290 G00 Z=[V5-1.25+.050]
    N295 G01 Z=[V5-1.25-.05] F10.
    N300 G101G41 X-1.4814 Y-.9500 F10.
    N310 G101 X-1.4814 Y-.4688
    N320 G102 X-1.3659 Y-.0751 L0.7288
    N330 G102 X1.3659 Y-.0751 L1.6231
    N340 G102 X1.4814 Y-.4688 L0.7288
    N350 G101 X1.4814 Y-.8004
    N360 G102 X.7274 Y-1.1749 L0.4700
    N370 G103 X-.7274 Y-1.1749 L1.2038
    N380 G102 X-1.4814 Y-0.8004 L0.4700
    N390 G101 Y-.125
    N400 G00G40 Z=[V5+.5]
    RTS
    OSUBE (55MM CHAMFER)
    N280 G00 X-2.1000 Y-.9500
    N290 G00 Z=[V5-1.25+.050]
    N295 G01 Z=[V5-1.25-.05] F10.
    N300 G101G41 X-1.1063 Y-.9500 F10.
    N310 G101 X-1.1063 Y-.4021
    N320 G102 X-1.0502 Y-.1669 L.5212
    N330 G102 X1.0502 Y-.1669 L1.1769
    N340 G102 X1.1063 Y-.4021 L.5212
    N350 G101 X1.1063 Y-.5881
    N360 G102 X0.5665 Y-.8444 L.3308
    N370 G103 X-0.5665 Y-.8444 L.8962
    N380 G102 X-1.1063 Y-.5881 L.3308
    N390 G101 X-1.1063 Y.9500
    N400 G00G40 Z=[V5+.5]
    RTS
    %

  3. #3
    Join Date
    Mar 2008
    Posts
    7
    Thanks Mongo,

    This is what I have:
    Code:
    N4 G15 H10
    N8 S750 M3
    N10 /M8
    N12 GO X0 Y0
    N14 G56 Z0.1 H10
    N16 CALL OSUBA
    I'm getting various alarms for either no subprogram or subprogram name at the N16 line.

    I originally had a numeric subprogram name but cghanged it to SUBA.SUB after receiving your reply butr I'm still getting the same alarms.

    Is this the correct extension for subprograms?

    I have RTS at the end of my subprogram. is this correct?

    Thanks again for your help.

  4. #4
    Join Date
    Feb 2008
    Posts
    86

    OK try....

    %
    N4 G00 G90 G15 X Y Z H10
    N8 S750 M3
    N10 /M8
    N12 GO X0 Y0
    N14 G56 Z0.1 H10
    N16 CALL OSUBA
    N17 M2 (ALL OSUBS AFTER M2)
    OSUBA
    (PROGRAM)
    (PROGRAM)
    RTS
    %


    GIVE THAT A TRY

  5. #5
    Join Date
    Mar 2008
    Posts
    7

    success!

    Thanks Mongo. I have it working now.

    I never imagined subprograms needed to be at the end of the main program.

  6. #6
    Join Date
    Feb 2008
    Posts
    86

    Awesome

    Glad to hear it worked...
    Enjoy

  7. #7
    Join Date
    Sep 2006
    Posts
    24
    I originally had a numeric subprogram name but cghanged it to SUBA.SUB after receiving your reply butr I'm still getting the same alarms.

    Is this the correct extension for subprograms?
    No, the correct extension is .SSB, System SuBroutine.

    I have RTS at the end of my subprogram. is this correct?
    Yes, this is correct.


    I never imagined subprograms needed to be at the end of the main program.
    They don't. If it is named with the proper extension, the control should find it when you use the CALL Oxxxx.

    Hope this helps.

    Oti

Similar Threads

  1. Needing help please
    By Larry Myers in forum G-Code Programing
    Replies: 4
    Last Post: 10-04-2007, 08:22 PM
  2. needing some imput
    By sodickappsguy in forum Waterjet General Topics
    Replies: 3
    Last Post: 07-31-2007, 03:57 AM
  3. New guy needing help please...
    By studysession in forum Welding Brazing Soldering Sealing
    Replies: 17
    Last Post: 01-12-2007, 08:18 PM
  4. needing an opinion
    By CNC Mendez in forum CamSoft Products
    Replies: 1
    Last Post: 07-21-2006, 10:34 PM
  5. New guy needing recommendations
    By jlh28 in forum Uncategorised CAM Discussion
    Replies: 3
    Last Post: 01-14-2006, 04:05 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
  •