548,600 active members*
1,868 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > Okuma subroutine to Fanuc ISO converting
Results 1 to 6 of 6
  1. #1
    Registered
    Join Date
    Dec 2009
    Posts
    708

    Smile Okuma subroutine to Fanuc ISO converting

    Hello folks
    i need a bit of help from somebody that can covert this subroutine to Fanuc ISO code programming as i really out of this.
    I work only on Fanuc controller and i do not know nothing about Okuma controllers or codes.
    thank you a lot

    OG116
    (G116 NULLPUNKT SCHLEPPEN BEI B-ACHSEN DREHUNG)
    (PIVOT DISTANZ SETZEN = HALBES TISCHMASS)
    (Eingabe G116 X Y Z B H P J)
    (X = Dif.alter neuer NP )
    (Y = dto.)
    (Z = dto.)
    (B = Tisch Sollposition abs.)
    (H = aktive NPV )
    (P = neue NPV )
    (J = STARTWINKEL )
    BBB=PB
    PB=BBB-PJ
    VNCOM[1]=1
    CHK1=VSPCD[14] AND #20H
    CHK2=VSPCD[15] AND #20H
    VC40=CHK1
    (IF[CHK2 EQ 0]NER06)
    IF[PC NE EMPTY]NA001
    IF[CHK1 EQ 0]NA002
    GOTO NER01
    NA001
    IF[CHK1 EQ 0]NER02
    NA002
    IF[PB EQ EMPTY]NER03
    IF[PH EQ EMPTY]NER04
    IF[PJ NE EMPTY]NB001
    PJ=0
    NB001
    PB1=PB
    PC1=PC
    IF[PP NE EMPTY]NA003
    PP=VACOD
    IF[PH EQ PP]NER05
    NA003
    BIN1=VOPRB[3] AND 66
    IF[BIN1 NE 0] NA004
    BIN2=VOPRB[4] AND 1
    IF[BIN2 NE 0] NA005
    PC1=PC*1000
    PB1=PB*1000
    GOTO NA004
    NA005
    PB1=PB*10000
    PC1=PC*10000
    NA004
    (VZOFB[PP]=VZOFB[PH])
    (VZOFC[PP]=VZOFC[PH]
    XN=VZOFX[PH]
    YN=VZOFY[PH]
    ZN=VZOFZ[PH]
    ZL=VPVDZ(pivot distance )
    XL=VPVDX
    XO=XN+PX
    YO=YN+PY
    ZO=ZN+PZ-ZL
    CALL OG32 XX=XO YY=YO
    LA=VS73 AA=VS74-PC1
    XA=LA*COS[AA]-XL
    YA=LA*SIN[AA]
    ZA=ZO
    CALL OG32 XX=ZA YY=XA
    LB=VS73 AB=VS74-PB1
    XB=LB*SIN[AB]
    YB=YA
    ZB=LB*COS[AB]
    PBJ=PB+PJ
    IF[PBJ LE 360]NB007
    PBJ=PBJ-360
    NB007
    IF[PBJ GT 0]NB008
    PBJ=PBJ+360
    NB008
    IF[CHK1 NE 32]NB009
    (C=PC) B=BBB
    GOTO NB010
    NB009
    (C=PC) B=BBB ( B=PBJ )
    NB010
    VZOFX[PP]=XB+XL
    VZOFY[PP]=YB
    VZOFZ[PP]=ZB+ZL
    G15H=PP
    ( VZOFB[PP]=BBB )
    VNCOM[1]=0
    GOTO NRTS
    NER01 MSG(X,Y,Z,B,H,P)
    M0
    GOTO NER01
    NER02 MSG(X,Y,Z,B,H,P)
    M0
    GOTO NER02
    NER03 MSG(B FEHLT)
    M0
    GOTO NER03
    NER04 MSG(H FEHLT)
    M0
    GOTO NER04
    NER05 MSG(P FEHLT)
    M0
    GOTO NER05
    NER06 MSG(B-INDEX ?)
    M0
    GOTO NER06
    NRTS RTS

  2. #2
    Registered
    Join Date
    Jul 2010
    Posts
    287

    Re: Okuma subroutine to Fanuc ISO converting

    At first glance, what you're asking for is not 100% possible. There are local variables in your program being referenced which would be set in the parent program and carried into this program. For example, BBB=BP. This is not an issue to set #100=#101, but effectively, #101 doesn't exist until it gets defined. So what BBB=PB means right now is #100=?. Supplementally, the OSP code specifies CALL OG32, however, program "OG32" is not included in this program, and therefore cannot be referenced.

    Furthermore, what you are asking for is technically possible, however, I am not sure anyone will be able to help you without spending a significant amount of time converting everything as well as getting the remaining information from you. There are some things which simply don't translate from OSP to Fanuc in my experience. A person would have to figure out how you're using the information, then figure out how to find that information on the Fanuc transplant machine.

    I would suggest trying to find someone local who can come look at the actual machine and usage and translate on site.

    I would imagine OEG would be the best source as Okuma sells machines with both OSP and Fanuc controls, whereas a distributor who sells Fanuc machines will most probably not have any knowledge of OSP language.

    Good luck.

  3. #3
    Registered
    Join Date
    Apr 2006
    Posts
    109

    Re: Okuma subroutine to Fanuc ISO converting

    can do it but not easy.

  4. #4
    Registered
    Join Date
    Dec 2009
    Posts
    708

    Re: Okuma subroutine to Fanuc ISO converting

    thank you for your answer
    is a subroutine for updating the g54 after teh pallet is rotated on a certain angle so the new G55 is read and stored in another place and become the new origin
    this subroutine is helping a lot the operator not to go and touch the piece for G55,G56,G57 etc ,takes a ot of time
    the ideea is just to see how i can conert it to Fanuc THAN,IF,EQUAL,etc
    i am just looking to see what it means the short words like:VNCOM,NER,NRTS,VZOFB,PBJ,etc
    thank you again for your support

  5. #5

    Join Date
    Feb 2020
    Posts
    2

    Re: Okuma subroutine to Fanuc ISO converting

    Hello. I use this subroutine on Okuma and it is very useful, but I need it also for Fanuc. Did somebody find a solution ? Thank you.

  6. #6
    Member
    Join Date
    Nov 2021
    Posts
    1

    Unhappy Re: Okuma subroutine to Fanuc ISO converting

    Hello,

    I need help to run this subroutine on Okuma. I've tried to save it as a .lib file and registrate it, but there is an error about missing subprogram.....
    There is also CALL OO32 in this subprogram....what does it do?
    I will attach some pictures tomorrow.

Similar Threads

  1. Replies: 10
    Last Post: 02-02-2019, 08:55 PM
  2. Replies: 3
    Last Post: 12-21-2015, 03:11 PM
  3. Fanuc Subroutine
    By Jerseycnc in forum G-Code Programing
    Replies: 4
    Last Post: 02-10-2014, 02:30 AM
  4. Star SV32 w/ Fanuc 16i-T not converting to Inches
    By pmrairokn in forum CNC Swiss Screw Machines
    Replies: 1
    Last Post: 05-19-2010, 04:42 PM

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
  •