586,094 active members*
3,807 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 24
  1. #1
    Join Date
    Nov 2007
    Posts
    330

    Transform problem

    Hi All, me again and yes, another problem that I hope you guys can help with.

    I've got a fixture set up in which I have 6 parts fitted. The plan at first was to manually pick each profile etc to machine the array of parts, but then I found the transform button. Oh what joy and how easy was that. Right up until I tried to run the program on the machine.

    I chose the transform - matrix and then set the parameters for 6 rows at 111mm step.

    Just for reference. I'm using a Fadal 3016 with Fanuc 0i control.

    I must apologise now as I'm sitting in an internerd cafe writing this so I don't have the generated program in front of me, but it used code I was unfamiliar with (being a newbie and all) such as a WHILE statement at the start and an END1 at the end.

    Also had a line: G10 G91 L2 P2 X111 Y0 Z0
    Immediately followed by: G90

    Anyway, the X111 relates to the fact that I want to move the datum inrementally 111mm in X, and 0mm in Y & Z.

    To give more idea of how I'm (trying) to do this, I've got a main program that calls each operation as a sub program using M98. It's worked perfectly for me so far, and is quick and easy to edit each sub program without having to scroll through pages of code, but all that happened was it jumped from the main program to the sub program and then machined the same pair of holes 6 times, instead of incrementing 111mm onto the next piece.

    I had a flick through the docs I have and it appears that you can't have a subroutine in a subprogram. So I messed with the program a little and put it in the main program, but it did exactly the same thing.

    The only way I've managed to solve this without completely redoing the CAM bit is to set the 6 datums as G54 thru to G59, calling the subprogram at each line. It works fine but is a little long winded, especially as a job I have coming up soon would be a piece of cake if I can get this transform thing to work.

    If anyone has any bright ideas I would be most grateful as I want to start cutting tomorrow, but I'll redo the code in the morning to use the G54~G59 codes as I've already tested, unless you chaps can help.

    I'll also make sure that I have the generated program to hand next time I log into this forum as I'm sure that it's be far more useful that me babbling on.

    Just as an example. Say you wanted to drill one hole, and then transform this a couple of times along the part, using the translate thingy. How should the code come out?

    Well, that's all for now. I'll go sleep on it.

    Thanks for listening.

    Matt.

  2. #2
    Join Date
    Mar 2008
    Posts
    26

    use of G10 with transforms

    Matt,

    First time I saw this in SolidCAM it was a bit different than I had been used to. I had previously done it the way you mentioned of G54, call a sub, G55 call a sub, G56 call a sub, and so on.

    I gave the SolidCAM way a try and though different it works perfectly and is something that I use almost every day. As long as you know the shift values ahead of time all is well. I always use fixtures or vises with fixed or known shifts. This also allows and unlimited number of shifts (I often have 50 or more) versus using G54-G59 and how ever many extended offsets you might have. I also don't have to goof around moving to positions and setting all the coordinate systems.

    G10 just means that your going to set an offset in this line. Could be coordinate system (G54, G55, etc), tool length offset, tool diameter, and depending on your machine a few others

    G91 of course is incremental.

    L2 lets it know which type of offset (coordinate, length, diameter, and so on). L1 is one type of offset, L2 is a coordinate system, L3 another type, L4 another type, and so on.

    P2 in your example is equivalent to G55. P1 would be G54, P3 is G56, P4 is G57 and so on.

    The rest of the values are obvious (your shifts)

    Essentially when it runs this way it is just automatically or programatically sets your G55, kicks back into G90, calls up the subprogram, makes the programmed moves in absolute, resets your G55 incrementally as compared to your previous G55, moves to the next location, back in to G90, calls up the subprogram, makes the programmed moves, and repeating this as many times as is necessary. At the end mine automatically sets it back to the starting point.

    Not sure why yours isn't working like mine. Perhaps this will help you troubleshoot the problem. Your controller is a very popular one so it should not be hard to sort out the problem.

    Hope this helps

  3. #3
    Join Date
    Nov 2007
    Posts
    330
    Thanks for the reply Adam.

    I kind of figured out what all the code means, but I just can't understand why it's not working. Having not used this before, I'm not sure if there's some code missing.

    It repeats the action without a problem, it's just that it doesn't reset the datum to the new position.

    Also, as you mention Adam, there's some code at the end that resets the datum back to G54.

    I hope I can get it figured out as it's save a bunch of time.

    I'll be at my shop in an hour or so, and I'll copy and paste the program here for some evaluation.

    Thanks.

    Matt.

  4. #4
    Join Date
    Nov 2007
    Posts
    330
    Here's my example program:

    %
    O1000 (DR13.TAP)
    ( MCV-OP ) (16-AUG-2008)
    N100 (SUBROUTINES: O1 .. O2)
    N102 G21
    N104 ( TOOL -7- DRILL DIA 13.0 MM )
    N106 G90 G0 X17. Y147. Z50. S1400 M3
    N108 M8
    N110 #21 = 0
    N112 WHILE [#21 LT 6] DO 1

    N114 (----------------)
    N116 (DR13-CSK - DRILL)
    N118 (----------------)
    N120 G0 X17. Y147. Z50.
    N122 G98 G83 Z1.395 R28. Q3. F280
    N124 X83. Y9.5
    N126 G80
    N128 G10G91 L2 P2 X111. Y0. Z0.
    N130 G90
    N132 #21 = #21 + 1
    N134 G2
    N136 END 1
    N138 G10G91 L2 P2 X-666. Y0. Z0.

    N140 G90
    N142 M5
    N144 G91 G28 Z0.
    N146 M99
    %

    The code in bold lettering is what I'm unfamiliar with.

    I'm also wondering if the problem is coming from the fact that I'm using G5.1 look ahead in the main program??? I'll give that a try now and get rid of it for the time being and see if it makes a difference.

    Spot anything wrong?

    I'm calling tool, tool heights, diameter offsets from the main program.

    Should I have a G54 in the subprogram so that the machine knows where it is?

    Help very much appreciated.

    Matt.

  5. #5
    Join Date
    Nov 2007
    Posts
    330

    Admitting defeat......for now!

    Well, I tried a couple more things, but no luck so I've carried on with the G54~59 setting. Which is working nicely.

    Any help would be very handy though :-)

  6. #6
    Join Date
    Mar 2008
    Posts
    26
    Your output might be a bit different than mine depending on which post we each use. In this example I'm using the default Fanuc post. Most of the default posts are about the same.

    Perhaps I didn't read your post clearly but I thoughy you were using Translate/List, not Translate/Matrix. I see now from your code output that your are using Transform/Matrix (Rows and Columns). That code output of loops (N110 #21 = 0 N112 WHILE [#21 LT 6] DO 1) is not what I use. Though my machine accepts it and I know how it works I accomplish identically the same thing by using Transform/List (shifts in X,Y,Z values versus rows and columns). The code output using Transform/List is much simpler and is what I was referring to in my previous post.

    sample output using Translate/Matrix
    O5000 (MATRIX.TAP)
    ( MCV-OP ) (16-AUG-2008)
    (SUBROUTINES: O2 .. O3)
    G90 G17
    G80 G49 G40
    G54
    G91 G28 Z0
    G90
    M01
    N1 M6 T1
    G90 G00 G40 G54
    G43 H1 D31 G0 X1. Y1. Z2. S1200 M3
    M8
    #21 = 0
    WHILE [#21 LT 2] DO 1
    #22 = 0
    WHILE [#22 LT 2] DO 2
    (------------------)
    (D-DRILL-T1 - DRILL)
    (------------------)
    G0 X1. Y1. Z0.2
    G98 G81 Z-0.15 R0.079 F2
    G80
    G10G91 L2 P1 X8. Y0. Z0.
    G90
    #22 = #22 + 1
    G1
    END 2
    G10G91 L2 P1 X-16. Y8. Z0.
    G90
    #21 = #21 + 1
    G1
    END 1
    G10G91 L2 P1 X0. Y-16. Z0.
    G90
    M30

    sample output using Translate/List
    %
    O5000 (1.TAP)
    ( MCV-OP ) (16-AUG-2008)
    (SUBROUTINES: O2 .. O0)
    G90 G17
    G80 G49 G40
    G54
    G91 G28 Z0
    G90
    M01
    N1 M6 T1
    G90 G00 G40 G54
    G43 H1 D31 G0 X1. Y1. Z2. S1200 M3
    M8
    (------------------)
    (D-DRILL-T1 - DRILL)
    (------------------)
    X1. Y1. Z0.2
    G98 G81 Z-0.15 R0.079 F2
    G80
    G10G91 L2 P1 X8. Y0. Z0.
    G90
    (------------------)
    (D-DRILL-T1 - DRILL)
    (------------------)
    G0 X1. Y1. Z0.2
    G98 G81 Z-0.15 R0.079 F2
    G80
    G10G91 L2 P1 X8. Y0. Z0.
    G90
    (------------------)
    (D-DRILL-T1 - DRILL)
    (------------------)
    G0 X1. Y1. Z0.2
    G98 G81 Z-0.15 R0.079 F2
    G80
    G10G91 L2 P1 X8. Y0. Z0.
    G90
    (------------------)
    (D-DRILL-T1 - DRILL)
    (------------------)
    G0 X1. Y1. Z0.2
    G98 G81 Z-0.15 R0.079 F2
    G80
    G10G91 L2 P1 X-24. Y0. Z0.
    G90
    M30
    %

    Hope this clears it up

  7. #7
    Join Date
    Jul 2006
    Posts
    33
    I have had two separate issues while using the transform function in Solidcam. Both of these turned out to be issues with the post that Solidcam gave me for my HAAS VF-2.

    The first problem was that it would step exactly the opposite direction that I wanted it to.

    The second problem I had was that it would not retract to the correct Z clearance plane before it would step to the next part.


    As I already said, these were both post problems that were corrected by Solidcam and I have not seen any more problems so far.

  8. #8
    Join Date
    Nov 2007
    Posts
    330
    Thanks for the replies guys.

    Adam, I see in your post that you have:

    G10G91 L2 P1 X8. Y0. Z0. (Note P1)

    Whereas I have:

    G10G91 L2 P2 X111. Y0. Z0. (Note P2)

    Could this be the problem?

    I'll have a chance to test this tomorrow night as the job I'm doing should be done by then.

    I just tried the same operation (DR13.TAP) using the transform/list and I get the same as your example, but again, it's P2 in every datum shift, not P1.

    My 'home' position is G54

    Sorry if I sound a little green here, but it's because I am!

    Thanks.

    Matt.

  9. #9
    Join Date
    Nov 2007
    Posts
    330
    I think I may have sussed what the problem is, and it's related to the P2, which (as Adam pointed out to me) is G55. Well I think that it's because this is the 2nd op, but I have reset the home position as G54 on the machine, but it's position 2 in SC, so the generated program is looking at the second datum for reference.

    I transformed an op from the first set up and it came out in the program as P1, just like Adam's post.

    So I'm reasonably confident that that's the problem.

    I just spent about 2 hours reading through the GPP tool thingy before this fell on me as I couldn't work out why it was generating G55 as the home and not G54, but after using the trace 'all':5 command I could see what was going on.

    I'll try this tomorrow evening when the current job is done, and I'm keeping my fingers and toes crossed.

    Thanks very much for all your help, and i'll let you know how it goes.

    Matt.

  10. #10
    Join Date
    Nov 2007
    Posts
    330
    :banana:

    And yes, we all know what the dancing banana means!

    Simply changed my original program from P2 to P1 and BINGO......everything worked perfectly.

    This was the transform/matrix option.

    Life is sweet.......for now

    Thanks for all the advice. To be honest, I think the some of the best advice when trying to solve a 'simple' problem like this is to use the trace all:5 option in the processor so you can actually see what's going down. Might not actually be able to understand it all yet, but it's definitely a big help.

    It also pays huge dividends when you actually understand the program!

    Oh well, back to work.

    Thanks again.

    Matt.

  11. #11
    Join Date
    Jan 2008
    Posts
    92
    I tried the translate on a part today, it totally didn't work.

    What I wanted to do was cut two identical parts out a a piece of stock. I had the translate set up with one row, two copies and an offset of 3.0". The generated G-Code had errors (invalid radius for G13). Taking out the translate the g-code ran fine.

    Joe

  12. #12
    Join Date
    Nov 2007
    Posts
    330
    Using this option a fair bit, but I've run into a slight problem. If for some reason I stop the program half way through (say it's on the 2nd or 3rd datum hop) and I want to restart the program, it doesn't go back to the original datum, but instead starts at the datum where I stopped it.

    I've managed (somehow!) to get it back to the original datum, but I don't know how and then just yesterday I managed to completely reset all my datums, which was rather a pain!

    Any help much appreciated. I'm sure there's something very simple.

  13. #13
    Join Date
    Nov 2007
    Posts
    330

    Rotate/Matrix this time!

    Run into more bother. If I do the rotate/matrix translate the tool goes through the first position without issue, then moves to position 2 (72 degree rotation about X0, Y0, but then stays there for the next 3 ops. It should rotate a total of 5 times, but does 2 and then stays at the 2nd position. Any ideas?

    Here's the code that's generated:

    N100 G69
    N102 (SUBROUTINES: O1 .. O2)
    N104 G21
    N106 ( TOOL -3- DRILL DIA 8.0 MM )
    N108 G90 G0 X-45.535 Y14.795 S10000 M3
    N110 M8
    N112 #21 = 0
    N114 WHILE [#21 LT 5] DO 1
    N116 (------------)
    N118 (SPDR - DRILL)
    N120 (------------)
    N122 G0 X-45.535 Y14.795 Z42.5
    N124 G98 G81 Z25. R28.5 F1000
    N126 G80
    N128 G68 X0 Y0 G91 R72.
    N130 G90
    N132 #21 = #21 + 1
    N134 G1
    N136 END 1
    N138 G69
    N140 M5
    N142 M9
    N144 G91 G28 Z0.
    N146 M99

    Thanks in advance.

    Matt

  14. #14
    Join Date
    Nov 2007
    Posts
    330

    Rotate/List as well :-(

    As the title suggests. The generated code does exactly the same thing as the rotate/matrix.

    Both work fine in the solidcam simulation.

  15. #15
    Join Date
    Nov 2007
    Posts
    330
    Any ideas anyone?

    I got around the problem by editing the post in rotate/list. I needed 4 rotations at 72 degree increments and it seemed to be incrememnting 72 degrees from zero everytime, so I changed to 72/144/216 & 288 and it all went smimmingly. Don't want to have to do this though.

  16. #16
    Join Date
    Nov 2007
    Posts
    330

    Transform / Rotate / Delta

    I'd like to bump this one up again.

    I'm still having no luck with the Transform / Rotate / Delta option.

    I'm not sure how to cure it, but would really appreciate some assistance.

    If you see my post (about three below this one), it explains what's going on.

    It's like it reads through the loop the first time, performs the first 72 degree rotation but then resets back to the original position/rotation as the third, fourth and fifth operations are all performed at the second position.

    HEEEELP!

    Just so we all know where we are: Fanuc 0iMC, Fadal 3016

    Thanks,

    Matt.

  17. #17
    Join Date
    Oct 2007
    Posts
    499
    Quote Originally Posted by mattpatt View Post
    It's like it reads through the loop the first time, performs the first 72 degree rotation but then resets back to the original position/rotation as the third, fourth and fifth operations are all performed at the second position.
    Matt,

    It occurs to me that you need to make the G68 move incremental. I don't know enough about your control to say that you just put a G91 in the line above and a G90 in the line below - I don't think this will work - so perhaps there is a case for adding to the routine something like

    Main Program
    #100 = 72
    #101 = 0

    Sub Routine
    ........
    N128 G68 X0 Y0 G91 R#101.
    N129 #101 = #101 + #100
    ......
    End of Sub Routine
    #100 = 0
    #101 = 0

    I think that might work (mind you, you'd better check the syntax, it's been a while since I coded in Fanuc).

    All the best

    Bob

  18. #18
    Join Date
    Nov 2007
    Posts
    330
    Hi Bob,

    Thanks for your reply. It seems that I was thinking along similar lines to what you suggest as I was considering making the R72. into a variable.

    I have actually sent the following to my friendly FADAL assistant in the US. The code is the actual code I'll be running in the sub program:

    I'm trying to rotate an operation around the origin (5 times in total). The origin is set in the centre of a cylindrical type part, and I've generated the code as follows:

    %
    O51 (.TAP)
    ( MCV-OP ) (02-APR-2009)
    N100 G69
    N102 (SUBROUTINES: O2 .. O2)
    N104 G90
    N106 G21
    N108 (TOOL -9- MILL DIA 10.0 R0. MM )
    N110 G90 G0 X0. Y47.879 Z82.5 S10000 M3
    N112 M8
    N114 #21 = 0
    N116 WHILE [#21 LT 5] DO 1
    N118 G0 Z34.5
    N120 Y47.879
    N122 (---------------------)
    N124 (F-20.5MM-CB - PROFILE)
    N126 (---------------------)
    N128 X0. Y47.879 Z34.5
    N130 G1 Z26.5 F3000
    N132 G41 G1 X10.75
    N134 G3 X10.75 Y47.879 I-10.75 J0.
    N136 X10.704 Y48.877 R10.75
    N138 X-0.291 Y57.996 R10.1
    N140 G40 G1 X0.647 Y47.939
    N142 G0 Z34.5
    N144 G68 X0 Y0 G91 R72.
    N146 G90
    N148 #21 = #21 + 1
    N150 G1
    N152 END 1
    N154 G69
    N156 M5
    N158 M9
    N160 G91 G28 Z0.
    N162 M99
    %

    This is a sub program. What happens is that it moves to the first position and finishes the counter bore. It then rotates 72 degrees and finishes the second counter bore. But then it all goes wrong. Instead of incrementing a further 72 degrees to machine the third counter bore (and so on) it seems to reset the rotation back to the original position and cuts the 2nd counter bore again, and again, and again!

    It's like it's reading the G69 (even though it's not supposed to) and resetting the datum before returning to line N114 and repeating the procedure.

    The WHILE loop is generated by Solidcam. Mostly I don't have any problems as it's a fanuc generic post processor that I've fiddled with a bit, but this one has me stumped. I've fiddled with absolute and incremental moves, tool compensation, no compensation, milling, drilling, tapping, everything, but no success.

    Haven't tried this yet (just thought of it), but perhaps if I made the "N144 G68 X0 Y0 G91 R72." into a variable such as "N144 G68 X0 Y0 G91 R#22." And then before the line N114 I put in something like "N113 #22 = 72" and then put in N149 #22 = #22 + 72 Maybe that would work. ?????? Perhaps I'm clutching at staws here, but would be interested in your views. I'm not a macro expert but it seems to make sense.


    You recommend putting the variables in the main program......I'll try both :-)

    Thanks muchos.

    Matt.

    Quick edit: seems I forgot that I'll have to set the variable #22 back to #22 = 72. Or will I? As any subsequent sub progs that use this loop will be reassigned before the loop starts.....Hmmm.

  19. #19
    Join Date
    Nov 2007
    Posts
    330
    Right then chaps.

    Here's what I tried first (added lines in red):

    %
    O51 (.TAP)
    ( MCV-OP ) (02-APR-2009)
    N100 G69
    N102 (SUBROUTINES: O2 .. O2)
    N104 G90
    N106 G21
    N108 (TOOL -9- MILL DIA 10.0 R0. MM )
    N110 G90 G0 X0. Y47.879 Z82.5 S10000 M3
    N112 M8
    N113 #22 =72
    N114 #21 = 0
    N116 WHILE [#21 LT 5] DO 1
    N118 G0 Z34.5
    N120 Y47.879
    N122 (---------------------)
    N124 (F-20.5MM-CB - PROFILE)
    N126 (---------------------)
    N128 X0. Y47.879 Z34.5
    N130 G1 Z26.5 F3000
    N132 G41 G1 X10.75
    N134 G3 X10.75 Y47.879 I-10.75 J0.
    N136 X10.704 Y48.877 R10.75
    N138 X-0.291 Y57.996 R10.1
    N140 G40 G1 X0.647 Y47.939
    N142 G0 Z34.5
    N144 G68 X0 Y0 G91 R#22.
    N146 G90
    N148 #21 = #21 + 1
    N149 #22 = #22+72
    N150 G1
    N152 END 1
    N154 G69
    N156 M5
    N158 M9
    N160 G91 G28 Z0.
    N162 M99
    %

    And the result?

    PERFECT :wee::wee::wee: (what exactly are those things?)

    Oh yes, I'm a happy chappy.

  20. #20
    Join Date
    Nov 2007
    Posts
    330

    Rotation solved, now to modify GPP file

    Moving swiftly on.

    My man at FADAL came up with some suggestion, which I haven't had time to try yet, but looking at it, this method (using the extra variable) gives a much shorter program. So I'll stick with it for now.

    So what I want to do now is modify the GPP file to get the same output as the program below.

    First off, I added the following line (in red) in the @start_of_file:

    if rotate_used then
    gcode = 69
    {nb, 'G'gcode}
    {nb, '#100 = 0 (input Rotation angle)'}

    This generates:

    N102 #100 = 0 (input Rotation angle)

    Then, in the @rotate sections I changed the R value and added a line:

    if rotate_cancel then
    gcode = 69
    {nb, 'G'gcode}
    else
    gcode = 68
    {nb, 'G'gcode, ' X0 Y0 G91 R#100.'}
    {nb, 'G90'}
    {nb, '#100 = #100 + 'angle}
    endif

    This generates:

    N154 G68 X0 Y0 G91 R#100.
    N156 G90
    N158 #100 = #100 + 72.

    Which is just what I want....I think!

    Going back to the first (@start_of_file) procedure. What I want to do is actually have the correct rotation angle generated, but if I try to do this (using: angle), it just comes back with the value 0.

    I then tried to call @rotate, but it just generated the same as lines N154, N156 & N158. I then made an @rotate1 (using the original text in the GPP file that calls: {nb, 'G'gcode, ' X0 Y0 G91 R'angle}, but this generated the same as above, but with a value of 0 as the rotation angle.

    So I think the question is; how can I call the rotation angle ahead of the game? As it seems that the angle is set at 0 until the program gets down to where it actually matters.

    Gotta run this program today so I'll just input the value 72 at line N102 manually for now, but would be sweet if I didn't have to do this.

    Thanks for listening, and I hope my mail is understandable!

    Matt.

    For the record, The G code is generated as follows:

    %
    O51 (.TAP)
    ( MCV-OP ) (03-APR-2009)
    N100 G69
    N102 #100 = 0 (input Rotation angle)
    N104 (SUBROUTINES: O2 .. O2)
    N106 G90
    N108 G21
    N110 (TOOL -9- MILL DIA 10.0 R0. MM )
    N112 G90 G0 X0. Y47.879 Z82.5 S10000 M3
    N114 M8
    N116 #21 = 0
    N118 WHILE [#21 LT 5] DO 1
    N120 G0 Z34.5
    N122 Y47.879
    N124 (---------------------)
    N126 (F-20.5MM-CB - PROFILE)
    N128 (---------------------)
    N130 X0. Y47.879 Z34.5
    N132 G1 Z26.5 F3000
    N134 G41 G1 X10.75
    N136 G3 X10.75 Y47.879 I-10.75 J0.
    N138 X10.704 Y48.877 R10.75
    N140 X-0.291 Y57.996 R10.1
    N142 G40 G1 X0.647 Y47.939
    N144 G0 Z34.5
    N146 G68 X0 Y0 G91 R#100.
    N148 G90
    N150 #100 = #100 + 72. (need to get rid of the '.' after the value 72)
    N152 #21 = #21 + 1
    N154 G1
    N156 END 1
    N158 G69
    N160 M5
    N162 M9
    N164 G91 G28 Z0.
    N166 M99
    %

Page 1 of 2 12

Similar Threads

  1. machine problem or software problem?
    By bcnc in forum Syil Products
    Replies: 8
    Last Post: 10-26-2009, 03:51 PM
  2. Toolpath Transform problem...
    By kprice1658 in forum Mastercam
    Replies: 6
    Last Post: 03-13-2008, 07:07 PM
  3. Transform Stretch no dialog box
    By ZipSnipe in forum Mastercam
    Replies: 7
    Last Post: 12-17-2007, 07:52 PM
  4. Autobots, Transform!
    By Switcher in forum RC Robotics and Autonomous Robots
    Replies: 1
    Last Post: 07-13-2007, 12:48 PM
  5. Transform 2D Views into 3D CAD drawing...?
    By tdfsu in forum Uncategorised CAM Discussion
    Replies: 5
    Last Post: 02-03-2006, 09:05 PM

Posting Permissions

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