I am dissecting some G-Code created from Fusion 360 with the ultimate goal of creating a quick way to do simple function, like route a line, or a circle or a set of holes. Nothing complicate, just I find that when in the shop I sometimes want to do something quick and easy and don’t want to load Fusion 360 and go through all the steps.
I think I understand the code, however I have one question on code at the top of the file.
The S18000 sets the spindle speed (not important as I don’t have a spindle) (yet…)
G54 sets the fixture offset.
G0 X0 Y0.15 is a rapid move
G43 Z1 H5 - I know the G43 is a Tool Length Offset, however what is not clear is the H5 portion. How is the value set for H5, is this done on the controller, or is this another command that is there, but not really used.
Is this true that OneFinity does not keep track of a tool table and thus ignores these H offsets?
Yes it is true. When you set your tool to Z0 with the probe or by paper method or whatever, that value is stored in the one and only Z offset register.
Even people that use multiple tools in the same Gcode file have to stop and touch off the next tool to Z0. Then that new tool’s offset gets put in the one and only register.
So the controller knows when G43 is called to get the offset from that register - no matter what number is called by H. You may even be able to leave the H off all together - though I have never tried it.
I have programs that have H1, H2, H3, etc. Fusion spits these out automatically. But nothing changes on the controller. Z0 is set the same way.
What you mean here are the parameters #5211, #5212, and #5213 for X, Y and Z offsets that you can also see in the “offsets” column on the control page. They are filled by the probing routine which calls G92, or you can call G92 directly to set the workpiece zero directly in the command entry field of MDI tab.
then what do you think of this? The tool offsets are correctly stored in the parameters #5401 ff, which is part of the tool table, and applied when the new tool is selected with Tx M6, or by G43 Hx, as I showed by trying it out. They are stored separately and not ignored, but applied.
When I do G43 H1, the tool offset is 12 mm because I loaded the tool table with 12 mm for tool 1.
When I then do G43 H2, the tool offset is 14 mm because I loaded the tool table with 14 mm for tool 2.
Does not seem to me that the tool specified with H is ignored. In fact the Onefinity Controller does keep track of the tool table and honors the H value on G43.
After having defined a tool Nr. 3 with 16 mm Z tool offset and having selected it with G43 H3, and having homed the machine, the offset in the offset column is 16 mm.
If you then request the content of the Z offset register, it is NOT 16, but 0 (!).
If you then request the content of the tool table, Z offset for tool 3, it shows 16.
So it’s clear that what the Buildbotics/Onefinity Controller shows here in the “offsets” column is not the offset you set by probing Z (as this offset register is 0), as most users would expect, but an offset that is clearly from the tool table, from the entry of tool Nr. 3. Voilà.
Note that the tool in the status table is still 2, because this tool was selected previously and I did not yet do T3 M6. If I do, the selected tool will change to 3. So G43 Hx sets the tool offset from the tool table, but only Tx M6 selects the tool then.
Thank you for that. So there is a tool table, but what good would it be without a toolchanger. Each new tool you put in will have to be reset when you put it in. You cannot preset any tools.
I am thinking that this is something that the buildbotics controller had but the onfinity fork didn’t need - however they just left it in but don’t expect anyone to use it.
The way Fusion 360 posts out programs is like this:
(T2)
N25 S14000 M3 M0
N30 G54
N35 G0 X1.9132 Y1.9905
N40 G43 Z1.225 H2
So the T number is commented out and there is no M6. So if I understand your findings correctly since there is no M6 called the tool table will not have any value put in it. Thus all calls by H - H2 for example - would return 0?
Which would get back to my original understanding that there is only one place that the Z offset is kept - #5213 as you discovered - and G43 will get the value from there even if no H number is called?
This discussion would of course be interesting to someone trying to put a toolchanger on, however to the majority of us I think it can be safely ignored. I am willing to be corrected however.
no, as I explained (unfortunately also in the post in the other thread) is that there are not only one register that can store a Z offset, I showed two different registers, the usual workpiece origin offset (#5213 for Z), and the tool length offset in the tool table (#5403 for Z) which changes according to which tool is selected with Tx or with G43 Hx. Both are shown in the “offset” column on CONTROL page when they are in effect.
If the g-code output of your favourite CAM program does not issue M6 commands, you probably have not set it to do so. I know Carbide Create puts the tool number in a comment because it is only honoured by their own CNC software, but with a modifying script you can change the comment with the tool number easily to M6 Tx. But I know Fusion360 exports g-code with M6 Tx commands if it is set accordingly. Look if you find the setting and you will see that the tool number is honoured by the Onefinity Controller.
Also you don’t forcibly need an automatic tool changer to benefit from the tool numbers. You don’t know my ‘tool-change’ routine for manual tool change on the Onefinity Controller? It pops up a window which asks the user to insert the tool by its number, according to the T value given by the program.