Need Help! what is wrong with the code?


Results 1 to 8 of 8

Thread: what is wrong with the code?

  1. #1
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    183
    Downloads
    0
    Uploads
    0

    Default what is wrong with the code?

    this is a screenshot of my machine when it threw the reset. I can't tell why. It should have raised up to be ready for the next tool change.
    What am I missing?
    I would like to run the code in Predator editor but the simulation does not show the part being cut when I run the backplot.
    In the Simulation in BC it dosen't show the G-code when it stops for a tool change.
    the screenshot of the BC Simulation should be the same spot when it threw the reset.

    Similar Threads:
    Attached Thumbnails Attached Thumbnails what is wrong with the code?-screenshot-2019-07-31-17-35-23-a   what is wrong with the code?-screenshot-2019-07-31-17-55-10-a   what is wrong with the code?-screenshot-2019-07-31-17-59-46-a  
    David L. Aery
    www.hooksolutions.com


  2. #2
    Member metalmayhem's Avatar
    Join Date
    Jun 2018
    Location
    on my feet
    Posts
    129
    Downloads
    0
    Uploads
    0

    Default Re: what is wrong with the code?

    ditch the g91



  3. #3
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    183
    Downloads
    0
    Uploads
    0

    Default Re: what is wrong with the code?

    Ok,
    Am I reading this right, it looks like the problem was "Z 0.628" didn't move like it should have?

    Attached Thumbnails Attached Thumbnails what is wrong with the code?-screenshot-2019-07-31-17-35-23-a  
    David L. Aery
    www.hooksolutions.com


  4. #4
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    183
    Downloads
    0
    Uploads
    0

    Default Re: what is wrong with the code?

    so when it tried to do G 91 it threw the reset because it didn't come up before moving in x or y. I would like for it raise in Z and not move anywhere else. I have tried to figure out where it gets its xyz setting to move to. I have looked in Mach3 setting and haven't found anything that works or make a difference. every time when Mach 3 gets to the end of a program it moves to a spot that is relative to the job, not the same location xyz every time, so G91? relative to what?

    David L. Aery
    www.hooksolutions.com


  5. #5
    Member
    Join Date
    Feb 2013
    Location
    United Kingdom
    Posts
    659
    Downloads
    0
    Uploads
    0

    Default Re: what is wrong with the code?

    Quote Originally Posted by dlaery View Post
    In the Simulation in BC it dosen't show the G-code when it stops for a tool change.
    It's a steep old learning curve but CAM doesn't produce G Code, CAM produces a Move List, your Post Processor is used to interpret the move list and generate G Code.

    Start by explaining what you are trying to achieve and why you have chosen to use G91, until you do that what we have here is a mechanic who keeps coming back to the stores with a broken screwdriver and asking for a replacement without telling the store keeper that he's using it as a lever to lift a locomotive ;-)

    I quite like targeted ads if they're not intensely annoying so I'll enable ads when your advertisers stop using annoying sounds, annoying slideshows and annoying animations


  6. #6
    Member
    Join Date
    Feb 2009
    Location
    USA
    Posts
    183
    Downloads
    0
    Uploads
    0

    Default Re: what is wrong with the code?

    I only use G91 because that is what was in the millpost provided by Bobcad when i bought this 8 years ago. everytime I upgrade there are some changes that I notice in the millpost in the next versions. So are you saying the tool did not raise because of G91?
    then I will have to go into the millpost and figure out how to change that, seems easy.

    this is what it shows at the begining of that operation:
    Code:
    T2 M06 (14 EM)
    G90 S10000 M03
    G00 G54 X-2.1443 Y-1.075
    G43 H2 Z0.628
    M08
    Z-0.175
    Z-0.275
    G01 Z-0.375 F10.
    Z-0.3953
    G17 G03 X-2.1443 Y-0.925 I0. J0.075
    so it started out with G90

    I am just trying to figure out how to use a screwdriver.
    I remember a tool company that had guarantee on their screw drives, they would replace if they were broken, it they were bent or wore out they didn't replace them.

    David L. Aery
    www.hooksolutions.com


  7. #7
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    10305
    Downloads
    0
    Uploads
    0

    Default Re: what is wrong with the code?

    Quote Originally Posted by dlaery View Post
    I only use G91 because that is what was in the millpost provided by Bobcad when i bought this 8 years ago. everytime I upgrade there are some changes that I notice in the millpost in the next versions. So are you saying the tool did not raise because of G91?
    then I will have to go into the millpost and figure out how to change that, seems easy.

    this is what it shows at the begining of that operation:
    Code:
    T2 M06 (14 EM)
    G90 S10000 M03
    G00 G54 X-2.1443 Y-1.075
    G43 H2 Z0.628
    M08
    Z-0.175
    Z-0.275
    G01 Z-0.375 F10.
    Z-0.3953
    G17 G03 X-2.1443 Y-0.925 I0. J0.075
    so it started out with G90

    I am just trying to figure out how to use a screwdriver.
    I remember a tool company that had guarantee on their screw drives, they would replace if they were broken, it they were bent or wore out they didn't replace them.
    You did not tell it what to do
    G91 is just a mode Incremental move G28 is how it is going to move so would of needed a G0 or a G1

    G91G28G0Z0. This will work

    G91G28G1Z0F20. This will work

    And to make it as simple as it should be

    G0Z0. is all that is needed

    You should not use a G91 or a G28 unless you have an reason to use it

    Mactec54


  8. #8
    Member
    Join Date
    Feb 2013
    Location
    United Kingdom
    Posts
    659
    Downloads
    0
    Uploads
    0

    Default Re: what is wrong with the code?

    Quote Originally Posted by dlaery View Post
    I remember a tool company that had guarantee on their screw drives, they would replace if they were broken, it they were bent or wore out they didn't replace them.
    Yes, but it did say on the handle "Not for use as a pry bar or chisel"

    You can use the G Code commenter here - G-Code Commenter

    to tell you what most of your code is doing -

    T2 M06 (14 EM) ( T:Tool Number:2 M06:Tool change )
    G90 S10000 M03 ( G90:Absolute prog S:Spindle Speed:10000 M03:Spindle On )
    G00 G54 X-2.1443 Y-1.075 ( G00:Rapid positioning G54:Zero offset #1 )
    G43 H2 Z0.628 ( G43:Tool offset compensation positive H:Tool length offset index:2 )
    M08 ( M08:Flood coolant on )
    Z-0.175
    Z-0.275
    G01 Z-0.375 F10. ( G01:Linear interpolation F:Feedrate:10. )
    Z-0.3953
    G17 G03 X-2.1443 Y-0.925 I0. J0.075 ( G17:X-Y plane selection G03:CCW circular/helical interpolation I:X axis offset for arcs:0. J:Y axis offset for arcs:0.075 )

    I quite like targeted ads if they're not intensely annoying so I'll enable ads when your advertisers stop using annoying sounds, annoying slideshows and annoying animations


Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

what is wrong with the code?

what is wrong with the code?

what is wrong with the code?