588,190 active members*
4,383 visitors online*
Register for free
Login
Results 1 to 16 of 16
  1. #1

    Question Okuma Lathe question

    Can anyone tell me how to loop a program a given number of times?

    Control is OSP5000L-G


    Thanks for the help
    Tony

  2. #2
    Join Date
    Sep 2003
    Posts
    64
    Do you need to step over on the z axis and repeat or just recut same area?

  3. #3
    brtlatjgt,

    What I need to do is run the whole program 10 times.

    We have a bar puller set up but the operator is having to push cycle start after every part but we would like to loop the program 10 times because that is the number of parts we can get out of one stick of material then we could have him run another machine at the same time.



    Thanks for your help
    Tony

  4. #4
    Join Date
    Dec 2003
    Posts
    24220
    Do you have custom macro option, G65? you can call a routing by (L)iteration number of times, the custom macro also accepts 'argument assignments' so it is possible to run the same sub-routine with values for different parts etc.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #5
    Join Date
    Apr 2005
    Posts
    629

    Pretty easy I believe...

    I am not 100% sure if this would work on an OSP, but it works fine on FANUC.

    Change your main program to a sub by ending it with an M99 instead of the M30 (or M02).

    Now create a main program that looks something like this...

    O2005
    M98 P2006 L10
    M30

    If you are not familiar with FANUC codes I will explain a bit more...

    O2005 - Program number of the main program - I don't know if OSP needs this

    M98 P2006 L10 - M98 Call subprogram, P2006 is the sub program number which is what used to be your main program - I am calling O2006, finally L10, calls the subprogram 10 times.

    M30 is the program end command.

    There are variations on the subprogram calling command even on FANUC controls. Some use the form of

    M98 P200610, in this case M98 is the same and the P address specifies two items..

    P2006 is the program number as before, but the trailing two digits specify the number of loops - 10 in this example.

    You will of course need to look at your OSP programming manual to get their version of the codes - but I have a hunch they will be very similar.

    Hope this helps!

    Chris

  6. #6
    Thanks for all the help here is what I did to make it work.

    %
    N1 V1=0
    N10(5/5/05)First line of the main program
    N11 V1=V1+1

    Main body of the program goes in here.

    N401 IF [V1 LT 10] N10
    N410 M2
    %

  7. #7
    Join Date
    Sep 2003
    Posts
    64
    You beat me to it but heres what we do

    at end of program
    V1=V1 +1
    [IF V1 LT V2]N0100
    V1=0

    SET PARAMETER V1 TO 0
    SET PARAMETER V2 TO 10


    If you wanted to shift your z over
    you would insert vzshz=vzshz-v3

    then set parameter v3 to amount of shift

  8. #8
    Join Date
    Mar 2005
    Posts
    110

    Looping a OSP 3000

    We have a number of Okumas with OSP 3000 controls and would like to bar feed them. I don't think the previous responses will work with the 3000. Could someone give me a hint how to do it?

    Thanks,
    Drake

  9. #9
    Join Date
    Jun 2005
    Posts
    194
    Dart, at the rear of the machine in the control panel you should find a document called "Data Management Card"... Take a look at it and see if you have an Option called: "User Task II"... If this option is active create the following program:

    Yourfilename.sdf (note that the created file is not a .min file)

    spselect: "YourFileName.min,,,q10
    end

    And that's all it takes..

    This is called a scheduled program and is called up just a little differently... In Auto Mode use your extend key F8 until you see the PSelect (I think F1 or F2) press the key and type * <write>... Your list of .SDF files will show just pick the file you want and follow the function key commands... It's been a few years since I've worked those keys so please refer to your Special Functions Manual to confirm key strokes...

    FYI: That file can run more than program if you need it to, as in:

    pselect: abc.min,,,Q10
    pselect: def.min,,,Q10
    End

    I hope this helps... If you can't find the info in your manual's let me know and I'll get it for you.
    JR Walcott
    Georgia Machine Tool Resources, LLC

  10. #10
    Join Date
    Mar 2005
    Posts
    110
    JR....I imagine that your post refers to newer Okumas. We haven't been able to figure out how to loop the older controls so we've just created long programs as our memory allows. The job we're running now let's us run 8 parts before we run out of memory. If you know a better way I'd appreciate hearing how.

  11. #11
    Join Date
    Jun 2005
    Posts
    194
    stude8,

    Have you tried to use your tape drive rather than your memory? Using both the tape drive and a simple hard wired counter connected to your feed hold or e-stop circuits you should be able to gain additional throughput. I'll do a little research tonight. If I come up with a better way, I'll let you know.

    Do you know if you have CMOS or Bubble Memory on this machine?

    JR
    JR Walcott
    Georgia Machine Tool Resources, LLC

  12. #12
    Join Date
    Mar 2005
    Posts
    110
    I'm not sure. Maybe someone else will know, but I think it's CMOS. We have exec tapes for all of them, but we've never had to reload them. A loop tape does make sense. When I get a free minute I can type up a dummy tape to try.
    We just loaded the same job on a twin spindle Wasino with an OTT control. That was easy. P(# of parts) plus the program #. Thanks for your help.

  13. #13
    Join Date
    Oct 2005
    Posts
    13
    This is what we use to machine 4 balls on our osp 3050 and the 7000.
    %
    N1 G50 S2000 (PN 1604)
    N2 T0303 G0 X900. Z900. M110 (SPL INDEXER)
    N3 BALL=4 (number of reps)
    N4 M58 (CHUCK LOW PR)
    N5 M84
    N6 M83
    N7 G0 X60. Z-15. C0
    N8 G94 G1 X36.9 Z-11. F4500.
    N9 G0 X100.
    N10 GOTO N14
    N11 T0303 G94 X900. Z900. M110 M58
    N12 M84
    N13 M83
    N14 G0 X100. Z-52.
    N15 G1 X78. F4500.
    N16 X67. Z-30.
    N17 X37. Z-11.
    N18 G4 F.5
    N19 G0 X900. Z900. M59 (CHUCK HIGH PR)
    N20 M109
    N21 M42
    N22 T0505 G97 S2500 M3 (SVJCR.4)
    N23 G0 G95 X10. Z3. M8
    N24 Z0.
    N25 G1 X-1.8 F.1
    N26 X-.8 F.2
    N27 G3 X13.5 Z-7.15 L7.15 F.05
    N28 G3 X8.7 Z-12.495 L7.15
    N29 G1 X8.4 F.07
    N30 X12.4 Z-14.495
    N35 G0 X25.
    N36 X900. Z900. M5
    N37 BALL=BALL- 1
    N38 IF [ BALL EQ 0 ] N40
    N39 GOTO N11
    N40 M110
    N41 C215.
    N42 M30
    %

  14. #14
    Join Date
    Jun 2005
    Posts
    194
    I was talking with a friend of mine about your problem. He suggested a BTR unit ( Behind The Tape Reader) with its own memory could take care of your problem. It would give you the capability of reading from: Machine Memory, BTR Memory or a PC. If you would like to discuss this with him in more detail let me know... My cell # is 678-983-3798..
    JR Walcott
    Georgia Machine Tool Resources, LLC

  15. #15
    Join Date
    Jan 2005
    Posts
    16
    Hi
    you still not find out hoe to loop the program
    please reply to me.I will send the just oneline simple program.
    thanks

  16. #16
    Join Date
    Jan 2005
    Posts
    16
    Hi
    do anyone know what is ADMAC ON NEW OKUMAS.
    THANKS

Similar Threads

  1. help with thread 1/2-8 2star on okuma osp7000l lathe
    By plast744 in forum G-Code Programing
    Replies: 5
    Last Post: 06-16-2006, 02:23 PM
  2. Prototrak lathe question
    By micit0001 in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 3
    Last Post: 03-03-2005, 02:04 AM
  3. HF lathe question
    By rs1300 in forum Uncategorised MetalWorking Machines
    Replies: 0
    Last Post: 01-19-2004, 06:22 PM
  4. 9x20 Lathe question
    By ccm in forum Uncategorised MetalWorking Machines
    Replies: 13
    Last Post: 09-25-2003, 11:52 PM
  5. Lathe question
    By cncadmin in forum Benchtop Machines
    Replies: 5
    Last Post: 07-01-2003, 06:20 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
  •