586,635 active members*
3,271 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > Syntax: General Questions
Results 1 to 2 of 2
  1. #1

    Syntax: General Questions

    Hello everyone, just started messing around with the Okumas at my job and have a few questions regrading syntax:

    After digging around old programs it seems I can make custom variables?
    ()
    XSTART=.100
    YSTART=.100
    ()
    G1 X=[XSTART] Y=[YSTART] F.010

    Is this the proper syntax to assign the X & Y values based on my custom variables ? What are the limitations when creating a custom variable, (character limits, certain letters you can’t use?..etc)

    IF Statements:
    NAT60
    G1 X=[XSTART+.010] F.010
    IF[XSTART LT .120] NAT60
    Do I need a GOTO after the condition? Does it search for NAT60 going down the program, and if not found starts at the beginning of the program?

    How can I assign a custom variable to a local variable?
    VC1 = [XSTART] Is this correct? Would this assign XSTART in #1 on my variable page on the controller?

    When using local variables, is there some sort of string function to pull up the value of a local variable, say during a M00? Something similar to
    SIEMENS msg(“XSTART“<<R1) *R1 in this instance would be the value of XSTART if using Siemens

    Thank you kindly, like I said just starting to mess with Okumas and want to have a good foundation to start off

  2. #2
    Join Date
    Jun 2015
    Posts
    4155

    Re: Syntax: General Questions

    hy vibi local variables format : ** or **^ or **^^, where *=A..Z and ^=*+1..9

    1st char to be <> N O P V, so to avoid confusion to block names, soubroutines, etc

    examples : XS=1, XST=-1.23 XSRT=45/25

    //

    make that code shorter
    NLOOP G1 X=XSRT F0.01 XSRT=XSRT+.01
    IF [ XSRT LT 123 ] NLOOP

    or even this

    NOEX G1 F0.01 G95
    NLOOP X=XSRT XSRT=XSRT+.01
    IF [ XSRT LT 123 ] NLOOP

    //

    these will perform the same :
    ... IF [ ] NLOOP
    ... IF [ ] GOTO NLOOP

    * will jump to 1st NLOOP adrress from begining of program, regardless of your IF position, thus search start is relative to program start, not to current executed block

    even more, the search is done in current nesting level only, good to know if you wish to stack soubroutines

    //

    avoid NAT60, not because is not working, but such NAT** are more used in okuma codes for restart at tool index, so many have a habit to use it only for that ... like a fanuc guy, that has a habit for g28, so to speack

    //

    to pass local ( vanish with reset, power off ) to global ( resists after reset, power cycle ) :

    XSTR=1
    VC1=
    XSTR

    or

    XSTR=1 VC1=XSTR

    or

    XSTR=1 VC[2]=XSTR

    thus VC1 and VC[1] target same content, as global variables are array type ... or whatever

    //

    there is a function to pass strings, and i have to search the examples, that shows it in the allarm zone

    please, feel free to ask anything, i am easy with coding / kindly

    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. Replies: 2
    Last Post: 05-24-2016, 07:29 PM
  2. CNC mill questions - thrust bearings, leadscrew mounting, general questions
    By tonofsteel in forum DIY CNC Router Table Machines
    Replies: 8
    Last Post: 02-03-2012, 10:42 PM
  3. Help-general questions
    By cparklaser in forum MetalWork Discussion
    Replies: 1
    Last Post: 09-28-2010, 01:50 AM
  4. general questions
    By donmoran in forum Canadian Club House
    Replies: 0
    Last Post: 02-05-2010, 02:25 AM
  5. General questions -help
    By CT6277 in forum Bridgeport / Hardinge Mills
    Replies: 0
    Last Post: 10-13-2009, 07:02 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
  •