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