Page 1 of 3 123 LastLast
Results 1 to 12 of 27

Thread: Variables and/or Subprograms - OSP5000L

  1. #1
    nlh
    nlh is offline
    Registered
    Join Date
    Oct 2005
    Location
    U.S.
    Posts
    340
    Downloads
    0
    Uploads
    0

    Variables and/or Subprograms - OSP5000L

    Can someone give me a few pointers on the proper or best way to use 2 different groups of offsets in a program for the same tools?

    I have a part that is double ended. I have a fixed stop in the chuck. The program needs to face a certain amount off the first side (also rough O.D. turn, finish O.D. turn, and thread) and then with an M0, turn the part around (against the fixed stop) and repeat the above process, only with a different group of offsets for the tools (Z offsets only).

    The only problem is, I'm not sure how to accomplish this with the 5000L control. On other controls I can simply assign another work coordinate (G54, G55, etc) and use a sub to repeat the program. From my little experience with this control, it doesn't use work coordinates, or does it? I have only been using it for a short while so I have no doubt I have overlooked something.

    What's the best way to achieve what I need to do without making a very long program (I don't have RS-232 comms so I have to punch it all in by hand!).

    Thanks


  2. #2
    Registered
    Join Date
    Mar 2008
    Location
    united states
    Posts
    76
    Downloads
    0
    Uploads
    0

    try using the work shift.

    I am fairly new to okuma also, but have done similiar type things using the workshift function. you can write in VZSHZ+(or -).... whatever the difference is between the front and back. using the shift, when it hits the m02 it will automatically reset to zero at the end of the program. I think it is way harder than a fanuc but it works. if you have a book with the machine it explains a little bit. I will check more into this but this should get you started.


  3. #3
    Registered
    Join Date
    Mar 2008
    Location
    united states
    Posts
    76
    Downloads
    0
    Uploads
    0

    O.K. slight correction

    sorry, you would put in VZSHZ=.... whatever the difference.

    that will shift it in the +- direction and you can run the back side, then when it hits m02 it zeroes out. if you need to shift it more than one time it would be;

    VZSHZ=VZSHZ+.... the difference again.

    ex if the first shift was 2.0"
    VZSHZ=VZSHZ+1." (it now equals 3.0")

    Or you could just do the math and tell it 3.0. but if you are doing multiple parts and parting off each then moving z0 the above method can run in a sub program. hope this helps. I am sure someone out there may be able to explain better, or have a better idea.


  4. #4
    nlh
    nlh is offline
    Registered
    Join Date
    Oct 2005
    Location
    U.S.
    Posts
    340
    Downloads
    0
    Uploads
    0
    Thanks cncclimber!

    That should be very helpful provided my early 5000L control supports this feature. I went over the programming manual last night but didn't come across this feature. I'm sure the book doesn't cover everything though.

    Next question, how do I do subprograms with this control? There were some commands in the book for program control (GOTO, IF, THEN, etc) within a program, but the procedure for subs wasn't that clear.

    Thanks again,
    Nate


  • #5
    Registered
    Join Date
    Aug 2008
    Location
    United States
    Posts
    62
    Downloads
    0
    Uploads
    0
    nlh,
    Here is just a quick example of how I use sub programs on Okuma's.

    Main Program

    G50S750
    N10 CALL O01
    M1
    N20 CALL O02
    M1
    N30 CALL O03
    M30

    Sub program

    O01
    G0G95G97X20.Z20.S500T0101M42M3M8
    Cutting Program
    G0X20.Z20.M9
    RTS
    O02
    G0G95G97X20.Z20.S500T0202M42M3M8
    Cutting Program
    G0X20.Z20.M9
    RTS
    O03
    G0G95G97X20.Z20.S500T0303M42M3M8
    Cutting Program
    G0X20.Z20.M9
    RTS


    Rick


  • #6
    nlh
    nlh is offline
    Registered
    Join Date
    Oct 2005
    Location
    U.S.
    Posts
    340
    Downloads
    0
    Uploads
    0
    Thanks Rick,

    The book was talking about a command, PSELECT, but I guess in this case I don't need that.

    Another quick question, can your example program be done all within one main program, or do you treat the main and sub as 2 different programs (ex. MAIN.MIN, SUB.MIN)?

    Nate


  • #7
    Registered
    Join Date
    Oct 2008
    Location
    Portugal
    Posts
    1
    Downloads
    0
    Uploads
    0
    I HAVE A PROBLEM IN COMMUNICATION FOR PC FOR MACHINE CONTROL OSP5000 OKUMA LC40Matc-L "
    SOMEONE WILL HELP ME ..
    Because we do not know if BE SET OF CONTROL, parameters or PC ..
    FICO I should ...
    Hugs and Stay right


  • #8
    nlh
    nlh is offline
    Registered
    Join Date
    Oct 2005
    Location
    U.S.
    Posts
    340
    Downloads
    0
    Uploads
    0
    Rick,

    What control do you use this format on? I have a green screen 5000L. I tried modifying my existing program to follow the format you have but all I get is an error (no sub program error). I have tried both putting the sub and main program together (in one program body) with no luck as well as splitting them up (2 seperate programs) again with no luck. I need to get this machine going this weekend in order to have parts to my customer by sometime Monday, no later than Tuesday.

    What am I doing wrong?

    Thanks


  • #9
    Registered
    Join Date
    Mar 2008
    Location
    united states
    Posts
    76
    Downloads
    0
    Uploads
    0

    try this

    It is a shot in the dark here, but make sure you have a RTS at the end of your sub programs. I haven't done much with subs but I seem to remember that caused me trouble once.


  • #10
    Registered
    Join Date
    Mar 2008
    Location
    united states
    Posts
    76
    Downloads
    0
    Uploads
    0
    not trying to sound condescending here, but make sure it is a "o"(oh) not a '0'(zero) at the sub program call. otherwise I would think it should work. like I said I am fairly new to the "okuma thing" also. kind of like the blind leading the blind here.


  • #11
    nlh
    nlh is offline
    Registered
    Join Date
    Oct 2005
    Location
    U.S.
    Posts
    340
    Downloads
    0
    Uploads
    0
    Yes, I have the RTS at the end of the sub. A couple of times I did make a mistake and put a 0 (zero) in place of the O. Guess my question at this point would really be if I have to treat the sub and main as 2 seperate programs entirely. Again, the book isn't very clear on this. There is a place in the manual where it mentions selecting both the main program and sub at the same time when in Auto mode. Tried this but still no luck. I'm sure it's something simple that I'm overlooking. The first time always has the steepest learning curve.

    Thanks for all the help


  • #12
    Registered
    Join Date
    Mar 2008
    Location
    united states
    Posts
    76
    Downloads
    0
    Uploads
    0
    I recently used the "schedule program" feature to run a part. because of the 2mb limit in program size I had to break the program into 6 individual ones(lots of surfacing) I used the schedule program and it ran each one in succession. that is where the PSELECT call comes into play. if your machine supports that it is pretty handy, you can run totally different parts in succession "lights out" with a barfeeder and stuff, I guess you could use that if that is all you can make work for now, until you can get the subs figured out. I haven't run subs in a really long time and never on my new machine but I have noticed there is a separate file extension labeled .SUB maybe you need to designate your subs that instead of .MIN . good luck I have to move some furniture now. let me know how it works out, good lesson for me also. Matt.


  • Page 1 of 3 123 LastLast

    Similar Threads

    1. Running subprograms from hdd
      By dtmtim in forum Haas Mills
      Replies: 18
      Last Post: 11-22-2010, 10:12 PM
    2. Need Help!- using variables and subprograms to drill in 4th axis
      By ggamalski in forum Fadal
      Replies: 3
      Last Post: 03-06-2009, 12:41 PM
    3. A question for subprograms
      By Hatebreeder in forum Fanuc
      Replies: 11
      Last Post: 07-18-2008, 12:08 AM
    4. does camware have a 'where used' for subprograms?
      By inflateable in forum Mazak, Mitsubishi, Mazatrol
      Replies: 3
      Last Post: 07-09-2008, 06:26 AM
    5. M97 Internal Subprograms?????
      By CAMCRASH in forum G-Code Programing
      Replies: 6
      Last Post: 03-24-2005, 01:10 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.