587,761 active members*
3,047 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > Automatically restart of program OSP5020
Results 1 to 17 of 17
  1. #1
    Join Date
    Jan 2009
    Posts
    40

    Automatically restart of program OSP5020

    Hello everybody!
    Im new at the forum which I find very interesting. Im from Sweden and therefore maybe all is not grammatically correct, hope you can live whit that.

    I have a question about my lathe, a LB15II. How can I make the program to restart after end of program? I have made a barpuller and I dont want to press the start button every time. Im sure there is a easy way but I have not found it altough I have read in the manuals . It would be great to set the partcounter and just collect the parts from the chipcontainer. Greateful for help! Thanks.
    / Samuel

  2. #2
    Join Date
    Dec 2008
    Posts
    3136
    Mills have 2 methods of continuous cycling
    I am sure that lathes have the same functionality

    Before the M2/M30 insert a "GOTO NSTART" and place a "NSTART" on the 1st line of code would make the program continuous, but a parts count method would need to be added before that GOTO code, say "VC1=VC1+1 ". Parts count is normally advanced when a M2/M30 is executed. The 1 can be replaced with any number like if parting off a number of washers. VC1 is a user variable, most Okumas have 1 to 128 available for program use
    Code:
    NSTART G0 G40 G80 G90
    ...
    VC1=VC1+1
    GOTO NSTART
    M2 or M30
    or use a schedule program .SSB
    example .SSB program
    Code:
    ( SCHEDULE PROGRAM )
    N1 PSELECT <yourprogram1.min> Q99
    N2 PSELECT <yourprogram2.min> Q15
    N3 PSELECT <yourprogram3.min> Q25
    N4 GOTO N1  ( this also makes the program continuous )
    N5 END
    -This would load the program and then cycle it 99 times
    then load #2 program and run it 15 times and so on.

    PS. Welcome to the forum

  3. #3
    Join Date
    Dec 2008
    Posts
    79
    Superman is right

    but on a lathe you only use V1 instead of VC1

  4. #4
    Join Date
    Jul 2009
    Posts
    6
    And if you want 250 pieces you could throw in a

    "IF [V16 GT V17] GOTO N0002"

    sorry this is a cut and paste from one of my programs...
    use any 'V' number you want, and an 'NSTART' instead of an "N0002"
    set your V'16' to what ever you want for number of parts and let it run!
    ( with a 12 foot autoload bar feed - 24 hrs a day!)
    Running Okuma: Cadet Mate x2, MC4VAE, Crown-BB, MC40VA-HS

  5. #5
    Join Date
    Apr 2006
    Posts
    825
    don't forget that line numbers can only be FOUR (4) alphanumerics long after the "N"
    So NSTART will NOT work as a valid line number.
    I usually use NSTRT instead.

    Isn't it nice to see how the Mills and the Lathe programming teams got together and standardized the coding between the controllers... yep... VC's on the Mills and V's on the Lathes... real consistent guys!

  6. #6
    Join Date
    Jul 2009
    Posts
    6
    Yah -
    Maybe not real consistent... but they are still fairly amazing controls! I've written a lathe program that has very few hard coded X and Z values in it. Used for parting and chamfering steel tubing for sleeves.. Variables for length, OD, Wall thickness, and amount of chamfer. I needed 1000 of 1 length, and 1000 of another, I just changed a variable in the parameters, and never stopped running!
    Running Okuma: Cadet Mate x2, MC4VAE, Crown-BB, MC40VA-HS

  7. #7
    Join Date
    Apr 2006
    Posts
    825
    Quote Originally Posted by ssmw View Post
    Yah -
    Maybe not real consistent... but they are still fairly amazing controls! I've written a lathe program that has very few hard coded X and Z values in it. Used for parting and chamfering steel tubing for sleeves.. Variables for length, OD, Wall thickness, and amount of chamfer. I needed 1000 of 1 length, and 1000 of another, I just changed a variable in the parameters, and never stopped running!
    I so totally agree!
    I have written many programs for generic parts that just vary only in size, but have the same profile, on both Lathes and Mills.
    The Okuma User Task2 is a very powerfull and relativley straight forward programming method, once you get the idea of how things are done
    I must admit, I do love the Okuma controls (and their machines do not break down ery often either... not like our Mazaks... Damn Integrex 400 is out for the count for another 4-6weeks, again).

    Cheers
    Brian.

  8. #8
    Join Date
    Jan 2007
    Posts
    22
    How we do this on our lathes is to have a N1 at the start of the program and /GOTO N1 before the M2 at the end. And use the work counters to stop it when a counts up. Having a / infront of the GOTO puts it on block delete, so when the operator wants to stop the program to change a tip or whatever he just puts block delete on and it'll run thru to the M2 and stop.

  9. #9
    Join Date
    Jan 2009
    Posts
    40
    Thanks for the replies!
    I have tried the ways you described but I dont get the program to repeat a certain number of times, it just keeps running. What can I have done wrong?
    I didnt figure out how to write a schedule program. And another thing that complicates things is thats my control is in Swedish, not always very accurate translated. Will try more after the weekend, tomorrow we will tranform the workshop to a partyplace, not much beats a Swedish pig-party!:cheers:

  10. #10
    Join Date
    Apr 2006
    Posts
    825
    at the start of the program is... (Ignore the comments if you like)

    NSTRT G0 X800 Z800 (GO HOME)
    N0100 G50 S2500 (MAX RPM FOR THIS JOB)
    N0102 BLAH BLAH BLAH
    .
    .
    .
    YOUR PROGRAM HERE
    .
    .
    .

    (END OF PROGRAM CODE HERE)
    NEND G0 X800 Z800
    N0900 V10=V10+1 (INCREMENT BAR PART COUNTER BY 1)
    N0902 V12=V12+1 (INCREMENT TOTAL PARTS MADE COUNTER BY 1)
    /GOTO N0908 (TURN OFF BLOCK DELETE TO JUMP THE CONTINUOUS SEQUENCE IF YOU WANT, HAVING BLOCK DELETE ON WILL IGNORE THIS LINE)
    N0904 IF [V10 LE V11] NSTRT (JUMP TO LINE STARTING WITH "NSTRT" IF YOU HAVE MADE LESS PARTS THAN ALLOWED FOR THE LENGTH OF THE BAR)
    N0906 V10=0 (RESET COUNTER FOR NUMBER OF PARTS PER BAR LENGTH)
    N0908 M9
    N0910 M5
    N0912 M2

    Hope this helps
    Brian.

  11. #11
    Join Date
    Apr 2009
    Posts
    1262
    It is NOT a good idea to use a GOTO command to repeat the program. The Okuma keys off of the M02 for many many things. For example:

    Alarm C will not ever stop the machine.
    Load monitor tool wear can't stop the machine.
    Cycle time can not be calculated correctly on graphics page.
    MacMan can not count parts or calculate cycle times properly.
    Parts counters will not count properly.
    Barfeeder interface does not work right since it can't use cycle stop and
    Cycle stop switch will be innefective.

    I STRONGLY suggest using the Schedule Program. It's easier to write, has an automatic counter and fixes all of the above problems.

    See Superman's example - it's as easy as 2 lines of code. Just use SP SELECT instead of PROGRAM SELECT when you call up the program to run and it will give you a list of SDF files to choose from instead of MIN files.

    This is the way the machine was designed to be used and it works well and it's simple. Think of it as a master schedule program that is able to call main (MIN) programs.

    Good luck.

  12. #12
    Join Date
    Apr 2006
    Posts
    825
    Just goes to show... On the Okuma machines that there is many different ways of skinning the proverbial cat!
    The use of a schedule program is certainly the BEST way of doing this process, for all the reasons stated by Okumawiz.
    Thanks for pointing those out... has been quite some time since I actually ran a machine and had forgotten about those types of reasons.
    Cheers
    Brian.

  13. #13
    Join Date
    Dec 2008
    Posts
    3136
    Quote Originally Posted by OkumaWiz View Post
    It is NOT a good idea to use a GOTO command to repeat the program.
    I beg to differ. ( but I do stress, machines still need monitoring [no unmanned running] )

    -> It is a quick method to set a program continuous, especially if you have 2 or more machines to monitor.
    -> Important alarm C's time-out to B alarms ( eg lub level )
    -> Parts count is taken care of by the use of variables ( anyway, parts count is useless if parting off say 3 washers in 1 cycle)
    -> Cycle time is already proved off in the first couple of parts ( you have actually reduced the "idle machine time"
    -> Cycle stop ( use a M1 at the end of each too and at the end of program - flick ON opt stop- program stops )
    -> MacMan- yes, this is a loss to management, but it surely would be overlooked at the end of the run when comparing parts made Vs time taken from setup to end

    Steve

  14. #14
    Join Date
    Apr 2006
    Posts
    825
    To get an accurate idea of "Cycle Time" you should be taking into account ALL aspects of making the part. This means also all the down time between program runs.
    If you were to say your cycle time is based solely on program run time, then you are going to always lose time over the whole process.
    If you have to measure parts before removal from the machine, then this time must be included in the cycle time.
    If management rely solely on times from MacMan then they are losing this OTHER time that is necessary in the production of the part.
    For example, if your cycle time is 10 minutes but you take 5 minutes to inspect every 2nd part, then your real cycle time is 12.5minutes, not the 10minutes that the program runs for.
    If you were making 1000 parts, then the time difference would be substantial over the entire job, do you want to pay for that time, or get the customer to pay for it (as they should!)?
    Therefore... getting back on track, the use of MacMan is not really that accurate for ANY reason, it really is only a guide on what program has run and when it ran.
    Like Superman stated, part counting is best handled by the programmer using a "variable" as no machine counter is designed to handle 3 parts per run, it will only count 1 run being 1 part...
    Does this rambling make sense?
    Cheers
    Brian.

  15. #15
    Join Date
    Apr 2009
    Posts
    1262

    Wink

    Guys Guys Guys!

    My post was meant to help clarify how the machine is designed to work. Everything I mentioned will work better if done using the M2 - that's how it's designed to work. As all of us know, there are three ways to do anything on an Okuma, so I was just trying to give some food for thought as to why you may want to get to know Schedule Programming. It is a much more powerful tool that allows multiple programs to be called up automatically and still keeps the control from getting confused on times, counts etc., when keying off the M2. I admit that we've been trying for years to get Okuma to allow us to adjust the count number per cycle with no success, but they do have a system variable that allows you to adjust the number in the NC Work Counter, so maybe that's why we've been ignored.

    Anyway I know vesene will do it however he wants to and appreciates the increased knowledge we all have added.

    Happy GOTO-ing er I mean Scheduling! (yes I've done both) ;-)

  16. #16
    Join Date
    Jan 2009
    Posts
    40
    Hi.

    I finaly got it working. I did as you suggested whit a little modification. I first tried as this example:

    ( SCHEDULE PROGRAM )
    N1 PSELECT <yourprogram1.min> Q99
    N2 PSELECT <yourprogram2.min> Q15
    N3 PSELECT <yourprogram3.min> Q25
    N4 GOTO N1 ( this also makes the program continuous )
    N5 END

    But the machine kept going one piece of no1, one piece of no2, one piece of no3 and then started on no1 again. It wouldnt stop after the specified no of pieces was made. (I chose lower numbers).

    My final program looked like this:


    N1 PSELECT yourprogram1.min ,,,Q99
    N2 PSELECT yourprogram2.min ,,,Q15
    N3 PSELECT yourprogram3.min ,,,Q25
    N4 GOTO N1
    N5 END

    That worked just fine!
    Thank you all very much for your help, hope I get some practical use for this knowledge soon.

    Greets

    Samuel

  17. #17
    Join Date
    Apr 2006
    Posts
    825
    Congrats! Another person has learnt something interesting about their machine!
    Yay for the forum.

Similar Threads

  1. Program restart
    By johnd in forum Mach Mill
    Replies: 3
    Last Post: 03-02-2009, 03:32 AM
  2. M2: program restart eia/iso
    By apylus444 in forum Mazak, Mitsubishi, Mazatrol
    Replies: 5
    Last Post: 10-07-2008, 01:07 AM
  3. Program restart issues HTC400 M-Plus
    By MJMark in forum Mazak, Mitsubishi, Mazatrol
    Replies: 3
    Last Post: 09-16-2008, 04:36 PM
  4. Mid program restart
    By HuFlungDung in forum Haas Mills
    Replies: 4
    Last Post: 06-26-2007, 10:32 PM
  5. Restart of integrex eia program with dual turrets
    By Bobc007 in forum Mazak, Mitsubishi, Mazatrol
    Replies: 3
    Last Post: 04-02-2007, 01:43 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
  •