fanuc incremental programming questions
Close
Login to Your Account
Results 1 to 15 of 15
  1. #1
    Join Date
    Jan 2014
    Location
    Ontario, Canada
    Posts
    49
    Post Thanks / Like
    Likes (Given)
    2
    Likes (Received)
    6

    Default fanuc incremental programming questions

    I have two older Takisawa lathes here. One is a Japanese made TC-20 with a Fanuc control. I'm not sure what model Fanuc it is, there are no markings on the control, other than Takisawa Fanuc. When I start it up it says DE01-05 if that means anything. The other is a Taiwan made EX-110 with a Fanuc 21i-T. I am trying to understand why the following program works as expected on the TC-20 but not on the EX-110. On the TC-20, the Z axis will feed 1 inch in the negative direction, then rapid 1 inch in the positive direction from whatever starting position I happen to be in. This is what I want. On the EX-110 the W-1.0 command does not seem to be taking effect in incremental mode, the distance to go display is always around 20". Can somebody enlighten me as to what could be going on with the EX-110?

    Code:
    % 
    O100 (TEST DRILL)
    T0101
    G99 G97 S1500 M3
    G0 X0.0
    G01 F0.010
    W-1.0
    G00
    W1.0
    M05
    %

  2. #2
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    3,557
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1396

    Default

    Hello lwm,
    Does the Z axis move the 20" if let do so?

    It could be that your control is set to either G Code System B, or C. Try a short program like the following, or execute the command via MDI and observe if a p/s010 alarm is raised.

    O1000
    G91
    M30
    %

    If no alarm, then either G Code System B, or C is set for your control via parameter. In this case, Absolute/Incremental Mode is selected via G90, G91 respectively. The G0 X0.0 command in your program example may work without G90 being programmed, because the Control defaults to G90 on start up.

    Regards,

    Bill

  3. Likes DouglasJRizzo liked this post
  4. #3
    Join Date
    Jun 2011
    Country
    UNITED STATES
    State/Province
    New Jersey
    Posts
    793
    Post Thanks / Like
    Likes (Given)
    460
    Likes (Received)
    301

    Default

    Bill is correct.
    The machine might be in G code system B.

  5. #4
    Join Date
    Jan 2014
    Location
    Ontario, Canada
    Posts
    49
    Post Thanks / Like
    Likes (Given)
    2
    Likes (Received)
    6

    Default

    Does the Z axis move the 20" if let do so?
    I believe it would, have never let it run into the chuck to find out for sure!


    It could be that your control is set to either G Code System B, or C. Try a short program like the following, or execute the command via MDI and observe if a p/s010 alarm is raised.

    O1000
    G91
    M30
    %
    I do get an alarm when I execute a G91, would have to verify the alarm code to be sure, but I know it says something about invalid G-code when i try to execute a G91.

  6. #5
    Join Date
    Jan 2017
    Country
    UNITED STATES
    State/Province
    Oregon
    Posts
    2,056
    Post Thanks / Like
    Likes (Given)
    395
    Likes (Received)
    1538

    Default

    Does it do the same thing in X if you program an incremental U?

  7. #6
    Join Date
    Sep 2008
    Country
    UNITED STATES
    State/Province
    Florida
    Posts
    356
    Post Thanks / Like
    Likes (Given)
    29
    Likes (Received)
    93

    Default

    In your program, you are trying to feed in what appears to be FPR mode, which is pretty normal for a lathe. Could your other lathe somehow be in IPM mode, in which at a feed of F.01 it would be moving so slowly that it would be easy to think it wasn't moving? Or could the chuck not be closed, and the machine requires that it is?

  8. #7
    Join Date
    Jan 2014
    Location
    Ontario, Canada
    Posts
    49
    Post Thanks / Like
    Likes (Given)
    2
    Likes (Received)
    6

    Default

    Quote Originally Posted by jancollc View Post
    Does it do the same thing in X if you program an incremental U?
    Interestingly enough, an incremental move in the X axis with the U command works just fine.

    Here is a link to a video showing the problem in the Z-axis. See if that gives any more clues.

  9. #8
    Join Date
    Jun 2012
    Location
    Michigan
    Posts
    4,364
    Post Thanks / Like
    Likes (Given)
    3935
    Likes (Received)
    2584

    Default

    What if you program it like this:

    G91 Z-1.0
    G90

  10. #9
    Join Date
    Jan 2014
    Location
    Ontario, Canada
    Posts
    49
    Post Thanks / Like
    Likes (Given)
    2
    Likes (Received)
    6

    Default

    I finally figured out what's happening here. My Z geometry offset for tool #1 is set to -23.2839. So in order to get my tool to move 1" in the negative direction, I need to do this.
    Code:
    O100 (TEST DRILL)
    T0101
    G99 G97 S1500 M3
    G0 X0.0
    G01 F0.010
    W22.2839
    G00
    W1.0
    M05
    Interestingly enough, the W1.0 then works as expected. Is there a parameter that could be changed to get rid of this behavior? I can't think of any good reason you would want to have it like this.

  11. #10
    Join Date
    Sep 2010
    Location
    india
    Posts
    1,190
    Post Thanks / Like
    Likes (Given)
    68
    Likes (Received)
    205

    Default

    I am under the impression that W should always work as intended, irrespective of offset values, in G-code system A.
    Is it original or emulated Fanuc?

  12. #11
    Join Date
    Jan 2017
    Country
    UNITED STATES
    State/Province
    Oregon
    Posts
    2,056
    Post Thanks / Like
    Likes (Given)
    395
    Likes (Received)
    1538

    Default

    Quote Originally Posted by lwm View Post
    I finally figured out what's happening here. My Z geometry offset for tool #1 is set to -23.2839. So in order to get my tool to move 1" in the negative direction, I need to do this.
    Code:
    O100 (TEST DRILL)
    T0101
    G99 G97 S1500 M3
    G0 X0.0
    G01 F0.010
    W22.2839
    G00
    W1.0
    M05
    Interestingly enough, the W1.0 then works as expected. Is there a parameter that could be changed to get rid of this behavior? I can't think of any good reason you would want to have it like this.
    That's weird, it's interpreting the W move as the position from abs Z0.0

    I assume if you positioned the machine at Z0.0 first, W-1.0 would work fine.

  13. #12
    Join Date
    Jan 2014
    Location
    Ontario, Canada
    Posts
    49
    Post Thanks / Like
    Likes (Given)
    2
    Likes (Received)
    6

    Default

    Quote Originally Posted by sinha View Post
    I am under the impression that W should always work as intended, irrespective of offset values, in G-code system A.
    Is it original or emulated Fanuc?
    I assume it is original, how do I check?

  14. #13
    Join Date
    Aug 2002
    Location
    West Unity, Ohio
    Posts
    24,717
    Post Thanks / Like
    Likes (Given)
    4837
    Likes (Received)
    7539

    Default

    Quote Originally Posted by lwm View Post
    I finally figured out what's happening here. My Z geometry offset for tool #1 is set to -23.2839. So in order to get my tool to move 1" in the negative direction, I need to do this.
    Code:
    O100 (TEST DRILL)
    T0101
    G99 G97 S1500 M3
    G0 X0.0
    G01 F0.010
    W22.2839
    G00
    W1.0
    M05
    Interestingly enough, the W1.0 then works as expected. Is there a parameter that could be changed to get rid of this behavior? I can't think of any good reason you would want to have it like this.
    INCR move is INCR.
    What you just described is an ABS move.


    FWIW - I understand thinking in circles...



    --------------------

    Think Snow Eh!
    Ox

  15. #14
    Join Date
    Jan 2017
    Country
    UNITED STATES
    State/Province
    Oregon
    Posts
    2,056
    Post Thanks / Like
    Likes (Given)
    395
    Likes (Received)
    1538

    Default

    It's applying the Z offset on the first Z axis move.

    My theory is it would do the same thing in X, if X was not positioned first:

    O100 (TEST DRILL)
    T0101
    G99 G97 S1500 M3
    G0 Z0.0
    G01 F0.010
    U1.0
    M05

    ^^^ I think the U1.0 move will incorporate the X offset, and be something other than X1.0

    I think that if Z is positioned first, W-1.0 would work:

    O100 (TEST DRILL)
    T0101
    G99 G97 S1500 M3
    G0 Z0.0
    G01 F0.010
    W-1.0
    M05

    ^^^ Z offset is already incorporated, the INC move would be Z-1.0.

    Or...

    O100 (TEST DRILL)
    T0100
    G99 G97 S1500 M3
    G0 X0.0
    G01 F0.010
    W-1.0
    M05

    ^^^Geometry offset is not called, INC move would be Z-1.0.

  16. #15
    Join Date
    Jan 2014
    Location
    Ontario, Canada
    Posts
    49
    Post Thanks / Like
    Likes (Given)
    2
    Likes (Received)
    6

    Default

    Well, I finally got a solution that *mostly* does what I want it to. Thanks to SK Sinha's book on custom Fanuc programming I figured out how to read the Z offset and use that in the calculation to figure out the W command.

    Code:
    O99 (TEST DRILL)
    T0101
    G99 G97 S1500 M3
    G0 X0.0 
    #507 - 0-#2801-1.0  (get Z geometry offset of tool #1)
    G01 W#507 F0.010
    W1.0
    G00
    W1.0
    M05
    I would have to get a lot fancier yet if I wanted to automatically calculate for any tool, but we almost always run this program on tool #1 so I think this'll work for now.


Tags for this Thread

Bookmarks

Posting Permissions

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