586,116 active members*
3,469 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > G-Code Programing > Assigning System Parameter value into a Custom Macro Variable on Fanuc OiMD
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2008
    Posts
    157

    Question Assigning System Parameter value into a Custom Macro Variable on Fanuc OiMD

    Is there a way to assign a system parameter value to a custom macro variable in Fanuc OiMD ?

    Just giving #101 = #3120 (example) does not work and raises an alarm on the machine. I know there is some method to do this so may be gurus out here could help

    Thanks a lot

  2. #2
    Join Date
    Feb 2006
    Posts
    1792
    It has to work. Use a defined system variable. Look into your manual and try to find out what #3120 is.

  3. #3
    Join Date
    May 2008
    Posts
    157
    Quote Originally Posted by sinha_nsit View Post
    It has to work. Use a defined system variable. Look into your manual and try to find out what #3120 is.
    I was just giving an example when i said 3120. There is a specific method to be followed to assign a system variable value to a common variable. This can be any system variable. I was wondering whether anyone here could throw some light on that.

  4. #4
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by yaji63 View Post
    I was just giving an example when i said 3120. There is a specific method to be followed to assign a system variable value to a common variable. This can be any system variable. I was wondering whether anyone here could throw some light on that.
    As Sinha suggests, your syntax is correct and must work. System variables fall broadly into two groups; read and write, and read only. I can't find a reference to #3120, does it actually exist for your machine. You haven't stated the alarm you're getting, accordingly, its difficult to know exactly what the issue is, but I'd be leaning towards the variable not being a defined system variable.

    #4001 is a system variable that is common for most, if not all, controls; it holds the value of the current model Group 1 "G" code. Try the following program and check the value of #100 when the program stops at M00. The resulting value in #100 should be 1.

    Regards,

    Bill

    %
    G91 G01 X0.0
    #100 = #4001
    M00
    M30
    %

  5. #5
    Join Date
    Mar 2003
    Posts
    2932
    Quote Originally Posted by yaji63 View Post
    Is there a way to assign a system parameter value to a custom macro variable in Fanuc OiMD ?

    Just giving #101 = #3120 (example) does not work and raises an alarm on the machine. I know there is some method to do this so may be gurus out here could help

    Thanks a lot
    I'm confused. The TITLE of your original post is "Is there a way to assign a system parameter value to a custom macro variable in Fanuc 0iMD?" Am I the only one who searched high and low to see what Parameter 3120 was? If I'd have known you wanted to assign a system variable to a custom macro variable...

  6. #6
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by dcoupar View Post
    I'm confused. The TITLE of your original post is "Is there a way to assign a system parameter value to a custom macro variable in Fanuc 0iMD?" Am I the only one who searched high and low to see what Parameter 3120 was? If I'd have known you wanted to assign a system variable to a custom macro variable...
    Hi Dave,
    No, I thought the same, but then the OP started writing about System Variables in post #3, and therefore considered the terminology in the title was incorrect.

    Regards,

    Bill

  7. #7
    Join Date
    May 2008
    Posts
    157

    Talking

    Hi All,

    Sorry for the confusion regarding the title. It should have been system variable and i mentioned it as system parameter.

    Confusion also seems to have been created by me giving an example of #3120. I was only giving an example.

    Anyways as everyone here said, my Syntax was correct but the # was not present on the specific machine. I was looking for values in #1032 - #1035. I could get these on one machine but on the other machine it raised an alarm stating it was out of range and i got confused. Finally i discovered that this range was not existing on that particular machine and i did have problem with my Syntax or method !

    Thanks again for chipping in with your answers and suggestions.

Similar Threads

  1. macro system variable for Z axis load?
    By fordav11 in forum Parametric Programing
    Replies: 9
    Last Post: 09-02-2023, 07:44 AM
  2. Fanuc 18i custom macro B
    By djmcdaris in forum Fanuc
    Replies: 18
    Last Post: 03-09-2021, 02:07 PM
  3. Fanuc custom Macro Question????
    By ixoxi999 in forum Fanuc
    Replies: 9
    Last Post: 12-08-2011, 11:31 AM
  4. Fanuc Custom Macro
    By acrisius00 in forum Coding
    Replies: 0
    Last Post: 02-11-2011, 06:02 PM
  5. How do I read the value of an F-type parameter into a macro variable?
    By Jan d. in forum Mazak, Mitsubishi, Mazatrol
    Replies: 24
    Last Post: 02-18-2009, 05:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •