Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

CAM "losing" zero

jeremiah_peschka840jeremiah_peschka840 Member Posts: 14 PRO

I've been working on a commission and I'm ready to get the CAM working. I've split out the relevant parts into derived part studios and then created a CAM studio for each of those derived parts. So far, so good. You can find the parts in this document, hopefully this is linking to "Side One - CAM" (please ignore my poor naming conventions).

With the release of Masso support, I decided to pick up some MDF to make sample pieces. The tool path for T2 works fine, although it's exceptionally slow (my fault for the adaptive feed rate settings). After the T2 tool path is complete, the machine moves to the back of the bed, comes forward to change to T3 manually, and then moves to the back of bed again.

When the tool path for T3 begins, the machine rapids forward on X, Y, and Z. This smashes the tool into the work piece at a good clip and breaks the tool. It seems like I've set something up incorrectly, possibly in the Linking settings. You can kind of see where the tool smacked into the MDF twice, as well as the busted parts of the tool.

I've attached the g-code as a TXT file.

The question:
What can I change here to ensure that this doesn't happen?

Tagged:

Answers

  • nick_papageorge_dayjobnick_papageorge_dayjob Member, csevp Posts: 1,046 PRO
    edited January 17

    I know enough about g-code to know I don't know enough….. I'm about 95% sure this is your problem.

    When I was using mach 3 and fusion 360 it would crash just like you between tool changes. The Z would rapid down into my workpiece and/or table. If you have a G28 in your code, there should be a setting in your machine controller (not CAM) to set that position to a safe place. Or, don't include it in your code. You'll have to figure out what setting in OS CAM is including it. Either way to fix it should work. You'll need to understand what g28 does and how Onshape CAM and Masso controller handle it.

    Search the g-code the G28 will come up 6 times, twice at the end of every tool. All of them can result in the same crash.

    image.png
  • michael3424michael3424 Member Posts: 753 ✭✭✭✭

    Hope I'm not offbase here, but G28 is the home positionm often called before a tool change, do that makes sense since you are changing to T3 a few lines later. I don't see the point in moving to Z0 and then Y0 immediately after the G28 and right before the before the tool change. Maybe the post processor or your CAM tool pathe needs adjusting. What is part zero, particularly Z, set to?

    What do the next few lines after the tool change look like?

  • jeremiah_peschka840jeremiah_peschka840 Member Posts: 14 PRO
    edited January 18

    Aye, the G28 makes sense, in a way, but certainly not for efficiency purposes. I'd think that moving to the work origin Y0 after moving to machine Z0 makes more sense - now you're in a known good place relative to the part.

    The part's Z zero is set to the bottom of the part. I've read that this is a better workflow than having Z zero on the top of the part, for consistency's sake.

    Here's the code before and after the tool change. Is the ( Setup ) line starting the rapid movement toward work coordinate system 0 that results in tool breakage? I'm not sure, g-code is still new to me.

    G91 G28 Z0.
    G28 Y0.
    G90
    M05
    ( Operation: Parallel cuts )
    T3 M06 (D0.125 in End mill)
    S12000 M03
    G0 G90 G54 G94 ( Setup )
    G0 X118.9727 Y302.0578 Z34.05
    G0 X118.9727 Y302.0578 Z28.035
    G1 X118.9727 Y302.0578 Z17.875 F1016.
    G2 X118.5778 Y301.0164 Z17.71 I-0.7264 J-0.3201 F1524.
    G2 X117.6163 Y301.2548 Z17.567 I-0.3315 J0.7213
    G2 X117.636 Y302.2452 Z17.424 I0.63 J0.4829
    G2 X118.6061 Y302.4452 Z17.281 I0.6103 J-0.5075
    G2 X119.0159 Y301.5434 Z17.1381 I-0.3598 J-0.7075
    G2 X118.2272 Y300.9442 Z16.9951 I-0.7696 J0.1943
    G2 X117.4682 Y301.5807 Z16.8521 I0.0191 J0.7935
    G2 X117.9211 Y302.4617 Z16.7091 I0.7781 J0.157
    G2 X118.8804 Y302.2151 Z16.5661 I0.3252 J-0.724
    G2 X118.8523 Y301.225 Z16.4231 I-0.6341 J-0.4774
    G2 X117.8804 Y301.0333 Z16.2801 I-0.606 J0.5127
    G2 X117.4784 Y301.9386 Z16.1371 I0.3659 J0.7044
    G2 X118.2723 Y302.531 Z15.9942 I0.7679 J-0.2009
    G2 X118.9727 Y302.0578 Z15.875 I-0.026 J-0.7933
    G1 X119.0977 Y301.7741 Z15.875
    G1 X119.2281 Y301.2645 Z15.875
    G1 X119.2758 Y300.8737 Z15.875
    G1 X119.3119 Y300.8983 Z15.875
    G1 X119.4203 Y301.2778 Z15.875
    G1 X119.6578 Y301.7816 Z15.875
    G1 X119.8015 Y301.9852 Z15.875
    G1 X119.8744 Y302.0755 Z15.875
    G1 X119.9549 Y302.1512 Z15.875
    G1 X120.0427 Y302.2128 Z15.875
    G1 X120.1371 Y302.2605 Z15.875
    G1 X120.2379 Y302.2946 Z15.875
    G1 X120.3444 Y302.3156 Z15.875
    G1 X120.4563 Y302.3238 Z15.875
    G1 X120.5731 Y302.3195 Z15.875
    G1 X120.6806 Y302.3035 Z15.875
    G1 X120.7648 Y302.2763 Z15.875
    G1 X120.8251 Y302.2385 Z15.875
    G1 X120.8612 Y302.1904 Z15.875
    G1 X120.8726 Y302.1323 Z15.875
    G1 X120.8588 Y302.0646 Z15.875
    G1 X120.8194 Y301.9877 Z15.875
    
  • jeremiah_peschka840jeremiah_peschka840 Member Posts: 14 PRO

    Reviewing this gcode step by step, I'm becoming convinced that the error lies in the machine itself, not in the g-code. I have opened a ticket with support to discuss this issue - it makes more sense to me to reference X0 and Y0 from the current work item, but Z0 from the machine (at least, with the generic Masso controller set up).

    There's a possibility that static build up cause the machine to become confused about its current location. I haven't seen this happen since I replaced the original Carbide3D controller with the Masso unit, but it's entirely possible. I'll report back after an attempt tomorrow, but with more grounding than I would have thought is needed.

  • nick_papageorge_dayjobnick_papageorge_dayjob Member, csevp Posts: 1,046 PRO

    My money is still on g28. It happens to about every hobbiest (me included). The cam puts it in there because the pro machine controls and operators understand it and are expecting it. Us hobbyists are not.

  • jeremiah_peschka840jeremiah_peschka840 Member Posts: 14 PRO

    Re-ran things again today with new bits and the g-code ran perfectly. I am not sure why it worked, but it did. I'll take it.

    If anyone does have an idea, I'd still appreciate it.

Sign In or Register to comment.