Results 1 to 2 of 2

Thread: Variables on FANUC 16M PRO 3

  1. #1
    Registered
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    16
    Downloads
    0
    Uploads
    0

    Post Variables on FANUC 16M PRO 3

    Hey, so I'm tying to run the following on a Makino V55 (FANUC 16M PRO 3) Mill.

    Code:
    %
    O100 (zerochange)
    (X)#1=-0.01
    (Y)#2=0.02
    (Z)#3=0.03
    IF [#102 EQ 1] GOTO 10
    GOTO 20
    N10 #102 = 2
    GOTO 100
    
    N20 IF [#102 EQ 2] GOTO 30
    GOTO 50
    N30 #102=1
    GOTO 100
    N50 #102=1
    N100 IF [#102 EQ 1] GOTO 200
    IF [#102 EQ 2] GOTO 300
    
    
    N200 #4=-791.38+#1
    #5=-245.92+#2
    #6=-433.38+#3
    GOTO 500
    N300 #4=-791.38-#1
    #5=-245.92-#2
    #6=-433.38-#3
    GOTO 500
    
    N500 G90 G10 L2 P3 X#4 Y#5 Z#6
    %
    But seams as the problem is that vaiable #102 wont save untill next run.
    Isn't #100 block variables saved in memory after program end?

    It should set G56 workspace X, Y and Z offset by what I input in #1, #2 and #3. And at next run do it reversed.
    Anyway, I've tested and the code seams to be working, it's just that I guess the #102 variable is resetted at program stop...

    Anyone that has some clues?


  2. #2
    Registered
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    989
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by tonper View Post
    Hey, so I'm tying to run the following on a Makino V55 (FANUC 16M PRO 3) Mill.

    Code:
    %
    O100 (zerochange)
    (X)#1=-0.01
    (Y)#2=0.02
    (Z)#3=0.03
    IF [#102 EQ 1] GOTO 10
    GOTO 20
    N10 #102 = 2
    GOTO 100
    
    N20 IF [#102 EQ 2] GOTO 30
    GOTO 50
    N30 #102=1
    GOTO 100
    N50 #102=1
    N100 IF [#102 EQ 1] GOTO 200
    IF [#102 EQ 2] GOTO 300
    
    
    N200 #4=-791.38+#1
    #5=-245.92+#2
    #6=-433.38+#3
    GOTO 500
    N300 #4=-791.38-#1
    #5=-245.92-#2
    #6=-433.38-#3
    GOTO 500
    
    N500 G90 G10 L2 P3 X#4 Y#5 Z#6
    %
    But seams as the problem is that vaiable #102 wont save untill next run.
    Isn't #100 block variables saved in memory after program end?

    It should set G56 workspace X, Y and Z offset by what I input in #1, #2 and #3. And at next run do it reversed.
    Anyway, I've tested and the code seams to be working, it's just that I guess the #102 variable is resetted at program stop...

    Anyone that has some clues?
    Under normal conditions (Fanuc default parameters) common variables in the #100 through #149 (#199) range are cleared with M30 or Reset. However, clearing them can be prevented by setting bit 6 of parameter 6001 to 1. Local variables #1 though #33, can be retained in a similar manner by setting bit 7 of parameter 6001 to 1. It may be simpler just to use a common variable in the range #500 though #549 (#599). These are non volatile and retain their values even when power is withdrawn from the control.

    Regards,

    Bill


Similar Threads

  1. Fanuc 18iM, outputting variables
    By Mika M. in forum Fanuc
    Replies: 1
    Last Post: 05-24-2010, 01:11 AM
  2. System Variables Fanuc 11m
    By Molds0 in forum Fanuc
    Replies: 7
    Last Post: 03-02-2010, 10:00 AM
  3. Need Help!- Fanuc OM - M99 Clears Common Variables
    By ED209 in forum Fanuc
    Replies: 12
    Last Post: 07-11-2009, 02:31 AM
  4. Variables 500 to 531
    By viorel26 in forum Fanuc
    Replies: 0
    Last Post: 09-30-2007, 03:30 AM
  5. Seicos MYII control (Fanuc type) variables
    By pieface in forum General Metal Working Machines
    Replies: 3
    Last Post: 02-21-2006, 01:50 PM

Tags for this Thread

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.