586,640 active members*
2,593 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > drilling canned cycles on a lathe for G-code system A
Page 1 of 2 12
Results 1 to 20 of 35
  1. #1
    Join Date
    Feb 2006
    Posts
    1792

    drilling canned cycles on a lathe for G-code system A

    I am preparing a write-up on these. Since my machine does not have live tooling, I cannot experiment on the machine for analyzing how the cycles behave. I have to depend on Fanuc manual only which is often not very clear. So, I have a few basic questions:

    1. M51 is given to be for C-axis index mode ON. Is the number 51 always same on all the machines or do we specify a desired number in some parameter?

    2. With M50 (C-axis index mode OFF), M03 would start the main spindle, and with M51, it would start the live spindle. Correct?

    3. M31 (for C-axis clamp) must necessarily be used with these cycles, even in repeated calls in subsequent blocks. Correct?

    4. The manual gives this syntax (apparently for G-code system A, since U, H and W are there) :
    G83 X(U)_ C(H)_ Z(W)_ R_ Q_ P_ F_ K_ M_;
    It further explains that
    Z_ is the distance from R-point to the bottom of the hole,
    R_ is the distance from the initial level to R-point level.
    Is it correct, with reference to G-code system A?
    If yes, what would be the effect of W_?
    I believe, the given ststements are correct in system B and C, with G91.
    Please clarify.
    Thanks in advance.

  2. #2
    Join Date
    Feb 2006
    Posts
    1792
    No answer yet.
    I am stuck.
    Somebody please spare five minutes for me.

  3. #3
    Join Date
    Jun 2008
    Posts
    1511
    Hey Sinha,

    1. M-codes like M51 are typically MTB dependant. Your typical M3, M1, M8 things of this sort are usually typically across most machines. The M51 will probably be the same if it is the same MTB. I have an M51 on one of my machines which is thru the spindle coolant on #4. Not sure what it is though.

    2. I am not sure. I ass u me that if you are using index modes you are trying to mill which then you are indexing the spindle and not running it at a constent. So I would think that if you want to index the main spindle you have to use M51--rotate---then M50

    3. Not always. I do not clamp my spindle when I am doing light work like bolt circle drilling. If I have to do some heavy milling then I will clamp the spindle. I can not speak to this 100% because I have only been using this on a few machines recently and on MY machines it is not needed to clamp the spindle all the time. It would suck if I had to because some of the parts I drill have 150+ holes on a BC and if I had to clamp and unlcamp at every rotation it would triple my machining time.

    4. Not 100% as I don't use system A. I would think there should be no difference in relation to the X,C,Z,R etc. The Z to W I think would be incremental in W. If you were to look at it in the standard it would be Z is the distance from your work zero to the bottom of the hole, not R plane to bottom. R is the distance from work zero. So R.1 would be .1" above work zero.

    As you know Sinha I have been wrong many times before so take my post with a grain of salt.

    Good luck,
    Stevo

  4. #4
    Join Date
    Feb 2006
    Posts
    1792
    Thanks Stevo for reply. My comments:
    Quote Originally Posted by stevo1 View Post
    Hey Sinha,

    1. M-codes like M51 are typically MTB dependant. Your typical M3, M1, M8 things of this sort are usually typically across most machines. The M51 will probably be the same if it is the same MTB. I have an M51 on one of my machines which is thru the spindle coolant on #4. Not sure what it is though.

    The operator's manual does mention that there is a parameter for spindle clamp M-code (M31 here), but it is silent on M code for spindle-indexing mode (M51/M50 here). So, I thought M51/M50 might be a standard codes like M00, M01 ...
    But, it must be parameter dependent which operator's manual does not mention. It must be there in parameter manual.


    2. I am not sure. I ass u me that if you are using index modes you are trying to mill which then you are indexing the spindle and not running it at a constent. So I would think that if you want to index the main spindle you have to use M51--rotate---then M50

    On your machine, how do you ensure that M03 starts the spindle of live tool, and not the main spindle? You must be commanding some M code such as M51.

    3. Not always. I do not clamp my spindle when I am doing light work like bolt circle drilling. If I have to do some heavy milling then I will clamp the spindle. I can not speak to this 100% because I have only been using this on a few machines recently and on MY machines it is not needed to clamp the spindle all the time. It would suck if I had to because some of the parts I drill have 150+ holes on a BC and if I had to clamp and unlcamp at every rotation it would triple my machining time.

    I see.

    4. Not 100% as I don't use system A. I would think there should be no difference in relation to the X,C,Z,R etc. The Z to W I think would be incremental in W. If you were to look at it in the standard it would be Z is the distance from your work zero to the bottom of the hole, not R plane to bottom. R is the distance from work zero. So R.1 would be .1" above work zero.

    I believe there is a mistake in the manual which treats both R and Z as incremental values, always. In fact, in system A, R should always be an absolute value. Z would be measured from origin, and W from R-point. This is what I believe, but I need confirmation.

    As you know Sinha I have been wrong many times before so take my post with a grain of salt.

    Good luck,
    Stevo

  5. #5
    Join Date
    Feb 2006
    Posts
    1792
    Will Angelw please join us.

  6. #6
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by sinha_nsit View Post

    1. M51 is given to be for C-axis index mode ON. Is the number 51 always same on all the machines or do we specify a desired number in some parameter?

    2. With M50 (C-axis index mode OFF), M03 would start the main spindle, and with M51, it would start the live spindle. Correct?

    3. M31 (for C-axis clamp) must necessarily be used with these cycles, even in repeated calls in subsequent blocks. Correct?

    4. The manual gives this syntax (apparently for G-code system A, since U, H and W are there) :
    G83 X(U)_ C(H)_ Z(W)_ R_ Q_ P_ F_ K_ M_;
    It further explains that
    Z_ is the distance from R-point to the bottom of the hole,
    R_ is the distance from the initial level to R-point level.
    Is it correct, with reference to G-code system A?
    If yes, what would be the effect of W_?
    I believe, the given ststements are correct in system B and C, with G91.
    Please clarify.
    Thanks in advance.
    Hi Sinha,

    1. M51 is given to be for C-axis index mode ON. Is the number 51 always same on all the machines or do we specify a desired number in some parameter?

    These M code can be set by parameter.

    2. With M50 (C-axis index mode OFF), M03 would start the main spindle, and with M51, it would start the live spindle. Correct?

    No. I've seen plenty of machines that use M13 to start the live tooling spindle and I've seen machines that use M03 in the way that you describe. This M code is OEM specific.

    3. M31 (for C-axis clamp) must necessarily be used with these cycles, even in repeated calls in subsequent blocks. Correct?

    No, not unless the PMC program was written in a way that insisted on the main spindle being clamped when drill type cycles were commanded. Generally, this is not the case. I've seen plenty of machines where drilling cycles can be called with the C axis not clamped.

    4. The manual gives this syntax (apparently for G-code system A, since U, H and W are there) :
    G83 X(U)_ C(H)_ Z(W)_ R_ Q_ P_ F_ K_ M_;

    I believe, the given ststements are correct in system B and C, with G91.


    i. Correct for the G91 in B and C
    ii. In system A, Z is an absolute value, W is an incremental distance from R
    ii. In system A, R is an absolute position

    Regards,

    Bill

  7. #7
    Join Date
    Feb 2006
    Posts
    1792
    Thanks a lot Angelw.
    You are not only knowledgeable, but helpful also.
    Thanks again.

  8. #8
    Join Date
    Mar 2003
    Posts
    2932
    According to the 0i-TC Operator's Manual, R is always incremental in the Series 16/18/160/180 format, but switchable by parameter 5102 bit 6 in the FS10/11 tape format.
    Attached Thumbnails Attached Thumbnails F0i-TC R in Canned Cycle.jpg  

  9. #9
    Join Date
    Sep 2010
    Posts
    1230
    Following is cut from the 5102 parameter listing of an 18 series manual from a new machine I installed last Thursday.

    RAB The R command for the drilling canned cycle in the Series 15 format is:
    0 : Regarded as an incremental command
    1 : Regarded as:
    An absolute command in the case of G code system A
    An absolute command in the case of G code system B or C when the
    G90 mode is specified.
    An incremental command in the case of G code system B or C when
    the G91 mode is specified.
    RDI The R command for the drilling canned cycle in the Series 15 format:
    0 : Is regarded as the specification of a radius
    1 : Follows the specification of a diameter/radius for the drilling axis

    Although I didn't actually look at this parameter setting on the machine, the R was regarded as an absolute value in the first program that was run. Clearly, this control must use Series 15 format. Of all the machines having late series controls I've installed, all have regarded the R as absolute, so perhaps this parameter is set to 1 as a default.

    Regards,

    Bill

  10. #10
    Join Date
    Feb 2006
    Posts
    1792
    Thanks Decoupar for additional information.
    Incidently, the term "tape format" has always confused me.
    How is it related to "control version"?
    The current versions are 0i, 0i Mate, 30i/31i/32i, and Power Mate i.
    Is it so that we select a particular tape format for these controls?
    How many tape formats are available and which one is commonly used? I can see two: 10/11 tape format and 16/18/160/180 tape format.
    I guess, these refer to the programming styles for the older control versions 10/11 and 16/18/160/180 respectively.

    My 0i Mate TC allows L_ repetition count up tp 9999 (as well as 7-digit specification of P_) in M98. This indicates 10/11 format. And I use two-block G71 (I have not tried one-block G71). This is not as per 10/11 format. Confused.

  11. #11
    Join Date
    Feb 2006
    Posts
    1792
    It so turns out that many things are parameter dependent, and nothing can be said with certainty. So, I have written the following, which is a part of my notes. If you have patience, please read it once, and point out mistakes/ambiguity, if any.

    Hole position data
    The location of the axis of the hole can be specified in both absolute and incremental coordinate systems. In front drilling, (X, C) are absolute coordinates, and (U, H) are corresponding incremental coordinates. In side drilling, (Z, C) and (W, H) are, respectively, absolute and incremental coordinates. The incremental coordinates are measured from the position of the tool at the time of calling the canned cycle. In front drilling, X/U are diameter values, if diameter programming is being used. In G-code system B and C, G90/G91 with X, C, and Z are used for absolute/incremental coordinates.

    Position of the bottom of the hole
    Z and X are absolute coordinates of the bottom of the hole, in front drilling and side drilling, respectively. The corresponding incremental coordinates are W and U, which are measured from the R-point level, and are always negative. In side drilling, X/U are diameter values, if diameter programming is being used. Therefore, for example, if the distance between the R-point and the bottom of the hole is 10 mm, U-20 (G91 X-20 in G-code system B and C) would need to be specified, in diameter programming.

    Position of R-point
    In G-code system B and C, depending on certain parameter settings, R would either always be incremental distance from the initial level (irrespective of G90/G91), or it can be either absolute coordinate or incremental distance from the initial level (depending on G90 and G91, respectively). In system A, which we are following, this is again parameter dependent; it can be either absolute coordinate or incremental distance from the initial level. Since parameter settings are going to vary on different machines, the best way would be to execute a program on the machine, in a safe working zone, to find out whether R is absolute or incremental. Another way would be to set the parameter 5102#6 to 0, which would force R to always be the incremental distance from initial level, in all the three G-code systems. The incremental distance would always be negative in this case.

    Another issue regarding its value, in side drilling (in front drilling, it is always the actual distance), is that whether it would be a diameter value (in diameter programming) or a radius value (even in diameter programming), depending on parameters. Therefore, either conduct an experiment on the machine to find out what it is, or set parameter 5102#7 to 0 which would always force it to be a radius value.

    Peck length
    This is specified in multiples of least input increment, without a decimal point. Thus, in millimeter mode, micron (0.001 mm) is used, and in inch mode, thou, which is thousandth part of an inch (i.e., 0.0001 inch), is used. For example, for a peck length of 5 mm, Q5000 is programmed in millimeter mode. In inch mode, if 0.2 inch peck length is desired, Q2000 is programmed. If Q is not commanded, the entire hole is made in a single peck, converting the peck drilling cycle into a simple drilling cycle.

    Dwell at the bottom of the hole
    If needed, e.g., for a better-machined bottom, a dwell can be specified in milliseconds without a decimal point.

    Feedrate
    It can be specified either in feed/minute or feed/revolution, depending on selection of feedrate mode (G98/G99, respectively, in G-code system A). The two feedrate forms are related as
    Feed in mm/min = Feed in mm/rev x RPM

    Repeat count
    Repeating a cycle in absolute coordinate mode (X, Z, and/or C) is meaningless since the specified drilling operation would be carried out at the same place repeatedly. However, in incremental coordinate mode (U, W, and/or H), a desired number of equi-spaced holes can be very conveniently made just by a single command.

    The repeat count is specified in K_, as a one-shot (non-modal) data, effective only in the block where it is commanded. Up to 9999 repeats can be specified. For a single execution, specify K1, or do not specify K at all. K0 is same as K1, if parameter 5102#4 is set to 0. When 5102#4 is set to 1, the specified modal drilling data is just stored without drilling being performed.

    M codes for C-axis clamp/unclamp
    After orienting the main spindle at the specified angle, it is necessary to hold it rigidly (as if in a vice) for drilling holes in the workpiece. In other words, the C-axis must be clamped. This is done through an M code, specified in parameter 5110, which applies a mechanical brake on the spindle. For example, if 31 (the usual choice) is stored in parameter 5110, M31 would clamp the spindle. The next number automatically becomes the code for spindle unclamp. Thus, in this example, M32 would release the brake. Of course, spindle unclamp at R-point, during final retraction, is a built-in feature of these cycles, obviating the need for explicitly commanding M32. In fact, this is the reason why M31 is needed in every subsequent block of these cycles (for making holes at other locations). Note that, for light machining applications, mechanical clamping of the spindle is not needed. In fact, M31 should not be commanded unless it is absolutely necessary, since it increases the cycle time.

    Final retraction after hole machining
    There is some difference in the way these cycles are commanded/behave in different G-code systems. The description here refers to system A. System-B and system-C cycles are similar to canned cycles on milling machines, with provision for selection between R-point retraction and initial level retraction with G99 and G98, respectively. In system A, the final retraction is always up to the initial level.

    Cancellation of canned cycles
    Apart from the cancellation code G80, which is the usual and recommended method, these cycles can also be cancelled by commanding a G code belonging to group 1 (G00, G01, G02 and G03).

  12. #12
    Join Date
    Mar 2011
    Posts
    0

    G83 for the first time

    I tried to use G83 for the first time today on a Fanuc controller 21i-TA on a Daewoo Lynx 210L lathe.I got it to work with this line G83 Z-2.5 Q1000 R.500 F.006
    Q=.100 peck
    R.500 1/2 inch infront of the part to let coolant in between pecks

    The only problem with doing it this way is it starts drilling .500 infront of the part.Is there anyway to get it to start drilling at Z0?
    Thanks Rich

  13. #13
    Join Date
    Aug 2009
    Posts
    684
    1/2" seems excessive. It is typical to retract to only about .05" above the face - this will be enough to allow swarf to escape. If you are having problems with drill overheating/swarf issues I would be inclined to decrease the pecking depth.

    DP

  14. #14
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by rnmmhunter View Post
    I tried to use G83 for the first time today on a Fanuc controller 21i-TA on a Daewoo Lynx 210L lathe.I got it to work with this line G83 Z-2.5 Q1000 R.500 F.006
    Q=.100 peck
    R.500 1/2 inch infront of the part to let coolant in between pecks

    The only problem with doing it this way is it starts drilling .500 infront of the part.Is there anyway to get it to start drilling at Z0?
    Thanks Rich
    From your example, it would seem that the R value is interpreted as an Absolute value. You can have the drill cycle feed start closer to Z Zero by specifying a smaller R value. For example, R .050 would have the drill rapid to Z0.050 and then start drilling. In practice its generally better to have the feed component of the cycle start off of the work surface because of possible material left by a preceding operation. Lets say, for what ever reason, 0.010 is left on the workpiece, if the tool moved in rapid to Z0.0 to start drilling, it would rapid into the surface of the work.

    Regards,

    Bill

  15. #15
    Join Date
    Mar 2011
    Posts
    0

    G83

    Then in between pecks it will only come out to Z.05 where I work they program everything by hand with a Z.500 infront of the part between pecks.
    That is why I am trying to get G83 to work. Thanks Rich

  16. #16
    Join Date
    Aug 2009
    Posts
    684
    A similar scenario has also recently been discussed and solved using parametric programming methods, if your control is capable: -

    http://www.cnczone.com/forums/fanuc/...then_peck.html

    DP

  17. #17
    Join Date
    Feb 2006
    Posts
    1792

    Re: drilling canned cycles on a lathe for G-code system A

    Quote Originally Posted by sinha_nsit View Post
    It so turns out that many things are parameter dependent, and nothing can be said with certainty. So, I have written the following, which is a part of my notes. If you have patience, please read it once, and point out mistakes/ambiguity, if any.

    Hole position data
    The location of the axis of the hole can be specified in both absolute and incremental coordinate systems. In front drilling, (X, C) are absolute coordinates, and (U, H) are corresponding incremental coordinates. In side drilling, (Z, C) and (W, H) are, respectively, absolute and incremental coordinates. The incremental coordinates are measured from the position of the tool at the time of calling the canned cycle. In front drilling, X/U are diameter values, if diameter programming is being used. In G-code system B and C, G90/G91 with X, C, and Z are used for absolute/incremental coordinates.

    Position of the bottom of the hole
    Z and X are absolute coordinates of the bottom of the hole, in front drilling and side drilling, respectively. The corresponding incremental coordinates are W and U, which are measured from the R-point level, and are always negative. In side drilling, X/U are diameter values, if diameter programming is being used. Therefore, for example, if the distance between the R-point and the bottom of the hole is 10 mm, U-20 (G91 X-20 in G-code system B and C) would need to be specified, in diameter programming.

    Position of R-point
    In G-code system B and C, depending on certain parameter settings, R would either always be incremental distance from the initial level (irrespective of G90/G91), or it can be either absolute coordinate or incremental distance from the initial level (depending on G90 and G91, respectively). In system A, which we are following, this is again parameter dependent; it can be either absolute coordinate or incremental distance from the initial level. Since parameter settings are going to vary on different machines, the best way would be to execute a program on the machine, in a safe working zone, to find out whether R is absolute or incremental. Another way would be to set the parameter 5102#6 to 0, which would force R to always be the incremental distance from initial level, in all the three G-code systems. The incremental distance would always be negative in this case.

    Another issue regarding its value, in side drilling (in front drilling, it is always the actual distance), is that whether it would be a diameter value (in diameter programming) or a radius value (even in diameter programming), depending on parameters. Therefore, either conduct an experiment on the machine to find out what it is, or set parameter 5102#7 to 0 which would always force it to be a radius value.

    Peck length
    This is specified in multiples of least input increment, without a decimal point. Thus, in millimeter mode, micron (0.001 mm) is used, and in inch mode, thou, which is thousandth part of an inch (i.e., 0.0001 inch), is used. For example, for a peck length of 5 mm, Q5000 is programmed in millimeter mode. In inch mode, if 0.2 inch peck length is desired, Q2000 is programmed. If Q is not commanded, the entire hole is made in a single peck, converting the peck drilling cycle into a simple drilling cycle.

    Dwell at the bottom of the hole
    If needed, e.g., for a better-machined bottom, a dwell can be specified in milliseconds without a decimal point.

    Feedrate
    It can be specified either in feed/minute or feed/revolution, depending on selection of feedrate mode (G98/G99, respectively, in G-code system A). The two feedrate forms are related as
    Feed in mm/min = Feed in mm/rev x RPM

    Repeat count
    Repeating a cycle in absolute coordinate mode (X, Z, and/or C) is meaningless since the specified drilling operation would be carried out at the same place repeatedly. However, in incremental coordinate mode (U, W, and/or H), a desired number of equi-spaced holes can be very conveniently made just by a single command.

    The repeat count is specified in K_, as a one-shot (non-modal) data, effective only in the block where it is commanded. Up to 9999 repeats can be specified. For a single execution, specify K1, or do not specify K at all. K0 is same as K1, if parameter 5102#4 is set to 0. When 5102#4 is set to 1, the specified modal drilling data is just stored without drilling being performed.

    M codes for C-axis clamp/unclamp
    After orienting the main spindle at the specified angle, it is necessary to hold it rigidly (as if in a vice) for drilling holes in the workpiece. In other words, the C-axis must be clamped. This is done through an M code, specified in parameter 5110, which applies a mechanical brake on the spindle. For example, if 31 (the usual choice) is stored in parameter 5110, M31 would clamp the spindle. The next number automatically becomes the code for spindle unclamp. Thus, in this example, M32 would release the brake. Of course, spindle unclamp at R-point, during final retraction, is a built-in feature of these cycles, obviating the need for explicitly commanding M32. In fact, this is the reason why M31 is needed in every subsequent block of these cycles (for making holes at other locations). Note that, for light machining applications, mechanical clamping of the spindle is not needed. In fact, M31 should not be commanded unless it is absolutely necessary, since it increases the cycle time.

    Final retraction after hole machining
    There is some difference in the way these cycles are commanded/behave in different G-code systems. The description here refers to system A. System-B and system-C cycles are similar to canned cycles on milling machines, with provision for selection between R-point retraction and initial level retraction with G99 and G98, respectively. In system A, the final retraction is always up to the initial level.

    Cancellation of canned cycles
    Apart from the cancellation code G80, which is the usual and recommended method, these cycles can also be cancelled by commanding a G code belonging to group 1 (G00, G01, G02 and G03).
    This is further expanded, thoroughly examined, and presented in the form of an e-book (US$0.99, all inclusive):
    CNC Programming Skills: Live Tool Drilling Cycles on a Fanuc Lathe - Kindle edition by S. K. Sinha. Professional & Technical Kindle eBooks @ Amazon.com.

  18. #18
    Join Date
    Aug 2011
    Posts
    2517

    Re: drilling canned cycles on a lathe for G-code system A

    you ask for people's help, write a book with the info you got for free then SELL it!
    WOW! you are lower than a used car salesman

  19. #19
    Join Date
    Feb 2006
    Posts
    1792

    Re: drilling canned cycles on a lathe for G-code system A

    Don't you think compilation of information obtained from various sources in a presentable form requires some effort.
    And $0.99 is virtually free. However, if any of the forum members wants it absolutely free, I can pm him the pdf.
    CNC is not my bread.
    Even though you use rather rough language for me, I respect you for your knowledge.

  20. #20
    Join Date
    Jun 2011
    Posts
    124
    Quote Originally Posted by fordav11 View Post
    you ask for people's help, write a book with the info you got for free then SELL it!
    WOW! you are lower than a used car salesman
    Lmfao!!!! 2x's!

Page 1 of 2 12

Similar Threads

  1. lathe canned cycles
    By dcutler35 in forum Mastercam
    Replies: 15
    Last Post: 11-18-2014, 04:07 PM
  2. lathe canned cycles
    By camtd in forum NCPlot G-Code editor / backplotter
    Replies: 1
    Last Post: 03-16-2011, 05:04 AM
  3. lathe canned cycles
    By camtd in forum GibbsCAM
    Replies: 1
    Last Post: 04-07-2009, 01:07 AM
  4. T-word in lathe canned cycles
    By sinha_nsit in forum Fanuc
    Replies: 2
    Last Post: 11-22-2008, 05:33 AM
  5. canned lathe cycles
    By PETE1968 in forum Mastercam
    Replies: 3
    Last Post: 05-27-2007, 12:44 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
  •