Results 1 to 8 of 8

Thread: Fanuc - NC code to read a parameter status??

  1. #1
    Registered
    Join Date
    Mar 2008
    Location
    australia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Fanuc - NC code to read a parameter status??

    Controllers: Fanuc 18iMB.
    I have a lot of programs that I would like to be able to run on 2 similar but not identical machines. Rather than writing 2 programs, is it possible to maybe set a parameter on machine A to "1" & machine B to "0" then have the code read the parameter status? If so, what parameter number? and how do I call it in a program?

    example of logic would be.

    If parameter *** = 1 goto block N100
    If parameter *** = 0 goto block N120

    I hope this makes sense to someone.
    Any suggestions would be greatly appreciated.
    Thank you.
    Kenn.


  2. #2
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1713
    Downloads
    0
    Uploads
    0
    G10 allows you to write parameters but I don't think there's any 'code' to read them.
    'checking the machine' type questions have come up a few times in the past. one solution is if the machines have macro you can pre-set a variable to a unique number for each machine then read that variable at the top of the program.


  3. #3
    Registered
    Join Date
    Mar 2008
    Location
    australia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Fanuc - NC code to read a parameter status??

    Hi Fordav11,

    I have never used macro, & I don't have a lot of programming experience. If it's available I will try to use it.
    Does that mean that the preset variable is stored permanently in the controller?
    Thank you
    Ken


  4. #4
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1713
    Downloads
    0
    Uploads
    0
    yes its permanent if you use the variable #'s that don't clear when the machine is powered off.
    to check the variable using variable #500....

    IF #500 =0 GOTO N100
    IF #500 =1 GOTO N120

    you can check for the existence of macro.
    in MDI type #100 = 1 EOB then press INSERT then start. if you don't get an alarm then you have Macro B.


  • #5
    Registered
    Join Date
    Mar 2008
    Location
    australia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Fanuc - NC code to read a parameter status??

    Thanks a lot Fordav11.
    Really appreciate your help. I will check it out.
    Ken


  • #6
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1713
    Downloads
    0
    Uploads
    0
    also check for macro A just in case....
    in MDI ....
    G65 H01 P#500 Q1 EOB then press INSERT then start


  • #7
    Registered
    Join Date
    Mar 2008
    Location
    australia
    Posts
    7
    Downloads
    0
    Uploads
    0

    Fanuc - NC code to read a parameter status??

    Just checked
    #100=1 EOB. no alarm. Looks like I got macro B. I will check for macro A later. Looks like I've got some work to do.
    Thanks again for your help.
    Ken


  • #8
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1713
    Downloads
    0
    Uploads
    0
    and cycle start too?
    you can find the macro variable list on the offset page then page right until it comes up.
    #100 should be 1 if it worked.


  • Similar Threads

    1. Need Help!- Read D-parameter in CNC-programme
      By Ingmar Trobäck in forum Fanuc
      Replies: 9
      Last Post: 07-26-2012, 08:18 AM
    2. Replies: 1
      Last Post: 11-19-2010, 09:05 AM
    3. can we read the current status of a parameter
      By sinha_nsit in forum Fanuc
      Replies: 12
      Last Post: 12-07-2009, 07:44 AM
    4. Replies: 1
      Last Post: 11-18-2009, 02:17 PM
    5. Need Help!- 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-17-2009, 11:47 PM

    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.