![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
SolidModel -> MeshCAM v3 [Windows and Linux/WINE] -> G-code -> TurboCNC v3.1a [DOS] I need to remachine a piece that's pretty good, but has an obvious mistake. Firstly, I am new to doing real CNC, and I'm doing it on my home-brew machine, and this is only my third piece, but it is also my largest and best-so-far, and I'd like to save it. The solid model was too big for MeshCAM: so I split it into two smaller models to be G-coded separately and combined later, into one G-code program that would yield a seamless model. Problem: After combining and only after machining, it was clear that MeshCAM had been misled (by me, who had used different Zmax values for each half of the model) about the Z=0 reference in the first part, such that the elevations of the first part are 0.1" higher than the second, and thus there is a 0.1" wall/offset at the join between the two parts, where it's supposed to be seamless. Question: What edits could be made to the first part's G-code so that it can be re-run to remove the 0.1" from the surface of only the first part and result in a seamless boundary at the interface to the second part, as intended? --- I suspect it might be done by a little "fibbing" about what the current value of Z is. For example, if TurboCNC sees an instruction to G01 Z-0.1, it will proceed differently if it thinks it's already AT Z=-0.1 than if it thinks it is at Z=0. Thank you for any insights, and extra thanks for an example. -- cnczane
__________________ -- Dan |
|
#2
| ||||
| ||||
I'm guessing though, that you'll still not get it perfect after re-machining.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| |||
| |||
| I'm just trying to make it look less like a piece of firewood. ![]() It's not as simple as change the Z BEFORE running the code; I simplified the example to try to give a clear picture. However, I need to change the Z INSIDE the code. Here's why. The "wall" is between two areas that should align. I'm not really keen to recut the entire first section (which your suggestion would accomplish) because it'll take hours and because I don't think my machine will be able to hold accuracy over the whole area again. Rather, what I'm anxious to try to smooth out the discontinuity over a span of rows: - to back off say 20 rows from the discontinuity - and remachine only that set of rows - while lowering the cutting depth 1/20th of the discontinuity before each pass In TurboCNC, my first try at this involved using G53/G92 because the TurboCNC manual said: " G92 This code sets the position of any or all axes to a specific value. Use this to reset the position inside a program. No motion will occur." and " You must be in the master coordinate system [G53] to use this code. All of the other offsets (1-20) follow the master. Ergo, if the origin in offset 1 is set to be exactly 3" away from the master origin (in G53 mode), then that relationship is maintained as the master origin moves. " Use jog mode to setup the coordinate offsets (tool offsets) and save them through the file menu. This command is not modal in versions 3.1 and up." and " This code sets the position of any or all axes to a specific value. Use this to reset the position inside a program. No motion will occur. " In machine coordinate (G53 T0) mode, the machine coordinates themselves are updated. " In any fixture offset mode (G54-G59) and T0, the fixture offset is updated. " In any tool offset mode (T1-T20), the tool offset is updated. " This code is not modal." I didn't set any offsets, and assumed they defaulted to 0. Thus, T1-20's coordinates would be identical to T0's. I tried: M03 (STOCK/BLOCK, 16.496, 11.25, 0.406, -0.000, -0.000, 0.406) ... ; END ROUGH ; FINISH PARALLEL X (TOOL/MILL,0.1250,0.06250,1.000,0.0) M6 T5012500 ; FINISH PARALLEL X S 3rd G00 X0.000 Y0.002 Z0.020 G01 X0.000 Y0.002 Z-0.164 F5.0 G01 X0.004 Y0.002 Z-0.164 F20.0 ... G01 X16.496 Y3.161 Z-0.158 ; note ending Z=-0.158 ; ROW 51, nom. - btwn Sections 1 and 2 at ROW 70, a Z discrepancy of -0.04" ; resulting in an apparent "wall" at Row 70 ; begin "adjusting Z" to take out an extra 0.002" in the next 20 rows (20*0.002=0.04) G53 ; must be in "Tool 0" mode (abs.) for G92 command to be recognized ; redefine Z 0.002" higher than where it ended, causing Z to be cut deeper G92 Z-0.156 G01 X16.496 Y3.163 Z-0.158 ... etc. This approach failed because, I think, of my M6 T5012500 line. I always understood the "T" part to be an arbitrary string (in MeshCAM), to help me identify which tool was being called for in a tool change. (I do remember wondering why it would only take numbers...) I've been encoding my tool names like this from Day One, long before I ever had a machine to work on. "T5" tells me it's a ball-end, "0125," 0.12500". In looking at why my G53/G92 failed, my reading now suggests that "T" is an actual G-code which not only prompts the user for which tool to change, but also changes to that tool's coordinate system(?). G53/G92 are for "T0". I should state that I don't zero my two tools and set any tool offsets before I run the code. Because I have only one tool change (from 1/2" rougher to 1/8" finisher), I wait for the M6 "tool-change" command and zero the finisher at that time. I've been using M6 to pause the machine to alert me and to permit me to change tools but now I think M6 has also been telling the G-code interpreter to "switch to the '5012500' coordinate system." G53/G92 may have changed "T0"s position, but they did nothing for "T5012500"s. My next try will be to redefine my finish tool to say T2 and to use: ... G01 X16.496 Y3.161 Z-0.158 ; Note, machine thinks it's at Z=-0.158 M6 T2 G55 ; change T2's coord. system G92 Z-0.156 G01 X16.496 Y3.163 Z-0.158 ; machine thinks it's at Z=-0.156 so will cut -0.002 ...
__________________ -- Dan |
|
#4
| ||||||||
| ||||||||
M6 T5 means change to tool #5. Generally, people use tool numbers from 1-255 or higher, if they have more.
G92 can offset the G53 coordinate system. It really doesn't matter which tool is currently active. However, if you have a tool length offset applied, it appears that this offset may be changed to reflect the G92 offset.
As stated before, G53 is the machine coordinate system. Generally, cutting is done in a work offset coordinate system (fixture offset), typically G54 through G59. Each system contains XY and Z offsets, which are relative to the G53 coordinates, which can be modified by the G92 offsets. Confusing? If the Work Offsets are zero, the the work offset system is the same as the G53 system.
Set the Z offset in your G55 system to -.156, and just switch to G55 when you change to T2. No need to mess with G92.
What I would do, is make a copy of the g-code, and edit out everything you don't need. Then just change the Z zero, and run only the code that you need.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#5
| |||
| |||
| It'll take a while to digest this, but I am sure the answer is in your long reply. I just came back to report that my latest attempt: G55 G92 Z-0.156 complained that "Must be in T0 mode to use this command [G92]..." or something like it. Many thanks.
__________________ -- Dan |
| Sponsored Links |
|
#6
| ||||||||
| ||||||||
![]()
nor how to start in the G54 system, (but that part I suspect is just the G54 command). Do I define these offsets in TurboCNC setup BEFORE I actually load and run the code?
I think I need to be able to (re)set the Z offset in G55 on-the-fly, inside the program to do this.
__________________ -- Dan |
|
#7
| |||||
| |||||
Fixture 1 = G54 Fixture 2 = G55 and so on. To start in the G54 system, just put a G54 at the start of your g-code, or use the MDI window (F9) and type G54. You can change during the program by just calling the new offset (fixture).
It looks like you only get 6 offsets (fixtures) in TurboCNC, so they are not really a viable option. Here's what you could do. Between each "row", in your g-code, use G92 to lower the axis .001. When the row finishes, move to Z0, and use G92 to set the position to -.001. If you need to move up out of the way first, you could move to Z0.5, and G92 to Z.499. So between each "row" of g-code, you'd do this: G0 Z0.5 G92 Z0.499 It looks like you'll want to be in G53, and use T0 for all cutting. This makes it less confusing, then switching tools. Although you may be able to do this: T0 G0 Z0.5 G92 Z0.499 T1 (or whatever tool you're using)
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#8
| |||
| |||
| Well, it worked pretty well, but it was a nail-biter until the very end when it became clear that the calculations were close. For each of the 40 rows prior to the 0.04" discontinuity, I did something like this. M6 T0 ; I had just the one tool, so I renamed it T0, and skipped trying to figure out G54, etc. ... G01 X... Y... Z-0.150 ; I take note where last row ended M00 ; I inserted a pair of pauses so I could confirm that the Z values were actually changed by the G92 G53 G92 Z-0.149 ; reset Z-axis up 0.001" M00 ; Z changed by +0.001"? G01 X... Y... Z-0.150 ; which causes this to be cut 0.001" deeper than it would have been ... Thanks for ALL the assistance.
__________________ -- Dan Last edited by cnczane; 07-25-2011 at 10:47 AM. Reason: add some comments to the code |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help!- Machining 1" wide x 2-1/4" deep slot | midguard | General Metal Working Machines | 4 | 02-15-2011 05:15 PM |
| Need Help!- Fanuc 11m Spindle drive code 11: "DC Link Voltage High" | cwtoyota | Fanuc | 2 | 04-09-2010 10:56 AM |
| Need Help!- Heidenhain TNC2500 or TNC360 Teksoft Post Processor " G " code ISO | RMARCH | Bridgeport and Hardinge Mills | 0 | 06-11-2009 11:51 AM |
| Just IN- MIKINI MECHATRONICS - NEW CNC MACHINING CENTERS 16"x10"x16" 2000 lbs Linear Rail | MIKINI MECH | Product Announcements & Manufacturer News | 23 | 02-25-2009 03:49 PM |
| Newbie- Post adds "A0." code and machine stops | lookingforhelp1 | Fanuc | 10 | 08-29-2008 12:58 PM |