Some controls allow you to scale the g-code up or down in size.
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:
- New Machine Build- Profile Rail Wood Frame Router, 25" x 37" x 6" working area
- G-code telling machine to go to "home" instead of custom zero point (Fusion 360 CAM)
- Problem- X Axis "Goes Off Pattern", "Awry", "Skewed", "Travels"
- Newbie- Post adds "A0." code and machine stops
- Newbie- Post adds "A0." code and machine stops
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)
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.
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
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?
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.
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
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.
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 ...
hello again, maybe code translation will work for you :
or a temp work coordinate shift ?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
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 ...
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