Need expert help debugging trochoidal milling macro, paging Sinha or similar. - Page 3
Close
Login to Your Account
Page 3 of 3 FirstFirst 123
Results 41 to 57 of 57
  1. #41
    Join Date
    Nov 2021
    Country
    UNITED STATES
    State/Province
    New York
    Posts
    17
    Post Thanks / Like

    Default

    Quote Originally Posted by dandrummerman21 View Post
    I ran the following code:

    %
    O7778(21 G4'S)
    #3001=0
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    #100=#3001
    M0
    M30
    O7779(SUB WITH 21 G4'S)
    #3001=0
    M98P7780
    #100=#3001
    M0
    M30
    O7780(21 G4 SUB)
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    G4
    M99
    O7781( G31)
    #3001=0
    G31
    #100=#3001
    M0
    M30


    Results:


    O7778 (21 G4'S) : 160ms
    O7779 (21 G4'S CALLED AS A SUB: 176ms
    O7781 (G31) : 16ms

    I also ran 7781 with 21 G31's, it took 496ms.


    So, G31 is SLOWER than a single G4. But a single G31 is faster than a bunch of G4's. I am not sure 21 G4's is enough to disable any unwanted effects of the extra lookahead and smoothing of g5.1. I wouldn't trust it 100%


    Edit: a few other things i tried.


    21 M1's (optional stop with the switch off): 3040ms
    21 G53's : 1024ms
    1 G53: 64ms


    G31 is faster than G53
    Sweet, now reduce the amounts of G4's until it messes up. You then have found your "limit" so to speak.

  2. #42
    Join Date
    Jan 2014
    Country
    UNITED STATES
    State/Province
    Washington
    Posts
    5,787
    Post Thanks / Like
    Likes (Given)
    1010
    Likes (Received)
    3249

    Default

    Quote Originally Posted by RedBarn Research View Post
    Sweet, now reduce the amounts of G4's until it messes up. You then have found your "limit" so to speak.
    Uhhhh, that program won’t “mess up” even with just one G4. All it is doing is illustrating that your claim that a string of G4 commands executes more quickly than a G31 is false.

  3. #43
    Join Date
    Feb 2008
    Location
    MI, USA
    Posts
    1,069
    Post Thanks / Like
    Likes (Given)
    75
    Likes (Received)
    442

    Default

    Quote Originally Posted by RedBarn Research View Post
    Sweet, now reduce the amounts of G4's until it messes up. You then have found your "limit" so to speak.
    Yeah, but you'd have to do that with every macro you write that looks at machine position in high speed lookahead mode.

    I wouldn't be surprised if the quantity of garbage codes would be higher on his 21i control (16i>21i)

    Can you post your example?


    Also, apparently the number of blocks g5.1q1 looks ahead depends on your option. I also saw that on a 21i, it's called "advanced preview control", where on the 16i/18i, it's "AI contour control" or "AI nano contour control"

    "For a cutting feed command in the feed per minute mode, linear
    acceleration/deceleration can be applied before interpolation, that is, for
    the specified feedrate by reading up to 40 blocks (in the AI contour control
    mode) or 180 blocks (in the AI nano contour control mode) in advance."

    The machine I tested on has AI nano.

  4. #44
    Join Date
    Oct 2007
    Country
    SPAIN
    Posts
    5,681
    Post Thanks / Like
    Likes (Given)
    1533
    Likes (Received)
    833

    Default

    Quote Originally Posted by angelw View Post
    Your comments smacks of "All Hat and No Cattle", or "All Gong and No Dinner".

    The better question to ask is:
    Have YOU tried this with a Fanuc Control, the subject control of this Thread?

    Unless Fanuc have changed things in recent times and I tend to keep abreast of all things Fanuc in my line of work, Fanuc doesn't have an M97 function. Certainly M97 doesn't exist on the OP's Fanuc 21i Control.

    What Fanuc has, which is similar in function, is the setting of parameter bit #6005.0 to 1 to allow a Local Subprogram to be called with a Sequence Number and is called with the following syntax:

    M98 Q_ _ _ _

    Where:
    Q_ _ _ _ = The Sequence Number for the program to branch to within the current program.

    However, it goes a little further than that. By using the following syntax and example:

    M98 P1000 Q10

    External Subprogram O1000 will be called and execution within that program will commence at Sequence Number N10.

    This functionality was first introduced in Fanuc Controls from FS16i.

    So yeah, I know my way around how to call a Local Subprogram with Fanuc Controls that have that function.

    With regards to User Macro Programming, I know enough to know what works well and what doesn't.

    G31 goes back to at least the FS0-A, circa mid 80's. As mentioned earlier, Local Subprogram call via Sequence Number wasn't introduced until by Fanuc until the FS16i Model A, circa late 90's.
    This works an absolute treat - "internal subs".

  5. #45
    Join Date
    Nov 2021
    Country
    UNITED STATES
    State/Province
    New York
    Posts
    17
    Post Thanks / Like

    Default

    Quote Originally Posted by barbter View Post
    This works an absolute treat - "internal subs".
    Ah from Spain I see. Have you heard of Ossa motorcycles?

  6. #46
    Join Date
    Oct 2007
    Country
    SPAIN
    Posts
    5,681
    Post Thanks / Like
    Likes (Given)
    1533
    Likes (Received)
    833

    Default

    Quote Originally Posted by RedBarn Research View Post
    Ah from Spain I see. Have you heard of Ossa motorcycles?
    Yup. And GasGas, Bultaco, Montessa, Sanglas....
    I had a Mick Andrews Ossa replica trials bike back in the day....
    (BTW, I'm Spanglish )

  7. #47
    Join Date
    Nov 2021
    Country
    UNITED STATES
    State/Province
    New York
    Posts
    17
    Post Thanks / Like

    Default

    Quote Originally Posted by barbter View Post
    Yup. And GasGas, Bultaco, Montessa, Sanglas....
    I had a Mick Andrews Ossa replica trials bike back in the day....
    (BTW, I'm Spanglish )
    Our barn has about 40 Ossa's total. Working on a Desert Phantom now. I know Mick and his wife personally

  8. Likes barbter liked this post
  9. #48
    Join Date
    Nov 2021
    Country
    UNITED STATES
    State/Province
    New York
    Posts
    17
    Post Thanks / Like

    Default

    Quote Originally Posted by dandrummerman21 View Post
    Yeah, but you'd have to do that with every macro you write that looks at machine position in high speed lookahead mode.

    I wouldn't be surprised if the quantity of garbage codes would be higher on his 21i control (16i>21i)

    Can you post your example?


    Also, apparently the number of blocks g5.1q1 looks ahead depends on your option. I also saw that on a 21i, it's called "advanced preview control", where on the 16i/18i, it's "AI contour control" or "AI nano contour control"

    "For a cutting feed command in the feed per minute mode, linear
    acceleration/deceleration can be applied before interpolation, that is, for
    the specified feedrate by reading up to 40 blocks (in the AI contour control
    mode) or 180 blocks (in the AI nano contour control mode) in advance."

    The machine I tested on has AI nano.
    If you look at any Renishaw probing program it has G4's all throughout. It's where I got the idea from initially because of a look ahead issue on some new Robodrills. I didn't realize how brutal this forum is. I literally joined a week ago. Second guessing my decision......

  10. #49
    Join Date
    Nov 2021
    Country
    UNITED STATES
    State/Province
    New York
    Posts
    17
    Post Thanks / Like

    Default

    Quote Originally Posted by Vancbiker View Post
    Uhhhh, that program won’t “mess up” even with just one G4. All it is doing is illustrating that your claim that a string of G4 commands executes more quickly than a G31 is false.
    He stated that a G31 is slower than a single G4. How about 2, or 3? Renishaw programs typically have 4 in a row.

  11. #50
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    4,210
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1799

    Default

    Quote Originally Posted by dandrummerman21 View Post
    I ran the following code:
    Hello dandrummerman21,
    You would have to use your example code being called as either a Local Subprogram, but not using M97 as suggested by RedBarn, if a Fanuc Control (that just won't work), or if the Fanuc Control didn't have that feature, as an External Sub, to see if there is any time difference compared to G31/G53 within the program. The program from which its called should be more than just a dummy few lines long.

    Regards,

    Bill

  12. #51
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    4,210
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1799

    Default

    Quote Originally Posted by RedBarn Research View Post
    He stated that a G31 is slower than a single G4. How about 2, or 3? Renishaw programs typically have 4 in a row.
    Using a number of G04s, even just a number of EOB's strung together, is a technique that harks back to the day when it wasn't realized that G31/G53 worked to halt Look Ahead. Many features that are used today work due to experimentation. Fanuc now list G31/G53 (without arguments) as the code for use to halt Look Ahead. Also, a custom "M" Code can be created via parameter setting for the purpose of halting Look Ahead.

    Using a number of G04's has been nearly universally dropped for the purpose of halting Look Ahead, due to it being unreliable with many controls.

    With most earlier controls, instead of changing a parameter so that a Macro Statement would respond to Single Block operation when debugging, an EOB could be used between each Macro Statements in a string for the same affect.

    The Forum is only brutal when misinformation to spread. This Thread involves a Fanuc control and you didn't even get the "M" function to call a Local Subprogram right. M97 is the code typically used by Haas to differentiate between Local and M98 for External Subprogram calls

  13. #52
    Join Date
    Jan 2019
    Country
    SWEDEN
    Posts
    220
    Post Thanks / Like
    Likes (Given)
    68
    Likes (Received)
    26

    Default

    Hi again! Victory! (Sorta. Maybe. Actually quite a lot.)

    Thanks for all suggestions.

    Did some stuff after work.

    First of all. I don't get the control being weirded out in Z motion. I don't know why, I got it just like Dan did before. What I got was the "out of radius" error: I think I might've changed a couple things that aren't in the code I posted.

    But again, victory!

    So MDI single block worked, autorun gave out of radius.

    I tried G53 and G31 but they wouldn't work, but that might be because I put them in the wrong place. I'll check for science tomorrow.

    What DID work was when I checked the variable for radius tolerance #3410 (I had that at 100, maybe Dan has that higher?) and realized the next variable was "M code preventing buffering". So I put that to 200 and then I executed M200 in the start of the macro and at the start of the motion code. (Start of macro because Dan mentioned he got it working by commands before the macro was called.)

    It works for both the primitive and the advanced macro. Removing one I found out that... Yes, only the M200 at the start of the macro was needed. I also changed the HSM variable #7501 to 16ms interpolation of G05 data (the slowest) and that helped with the stuttering.

    It still stutters a bit but nowhere near as bad as before (as in as bad it did in MDI without the #7501 change.) The skew and convexity version was not viable without G05.1. Now the primitive macro with added Z axis is completely smooth and the stuttering of the A-C (#1 #3) one is mostly displeasing aesthetically, I don't think it really matters unless you run it really fast.

    If I want to get rid of that concern real simple I'd just do G0 in retract phase. As it is, I am thinking how do I combine the two loops (forward and backward rotation) into one, because it stutters exactly when it goes from the one to the other. But the main takeaway is that this is now completely working (except I screwed up the algorithm for the convexity) and now I/We have a platform, and now optimizing stuff and adding extras will be easier because I have a 3-axis template that actually works.

    I would post code and a video but (I kid you not, seriously) my email got hacked and my phone is dead and I forgot my charger at work. I'll do it tomorrow.

    Sleep well!

  14. #53
    Join Date
    Oct 2007
    Country
    SPAIN
    Posts
    5,681
    Post Thanks / Like
    Likes (Given)
    1533
    Likes (Received)
    833

    Default

    Quote Originally Posted by RedBarn Research View Post
    If you look at any Renishaw probing program it has G4's all throughout. It's where I got the idea from initially because of a look ahead issue on some new Robodrills. I didn't realize how brutal this forum is. I literally joined a week ago. Second guessing my decision......
    You got to hang around - you've passed the initiation as you're well into bikes
    I've never met Mick Andrews but his book is a great read!
    I knew Sammy Miller having lived all my life (upto 50) less than 10 miles from him.

  15. #54
    Join Date
    Nov 2021
    Country
    UNITED STATES
    State/Province
    New York
    Posts
    17
    Post Thanks / Like

    Default

    Quote Originally Posted by angelw View Post
    Using a number of G04s, even just a number of EOB's strung together, is a technique that harks back to the day when it wasn't realized that G31/G53 worked to halt Look Ahead. Many features that are used today work due to experimentation. Fanuc now list G31/G53 (without arguments) as the code for use to halt Look Ahead. Also, a custom "M" Code can be created via parameter setting for the purpose of halting Look Ahead.

    Using a number of G04's has been nearly universally dropped for the purpose of halting Look Ahead, due to it being unreliable with many controls.

    With most earlier controls, instead of changing a parameter so that a Macro Statement would respond to Single Block operation when debugging, an EOB could be used between each Macro Statements in a string for the same affect.

    The Forum is only brutal when misinformation to spread. This Thread involves a Fanuc control and you didn't even get the "M" function to call a Local Subprogram right. M97 is the code typically used by Haas to differentiate between Local and M98 for External Subprogram calls
    Been setting up HAAS machines for the last year. Mistakes are made.

  16. #55
    Join Date
    Nov 2021
    Country
    UNITED STATES
    State/Province
    New York
    Posts
    17
    Post Thanks / Like

    Default

    Quote Originally Posted by barbter View Post
    You got to hang around - you've passed the initiation as you're well into bikes
    I've never met Mick Andrews but his book is a great read!
    I knew Sammy Miller having lived all my life (upto 50) less than 10 miles from him.

    Not worth it... the Ossa community ain't any better. All about the money and who's who. Diamond status on here seems to be an indicator to avoid at all costs. Personally knew John Taylor (yankee motors). Brought bikes to his reunion for Yankee motors. Small fact, the yankee prototype his son got killed on and he ordered destroyed was in the basement of the house the reunion was held at, fully restored. Dick Mann, Joe Bolger (own several of his bikes and currently have possession of the last Bolger kits never assembled in existence), and several more greats have passed away this year as well. Its sad and will all be forgotten in 10-15 years or even less.

  17. Likes barbter liked this post
  18. #56
    Join Date
    Oct 2007
    Country
    SPAIN
    Posts
    5,681
    Post Thanks / Like
    Likes (Given)
    1533
    Likes (Received)
    833

    Default

    Yes you're not wrong about the older generation how once they've gone, everything is forgotten
    But there's occasionally one or two Ossa Yankees (the 500 road bikes) that I see for sale here from time to time.
    That bike looks wheelie fun

  19. #57
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    4,210
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1799

    Default

    Quote Originally Posted by Tichy View Post
    What DID work was when I checked the variable for radius tolerance #3410 (I had that at 100, maybe Dan has that higher?) and realized the next variable was "M code preventing buffering". So I put that to 200 and then I executed M200 in the start of the macro and at the start of the motion code. (Start of macro because Dan mentioned he got it working by commands before the macro was called.)
    As you would probably know, when a tolerance value is set in Parameter #3410, the control compares the radius from the start point of the arc to the arc centre, with the radius from the end point of the arc to the arc centre and raises an alarm if the difference exceeds the value set in parameter.

    If a Zero value is set in Parameter #3410, the control won't do an out of tolerance check, instead and if there is an error in the circular path coordinates, the control will swing the arc using the radius from the start point of the arc to the arc centre and the specified arc centre, until the coordinate of one of the axes is reached. From there, the tool moves in a straight line to the axis coordinate not yet reached; no alarm is raised.

    Regards,

    Bill


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
  •