Kinematics Module for ijk Gcode
G01 X35.18 Y88.176 Z-17.485 I-0.318138 J-0.256624 K0.912651
The ijk's above are not the same ijk's as used in G02 and G03 arc motions.
The idea is, if I can use ijk to command the orientation of the tool, my gcode is machine portable. This is not the case with abc gcode. For example, if my machine is xyzbc, but the gcode is xyzac, then I should be able to hit the same toolpaths, but my machine won't act correctly. If both machines understood ijk gcode, they could both run the same program.
The math is very close to being the same for all 5 axis configs and spindle orientations. With just a little touch up, this same math can be used for all 5 axis machines, or even made into a single kinematics module for all 5 axis ijk machining.
I would like some help with compiling a kinematics module. I know the math. Or most of it. I don't know C++ or Linuxcnc. I've looked around for help with the kinematics module, but, not being a programmer, I can't figure it out. I have attached pseudo code. It's very pseudo.
The main outline is this:
1, "read in" machine specific dimensions from a config or ini file.
2, calculate b and c (or whatever your machine needs) from ijk
3, create quaternion rotations for b and c (or whatever your machine needs)
4, sum vectors in the b frame that are to be rotated by b
5, rotate b vectors by b quaternion
6, sum vectors in the c frame that are to be rotated by c
7, rotate c vectors by a "total" quaternion
8, sum all the rotated vectors
9, cause the machine to move to resulting xyzbc.
for inspration:
blog.hurco.com/blog/bid/309807/5-Axis-Pr...ng-with-tool-vectors
stretch goal:
I've looked at this. I really need help if the a,b, or c axes aren't perfectly aligned with x,y, or z. In fact, I know what i'm posting now will not work if a,b, or c aren't perfectly aligned with x, y, or z.
Please Log in or Create an account to join the conversation.
with G12.1
you can have TCP
without the IJK
it siimply connects the kinetic with tha axes
so under M128 As of Hermle you see all joints moving while only on Gcode axis is programmed
it is a real Toolcenter positioning system as of 2.9 master relese
Please Log in or Create an account to join the conversation.
without the IJK
ijk is the whole point of my post. I'd like to use the same 5 axis gcode on different machines.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1441
It isn't nessisary with Linuxcnc now. It can calculate the tools orientation and position with ordinary industry standard 5 axis g-code.
Please Log in or Create an account to join the conversation.
Yes, it's true it isn't necessary. To run 5 axis gcode on different machines, all you have to do is reconfigure your post processor to have it generate the proper abc combinations unique to the machine you intend to use, and choose a very strategic origin. The added benefit of ijk is we can all email our 5 axis code to each other without regard to how anyone's machine is configured.
I'm not asking anyone to help me raise the Titanic. I have the math mostly figured out, I'd just like help with C++ and compiling a kinematics module. I really truly did try hard to figure it out myself reading the documentation. It's time for me to reach out of help. I don't mind doing the hard work. I'm sure I'll be reading all about C++ tonight. I've never done it. Sure, I've compiled things before, but not a kinematics module to Linuxcnc.
Please Log in or Create an account to join the conversation.
This might not be as hard as it sounds, LinuxCNC supports pluggable interpreters. You would just need to edit the valid words associated with G01 ad G00 in a copy of the existing interpreter.
there is a demo config sim/axis/canterp that uses a simple example of an alternative interpreter. It takes input files that look like this:
github.com/LinuxCNC/linuxcnc/blob/master.../canterp_example.can
Try the sim, it ought to run despite not using anything at all like G-code.
But: A simpler solution would be to make an input filter that converts G01 IJK and G00 IJK to ABC.
linuxcnc.org/docs/2.8/html/config/ini-co...html#_filter_section
What does the IJK code look like for arc moves?
Please Log in or Create an account to join the conversation.
For arc moves, I think you don't. The code I'm used to seeing is small linear moves to the next point/orientation. You set how close or far apart these points are before you generate your toolpath in cam software. I don't have any handbooks or information about what Hurco or Fanuc does for 3d arcs. I've used 6 axis robots that have 3d arcs, but they never ever tell you how they do it. It's proprietary. What the user does, is set the starting point/orientation, the ending point/orientation, and some auxilliary point/orientation along the path. There's all kinds of notes to not "trust" what's going on between these points. There are some brilliant people over at robot forums that might know.
Please Log in or Create an account to join the conversation.
When you said "try the sim," I heard vismach :-P This might be a better place to try out my python maths. I read some forum and wiki things, but I'm still ignorant. Again, I don't mind doing the leg work, but I'm having a hard time figuring out vismach. What's the current path to understanding it? For example, one issue I have is, my machine config won't run unless it's hooked up to my Mesa, and all the stuff is powered up. Can I somehow get the Axis sim to run a vismach? I got to the point where it the wiki says
set up own script
Type in a Terminal (where "my_machine stands" for your deserved name):
sudo su
cp /usr/bin/5axisgui /usr/bin/my_machine_gui
chmod +x /usr/bin/my_machine_gui
But it won't work form me because LinuxCNC won't run my machine unless it's all physically plugged in and powered up. I tried to pncconf with no boards, thinking I would get a simulator, but that didn't work.
Does it make any sense to involve vismach? It might be possible to get it to understand my python. I'd like to learn it at some point anyhow. So, any help in understanding vismach would be greatly appreciated. In fact, I wouldn't mind "paying" for vismach help with giving back some Haas vismachs. They put a lot of cad of their machines online. If I knew vismach, I wouldn't mind getting it running for a Hass or two.
Please Log in or Create an account to join the conversation.
so its only up to you to get the G-code for the part to the mashine you build
This means your CAM and Cam output words in combination
Dont frear the build
it is easy if you can decide the Axis combination and posithon // sutch as Bottem Center zero
but the new master will also do main offsets
www.youtube.com/results?search_query=linuxcnc+5axis+offset
Please Log in or Create an account to join the conversation.
Does it make any sense to involve vismach?
Only if you want a virtual machine to visualise what you are working on. It is probably as much work again to make the Vismach as it is to get the real machine working, but it cost less when it goes wrong.
The Vismach docs are here:
linuxcnc.org/docs/devel/html/gui/vismach.html
Though the basis if that page was pretty much just the notes I made, and the things I discovered, when making my own Vismach model to demonstrate the carousel component.
Please Log in or Create an account to join the conversation.