585,877 active members*
3,968 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > how to translate Fanuc G65 to okuma
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2007
    Posts
    314

    how to translate Fanuc G65 to okuma

    I'm a fanuc guy using a lot of custom macro. I got a new used okuma mill with osp 300 control and I'm trying to translate my fanuc macroB stuff to okuma. Here is a simple question : How to call a sub passing argument to local variable within the call. Example: in fanuc: G65 A100. B200. P9021 call the sub O9021 and in that sub local variable #1=100. and #2=200.

    I can do the same on okuma using common variable
    VC1=100.
    VC2=200.
    CALL O9021

    But i want to use local variable not common and not define common variable before call but pass argument to local variable of the sub.
    Also, some hint on the declaration of local variable will be very apreciate. It seem to be very more open than in fanuc

  2. #2
    Join Date
    Jun 2015
    Posts
    4154

    Re: how to translate Fanuc G65 to okuma

    hy samu okuma has also fanuc compatibility mode, but i don't think it covers macros

    new used okuma mill with osp 300
    if being taken care of, that machine will never get ' used ', but always in good condition there is a big difference between an used road vehicle, and a decades old okuma, as it may still hold tight

    translate my fanuc macroB stuff to okuma
    whatever you will need help with, i will try to help

    How to call a sub passing argument to local variable within the call.
    if i may ask, why do you wish for the argument be on the 'call' line ? i don't say that it should, or it shouldn't be there, as there are 3 standard methods :

    method 1 : predefinition
    ... variable = ...
    ... call o***

    method 2 : on-same-line definition
    ... call o*** variable = ...

    method 3 : on-same-line_break definition
    ... call o***
    ... $ variable = ...

    those methods can be spliten even futher with the hep of noex, so to cut down cycle time

    each method described above has it's own use :
    ... 1) standard aproach, as not to use a complicated call, or when variable definition needs to be done before 'call' block position, like initializatons that occur at program start, or before it
    ... 2) space save; i really see no other reason, as editin those require navigatin through the program
    ... 3) break is used for large arguments sets, thus for procedures that have a lot if inputs; far as i know, there is a limit of 50, or something, but is never reached, thus it is suffice

    VC1=100.
    VC2=200.
    CALL O9021
    CALL O9021 VC1=100 VC2=200

    please notice that there is no more '.' after the integer part; thus '.' is not a must to be present

    But i want to use local variable not common and not define common variable before call but pass argument to local variable of the sub.
    if i may ask, why do you want to use local variables ? again, i don't say that you shuold, or you shouldn't

    computing cost of local is > global/common(=V VC, etc), as they require creation time, while global are there as default, in auto mdi manual mode, defined at machine start-up; this cost just mentioned has an influence only on heavy math procedures, so most can simply pass-by unefected

    another thing with locals, is that they manifest different on p300 mill vs lathe controller, as their content may be, or not be, saved between nesting levels, and this can be tricky if you use general macros for both mill and lathe

    and last, but not leaast, is local name restriction list, thus you can not name your local variable however you wish, as it may interfere with a system only variable, and such cases are not always acompanied by an error; but your code may still work, as long as your code does not interfere with the system code that uses that same variable

    Also, some hint on the declaration of local variable will be very apreciate. It seem to be very more open than in fanuc
    CALL LV01=100 LV02=200
    ... or
    CALL LV=100 DIAM=200 RADS=234.56

    name masks for local are XXYY and XXY and XX :
    ... X : alpha chars A-Z
    ... Y : alphanumeric chars A-Z

    as a small conclusion, please be aware of this aaspects of local variables :
    ... computing cost time > global
    ... manifestation between nesting levels is not identical on mill and lathe
    ... name should not interfere with:
    ...... functions
    ...... boolean and comparison operators
    ...... extended address characters
    ...... reserved local variable words
    ...... mnemonic codes
    ...... some g-codes
    * as to avoit name 'interfere', i have used only LV00 LV01 LV02, etc thus i declared the local variables in a similar way with the array type of global ones; at the begining, just use whatever you like, and probably will work, but if your codes will need more and more variables, you will need a method to avoid conflicts

    please, feel free to ask whatever you wish / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. Droop Control Okuma (G65/G65)
    By JHPK in forum Okuma
    Replies: 2
    Last Post: 12-12-2019, 12:53 PM
  2. Doosan Fanuc 31i G65 Macro to G code cycle issue
    By gavintwopies in forum Daewoo/Doosan
    Replies: 5
    Last Post: 03-07-2018, 11:43 PM
  3. Translate, can't get to 0,0,0
    By tome9999 in forum BobCad-Cam
    Replies: 12
    Last Post: 03-22-2011, 12:27 AM
  4. translate
    By kendo in forum EdgeCam
    Replies: 1
    Last Post: 03-25-2009, 12:07 AM
  5. Fanuc 6MB G65 from MDI.
    By ckirchen in forum Fanuc
    Replies: 3
    Last Post: 02-28-2007, 11:30 AM

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
  •