1. Hey guyz. Welcome to the All New Phlatforum!



    Sign Up and take a look around. There are so many awesome new features.

    The Phlatforum is a place we can all hang out and

    have fun sharing our RC adventures!

  2. Dismiss Notice

No Code Generated after using Phlatbone

Discussion in 'SketchUcam Bugs' started by Flashsolutions, Jun 14, 2016.

  1. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    I ran into this problem after inserting a Phlatbone radius on a corner. After isolating it, I created these test files.

    The error is erroneous and would make you think there was an issue with the Z axis which it is not.

    ; Warning move Z=60.240 GT max of 45.000

    Attached is rev2 and rev3 of the code that works vs error. rev2 works, rev3 fails
     

    Attached Files:

  2. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    Hi
    Thanks for posting the files with the question (-:

    There are 2 things going on here:
    firstly, your dogbone is too small. Your bit size is 1/8" but your dogbone is half that. The dogbone has to be BIGGER so that the bit fits into it in the corner.
    To quote the phlatbones help....
    bone1.png

    now, because it is too small the outside cut loop never closed, you can see a gap in the orange line.
    Because that is not closed, the face between the work and the line was not created, and this means that G-code will not be generated for that line. Outside and inside cuts HAVE to be closed with the correct face in order to make G-code.

    Secondly, your max_z setting is incorrect if you really want to use the settings you have provided.
    material thickness = 15.24mm
    safe height = 45mm
    tabletop is z-zero, so add the above values for the height for safe travel
    =60.24mm

    so you get this
    ; Warning move Z=60.240 GT max of 45.000
    which is saying that 60.24 is above the max_z setting and it won't move above it.

    To quote the help: (from the 'After install - things to do' section)
    maxz.png

    So, what is your actual maximum Z travel and what values have you used for max_z and min_z?
     
  3. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    Ahhh, okay. It has been a long long while since I messed with CNC and the phlatscript has changed dramatically since I last used it. I thought the dogbone tool used the bit diameter by default. So that solves a lot of problems. After going into the tool diameter setting, it said it was 3.455mm but when I changed it to inches and then back to mm, the dogbone produced the correct radius, so maybe there is an initialization issue with it.

    I have limit switches on my Z axis and when triggered the Z axis resets to 45mm, the value defined in Repetier Host. When I lower the Z axis 45mm, the bit just touches the table top so that is the value I set Repetier to use, otherwise it would set it 60 or 70 or whatever value I define for it.

    These settings seem to work just fine as far as the cutting went.

    I recently built the Muti-Purpose CNC machine on thingiverse.com. https://www.thingiverse.com/thing:724999

    Since I am using Repetier Host to drive my CNC machine, that software may be doing things that Mach 3 would not do. It was really designed for 3D printing, but because it had a USB interface, I could use it with my laptop.

    Thanks for looking it and getting back to me. It was quite helpful.
     
  4. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    I tried setting the Max_Z to 70. That causes the bit to plunge 25mm into the work piece, so that is out of the question. It has to be set to 45mm on my machine.

    The GCODE generates correctly at that setting, and the cuts produced are as I expect, but the very last step shows the warning in the GCODE...

    ; RETRACT limiting Z to @max_z
    G00 Z45.000
    ; EndPosition
    ; Warning move Z=60.240 GT max of 45.000
    G00 X0.000 Y0.000
    M05
    M30

    It seems to me that if the table top is set to zero, the material height should not be added in or it should retract to absolute Z-max. Not sure I understand the logic behind the material height addition.
     
  5. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    Think I found a solution. Use_Home_Height set to True seems to eliminate the warning.
     
  6. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    then you need to read the help! it is the fastest way to get up to speed on the new features.

    3.455 is correct. It reads the current bit diam from the settings and adds 0.01" to leave space so the bit can turn around in the corner.
    The dogbone diameter MUST be larger than the bit otherwise it will not work.
    You did not answer my question as to how far the Z can actually move.
    This is the value you use for the Max_z and Min_z setting on the dialog at
    Tools|PhlatBoyz|Options|Machine Options
     
  7. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    I feel we are missing something fundamental here, like maybe what I man by max_z is not what you mean?
    This means that you have Use_Home_Height set to true, and some value for it that is too high for your Max_z setting.
    homeheight.png
    This is found on the Tools|PhlatBoyz|Options|Feature Options dialog.
    When that is true it will send Z to the given height after the final home move.

    With it false as above, The tool will return to X0 Y0 Z0 at the end of the job.
    With tabletop =Zzero, you don't want that, so set it true and set the height to be less than max_z but higher than the material thickness.

    Here is a drawing to help with this concept...
    heights.png
    Here we see that the table top is Z zero level.
    The material extends above the table and is wood coloured in the drawing
    The 'Safe Height' that you set in the Parameters Dialog is the height ABOVE the material for moves when the bit is not cutting.

    So with the table being Z=0, the safe height is 'material+safeheight'.

    Note that Safe Height can be 2mm or 20mm, just so long as it is safe for the bit to travel rapidly at that height. So if you have clamps that are 10mm high, Safe Height should be more than that , say 12mm, so that the machine can safely rapid above the clamps.
    The Safe Height should not be as much as the 45mm you have set, unless you need that for clearing the clamps!
    (too high just takes more time)
     
  8. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    A picture is worth a thousand words.... Much clearer now. And to answer previous questions, 45mm was the distance between the table top and where the Max_Z limit switch engages with the spindle mounted where it is currently.

    So I have now set the safe height to 4mm in the parameters dialog and the Machine Options setting Max_Z set to 45mm.

    I have Default_Home_Height set to 44mm and Use_Home_Height set to true in the Feature Options. It also works with Default_Home_Height set to 45mm which is where the limit switch kicks in.

    This all seems to be correct now.

    Again, I made some assumptions based on past use of the plugins. And I did read the help manual regarding the Z height adjustments, but it was not nearly as clear as your explanation and the drawing. The drawing really helped.



    Regarding the Phlatbone initial setting, just for clarification, that setting did contain the correct value for the bit I was using when I opened the tools setting, but the too small radius generated was the first time the Phlatbone tool had been used since installing the plugin. Once I opened the dialog box, changed to inches and back to mm, the radius generated was correct.


    Thanks for taking the time to sort this out.
     
    swarfer likes this.
  9. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    Swarfer, I have one last problem if you could.... The first line of GCODE that positions the Z axis has no feedrate and depending what operation was last performed when I start a new job, the feedrate used is too fast and the motor jams. Is this a bug or am I missing an option?
     
  10. swarfer

    swarfer Moderator Staff Member

    Offline
    Messages:
    808
    Trophy Points:
    28
    Location:
    Grahamstown, South Africa
    According to the standard for g code, G00 moves do not use a federate, they are defined as 'rapid as fast as machine can go'.
    So if your hardware is doing it wrong you need to talk to whoever wrote it. I know that GRBL gets it right :) but I also know that many of the 3D printer controllers get it wrong.

    However if you are talking about an initial G01 move that has no feedrate then I need to see the code, please. Assuming of course that you are running sketchucam 1.4a , if it is older please upgrade it, i always have the latest version so cannot debug older versions.

    Another thought is that you have the max feedrate or acceleration set too high, it should not be possible to give it any commands that cause a jam up.
     
  11. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    I am in fact using the latest version. And yes, it is a G00 move. I am using an Arduino with Ramps 1.4 loaded with Repetier software.

    It could be and most likely is, that there is a setting in my controller that I need to find and tweak. I will look into that, but for now I have just been editing the first generated G00 to append the feed rate since it is only the Z axis that is acting up.

    ; www.PhlatBoyz.com
    G90 G21 G49 G17
    M3 S15000
    G00 Z17.000 F200
    ; Pass: 1
    G00 X20.000 Y20.000
    G00 Z13.500
    G01 Z11.000 F200

    Thanks for all your help. It's probably been two or three years since I last did any CNC work, and my age doesn't help any either :).
     
    swarfer likes this.
  12. Flashsolutions

    Flashsolutions Active Member

    Offline
    Messages:
    1,123
    Trophy Points:
    38
    Location:
    Leesburg, Florida
    And yes, you were right once again! It was the acceleration setting in my controller! Thanks again!
     
    swarfer likes this.

Share This Page