Results 1 to 7 of 7

Thread: What does the following code do?

  1. #1
    Registered
    Join Date
    Jun 2008
    Location
    finland
    Posts
    12
    Downloads
    0
    Uploads
    0

    What does the following code do?

    What will the following code do, on a common Fanuc system?

    G96 S250 M3 (Constant surface speed, 250m/min, Spindle CW)
    G50 S3000 (Maximum spindle speed = 3000 rpm)
    G1 X[number] <== Will it move?

    The second line has changed the value of S register, yet G96 is a modal command, so does the controller read the speed from S register or some other internal memory location? Will there be X-axis movement or is G96 S[n] necessary after G50?

    Doing some reverse-engineering so more questions to come


  2. #2
    Registered
    Join Date
    Jul 2009
    Location
    MEXICO
    Posts
    72
    Downloads
    0
    Uploads
    0
    G50 S3000, You are "telling" the machine is the highest speed you can reach.
    Because G96 is a Constant Surface Speed and according to Diameter being cut
    As much as X axis is travelling to center of work piece, automatically spindle speed is increasing until it reaches maximum you have stated, this case 3000 RPM.
    X will move to whatever coordinate you writebut need an F.xxxx depends if you are working metric or Inch it will be advance per revolution.
    Ie. X-.050 F.005; Normally face cut, X will travel .050" past center at .005 thousands per revoulution.
    G96 you are commanding Vc Velocity of cut (Tangencial constant speed)
    G97 you are commanding RPM (Constant speed)
    Regards
    Robby


  3. #3
    Registered
    Join Date
    Jun 2008
    Location
    finland
    Posts
    12
    Downloads
    0
    Uploads
    0
    Thanks for the answer, but I wasn't quite able to explain myself clearly. Let's take another example.

    G96 S250 M3
    G0 X100. Z200.
    G50 X100. Z100. S3000
    X200. <== Is this line the same as G0 X200. Z200. or does G50 cancel out both G0 and Z200.?

    Likewise:

    G96 S250 M3
    G50 S3000
    G1 X100. Z100. F0.1 <== Will G96 S250 still be in effect, or does G50 S3000 cancel out S250?
    Last edited by myhäje; 02-10-2012 at 03:09 PM. Reason: typo


  4. #4
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    94
    Downloads
    0
    Uploads
    0
    G50 on many controllers sets a work coordinate system, this command
    would be in a different modal group than the G00 G01 etc.

    Therefore it would not cancel out the G00 in your example.


  • #5
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,668
    Downloads
    0
    Uploads
    0
    you need to read any common Fanuc manual. All of your basic questions are already answered in black & white.

    G50 sets the maximum speed RPM and also sets the coordinate system.
    G50 X100. Z100. S3000

    If you don't need to set a coordinate system you can omit the X and Z and only the max RPM is set
    G50 S3000

    They can be on separate lines.
    G50 X100. Z100.
    G50 S3000

    that is all it does. it is not affected or cancelled by anything else other than another G50 line.

    you really need to get the CNC Simulator program and play with it. write code and see what it does while referencing a Fanuc programming manual.
    www.cncsimulator.com

    Trying to reverse engineer something without having basic knowledge of the subject is futile.


  • #6
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    It may help if you tell us the exact model Fanuc control that you are using this on along with the G-code system you are using (A,B, or C). I typically like to set my max spindle speed before actually turning on the spindle.

    G96 does not change no matter what G-code system you are using. It is always CSF. G50 will change depending on the system you are using. If you are using system A then G50 will be your max spindle speed. If using B or C then G92 will be your max spindle speed setting.

    Stevo


  • #7
    Registered
    Join Date
    May 2007
    Location
    USA
    Posts
    939
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by myhäje View Post
    Thanks for the answer, but I wasn't quite able to explain myself clearly. Let's take another example.

    G96 S250 M3
    G0 X100. Z200.
    G50 X100. Z100. S3000
    X200. <== Is this line the same as G0 X200. Z200. or does G50 cancel out both G0 and Z200.?
    Don't you have a manual for the machine? It will explain how the different G-codes work together. G50 has nothing to do with G0, and will not affect it in any way. So the answer is "No, It will not cancel out the G0". I've only used G50 to set work coordinates a couple times and that was years ago. Therefore I am very hesitant to make any comments about it without first looking it up.

    However, I'll take a stab at it anyway, and let others correct me if I'm wrong.

    The G0 block is a positioning block. The G50 block isn't. It will set new work coordinates. The X200. is another positioning block....at a rapid move...since G0 is still in affect. However. the X200. won't be in the same position as it would have been if you had programmed it prior to the G50 block. Why? Because the G50 block changed the X-axis coordinate system.

    One thing I don't have the slightest idea about is whether or not the S3000 in the G50 block will clamp the maximum spindle speed, or if it will change the SFM to 3000. My guess would be the latter as I doubt you could do both in the same block. My guess is that it would require a separate G50 block to set the maximum RPM.




    Quote Originally Posted by myhäje View Post
    Likewise:

    G96 S250 M3
    G50 S3000
    G1 X100. Z100. F0.1 <== Will G96 S250 still be in effect, or does G50 S3000 cancel out S250?
    As previously stated, the G50 S3000 clamps maximum spindle speed at 3000 RPM. G96 S250 is still in affect. These two G-codes work together....in this example.


  • Similar Threads

    1. Replies: 4
      Last Post: 03-29-2011, 09:39 AM
    2. fanuc program code vs. Haas code
      By sixty8frbrd in forum Fanuc
      Replies: 6
      Last Post: 03-10-2011, 10:05 PM
    3. Converting Fanuc G code to Seimens 840D G code
      By Jasbinder in forum Siemens Sinumerik CNC controls
      Replies: 2
      Last Post: 02-20-2011, 11:02 AM
    4. Replies: 8
      Last Post: 12-15-2010, 03:32 PM
    5. looking for g code 3d from bobcadcam or simmilar for indexer lpt v5 with g code soft
      By troyswood in forum Ability Systems - LPT Indexer and G-Code
      Replies: 2
      Last Post: 12-24-2006, 10:21 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.