Problem G-code "bigger" than machine area


Results 1 to 9 of 9

Thread: G-code "bigger" than machine area

  1. #1
    Registered
    Join Date
    Dec 2007
    Location
    Serbia
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default G-code "bigger" than machine area

    Hi,
    I have some g-code files written for bigger machine.
    I want to subtract the same number from each X coordinate in the file, so the code will fit into my machine.
    Doing this manually is a enormous job.
    Does someone knew how to do this automatically?
    Here is an example in attachment.

    Any help will be appreciated.
    mrpeja

    Similar Threads:
    Attached Files Attached Files


  2. #2
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    Some controls allow you to scale the g-code up or down in size.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Member CitizenOfDreams's Avatar
    Join Date
    Nov 2012
    Location
    USA
    Posts
    1267
    Downloads
    4
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    Do you want to scale the part or shift it? If you want to shift it, just change the origin on the machine itself and leave the G-code file as is.



  4. #4
    Registered
    Join Date
    Dec 2007
    Location
    Serbia
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    Hi, CitizenOfDreams,
    Thanks for fast reply.
    I want to shift the part.
    Because machine's mechanical area is so small that I can't change the origin on the machine itself, it is still near to mechanical limit at the beginning and
    biggest X axis coordinate feeds into another mechanical limit switch.
    There is some margin incorporated in code during generating G-code file(about 0.3 inch) and I want to substract this amount from each X number.
    Is this possible (but not manually)?
    mrpeja



  5. #5
    Member CitizenOfDreams's Avatar
    Join Date
    Nov 2012
    Location
    USA
    Posts
    1267
    Downloads
    4
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    Subtracting a fixed number from all the X coordinates would have exactly the same effect as shifting the machine origin. How much X travel does your machine have?



  6. #6
    Member
    Join Date
    May 2005
    Location
    canada
    Posts
    1662
    Downloads
    0
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    If you need to split or scale gcode G-Code Ripper can do this. Don't worry his software is safe (no virus) and reliable
    Link below:
    G-Code Ripper

    Anyone who says "It only goes together one way" has no imagination.


  7. #7
    Registered
    Join Date
    Dec 2007
    Location
    Serbia
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    My machine has travel up to 19 inch and in another file (not this I have sent) there is coordinates up to 19,5 inch.
    I have G-code ripper already downloaded, but didn't realize how to shift origin, yet.
    Shift or split?
    Maybe some help?
    mrpeja



  8. #8
    Member CitizenOfDreams's Avatar
    Join Date
    Nov 2012
    Location
    USA
    Posts
    1267
    Downloads
    4
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    I still do not understand why you are insisting on shifting the coordinates in the g-code and not on the machine. If your file goes like this:

    G0 X7000.0
    G0 X7005.0

    you can still run this file as is on a 5-inch machine by setting the machine's origin to X=7000.



  9. #9
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4131
    Downloads
    0
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    hi mrpeja, i hope i got it rigth : pls check attached, about shifting X coords of your file

    you may split your code and shift each fragment, or leave the fragments as they are & shift the origin of the program ( like put the origin out of the machining area )

    also, there are other solutions, like :
    ... creating the program in the right way from the start, so to avoid later editing time; a cam that can restrain a toolpath inside a perimeter should do the job
    ... replace X15.456 with X=common_variable+15.456, and initialize the common variable with the desired translation value; this is faster then editing the entire code content

    kindly

    Code:
    M3
    N4571 T5 M06 S0 
    N4573 G81 X-14.872 Y0.591 Z-0.2800 R0.0500 F12.00
    N4575 X-14.469 
    N4577 X-19.518 
    N4579 X-19.921 
    N4581 X-24.567 
    N4583 X-24.97 
    N4585 X-29.616 
    N4587 X-14.872 Y7.795 
    N4589 X-14.469 
    N4591 Y-21.801 
    N4593 X-14.872
    N4595 X-19.518
    N4597 Y-22.205
    N4599 X-19.921
    N4601 Y-21.801
    N4603 X-24.567
    N4605 Y-22.205
    N4607 X-24.97
    N4609 Y-21.801
    N4611 X-29.616
    N4613 Y-22.205
    N4615 Y-14.596
    N4617 X-24.97
    N4619 X-24.567
    N4621 X-19.921
    N4623 X-19.518
    N4625 X-14.872 
    N4627 X-14.469 
    N4629 G00 X-14.469 Y15.404 Z0.0000
    M02 
    M30


    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  10. #10
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4131
    Downloads
    0
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    hello again, maybe code translation will work for you :

    Code:
     
      ( this is your code, edited )
    
        #500 = - 30 ( translation value )
    
    
        M03
        T5 M06 S?
        G81 X=#500+15.1280 Y00.5910 Z-0.2800 R0.0500 F12.00
            X=#500+15.5310
            X=#500+10.4820
            X=#500+10.0790
            X=#500+05.4330
            X=#500+05.0300
            X=#500+00.3840
            X=#500+15.1280 Y07.7950
            X=#500+15.5310
                           Y08.1990
            X=#500+15.1280
            X=#500+10.4820
                           Y07.7950
            X=#500+10.0790
                           Y08.1990
            X=#500+05.4330
                           Y07.7950
            X=#500+05.0300
                           Y08.1990
            X=#500+00.3840
                           Y07.7950
                           Y15.4040
            X=#500+05.0300
            X=#500+05.4330
            X=#500+10.0790
            X=#500+10.4820
            X=#500+15.1280
            X=#500+15.5310
        G00 X=#500+15.5310 Y15.4040 Z0.0000
    
    
      ( M02 )
    
    
    M30
    or a temp work coordinate shift ?

    Quote Originally Posted by mrpeja View Post
    ... but didn't realize how to shift origin
    pls share machine and control : if you are lucky, someone will give you the right codes / kindly

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  11. #11
    Registered
    Join Date
    Dec 2007
    Location
    Serbia
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default Re: G-code "bigger" than machine area

    Hi, deadlykitten,
    Thanks for the reply. I think this will be the solution if Mach1 (Weeeery oooold!) can understand code translation. I must look in manual for Mach1.
    If someone already knew, please let me knew me to.
    By the way, my machine is homemade.
    mrpeja



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

G-code "bigger" than machine area

G-code "bigger" than machine area