Cartesian G-code to cylindrical machine coordinate

More
20 May 2014 00:41 - 20 May 2014 00:46 #47061 by eneuro
Hello,
Just need to move such CNC machine with LinuxCNC and 3axis CAM G-code which concept is showed below:
File Attachment:

But as we can see I will need translate XYZ cartesian CAM (G-code) to cylindrical CNC machine coordinates, while as shown above:
Z blue axis no need to do anything is the same
but
X,Y G-code needs to be translated to radius (R green color shows this machine part moving in this direction), however this 2nd axis rotates while whole machine should rotate to do the job-create big parabolic shape for a few meters in diameter solar CSP system.

I've installed latest LinuxCNC 2.5.4 and updated Ubuntu 10.04 and run a few Axis demo simulations and I think I need some hint how to deal with such conversions from cartesian G-code to cylindrical machine coordinates?
I saw sample LPT output pins configuration, but there was XYZ cartesian coordinates and have no idea how to configure LinuxCNC to output on LPT port signals for cylindrical coordinates lets say:
Z - no changes needed I guess (blue parts moving up-down)
Y - radius in cylindrical coords (green parts)
X - angle of rotation in cylindrical coords (red parts moving on yellow wheels lets say CCW)

Of course I know how to convert from cartesian to cylindrical coordinates system (en.wikipedia.org/wiki/Cylindrical_coordi...artesian_coordinates), but I would not like to do it in machine microcontroller software, but simply output on LPT pulses needed to move this I guess 3 axis monster ;)
Last edit: 20 May 2014 00:46 by eneuro.

Please Log in or Create an account to join the conversation.

More
20 May 2014 06:04 #47065 by andypugh
[quote="eneuro" post=47061But as we can see I will need translate XYZ cartesian CAM (G-code) to cylindrical CNC machine coordinates, [/quote]

Firstly, it is possible (in LinuxCNC) to use polar coordinates if you want to:
www.linuxcnc.org/docs/2.4/html/gcode_main.html#r1_1

However, this is no help to you in this case, as the effect there is to convert polar positions to XY moves, and you need the inverse.

Do you _want_ to control the machine in XY space? It would be very simple to configure the machine as an XZC machine, with X as radius Z as height and C as angle if that suits your code generation system.

It might be possible to configure your machine using genserkins (general serial kinematics) but I am not sure if the changes required to add sliding joints to that made it into the main release. It might be worth a look:
I have not managed to find any documentation for it though, so implementing it might be a puzzle all of its own.

Some basic information on kinematics modules is here: www.linuxcnc.org/docs/html/motion/kinematics.html

Please Log in or Create an account to join the conversation.

More
20 May 2014 06:42 #47069 by andypugh
After discussion on IRC:
Rotatekins might be close:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...hb=refs/heads/master

And you would want to be sure to use the built-in atan2 function:
en.wikipedia.org/wiki/Polar_coordinate_s...artesian_coordinates
The following user(s) said Thank You: eneuro

Please Log in or Create an account to join the conversation.

More
20 May 2014 17:59 - 20 May 2014 18:40 #47085 by eneuro

Do you _want_ to control the machine in XY space? It would be very simple to configure the machine as an XZC machine, with X as radius Z as height and C as angle if that suits your code generation system.

In this particular case with symetric parabolid shape created in my simply OpenGL CAE when soft material like styrofoam will be cut and maybe even heated close to parabolic surface and I do not need a big precision, maybe even using simple I2C serial port optoisolated interface I've developed and successfully tested eg. with MPU6050 using in this prototype quite slow optocouplers
File Attachment:

from regular PC Linux without LinuxCNC could to the job, while If I could be able to generate this rather simple tool path just rotateing this red part around Z axis like a shell and based on angle & radius position (green part) calculate vertical Z offsets (blue part) send it via I2C and let microcontrolers adjust Z tool position as fast as possible.
However, it could be nice to create for other projects classic G-code (eg. using HeeksCNC which I try to compile under latest LinuxCNC with Ubuntu 10.04 updated, but it looks like there were changes last time in libarea and its trunk version 113 is not stable at the moment I guess) and use LinuxCNC to convert this XYZ G-code on the fly to proper ZRA (Z Radius Angle) send to microcontrolers via LPT port.
I can still use my serial port I2C PC Linux <-> CNC machine interface while I2C can be run at very low speeds if needed to do not kill real time needed for LinuxCNC.
Even when I use XYZ cartesian system for thi sparabolic shape maybe the best option will be genarate G-Code myself, while i will be able maybe better adjust to its specific construction-this rotating red main part around Z axis.

Rotatekins might be close:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...hb=refs/heads/master

This looks like it could be the best option worth to try with LinuxCNC and looks like this is example of implementation of this hint that <IchGuckLive> gave me on IRC #linuxcnc channel yesterday
LinuxCNC -> Docs -> 1 Kinematics in EMC2 -> 1.3 Non-trivial kinematics

So, I think it is time to setup test real LinuxCNC PC, while I've installed under VirtualBox latest LinuxCNC 2.5.4 to practise its update and Ubuntu instalation with optional HeeksCNC build.

I will make smaller model of this concept machine, make PCBs to controll small DC motors with added encoders and will try to configure LinuxCNC and I guess HAL to try make it real B)

BTW: There will be a hole in the centre of this parabolic mirror, so there is no problem I can drill cylindric hole to support rotation center before main surface work.
Last edit: 20 May 2014 18:40 by eneuro.

Please Log in or Create an account to join the conversation.

More
20 May 2014 18:04 #47086 by andypugh
Is your machine conceptually a lathe?
Could it be a 2-axis machine with an uncoordinated rotary axis?

Please Log in or Create an account to join the conversation.

More
20 May 2014 18:26 - 20 May 2014 18:36 #47087 by eneuro

Is your machine conceptually a lathe?

en.wikipedia.org/wiki/Lathe
Rather something reverse, while I do not like or in some cases will not be able to rotate the workpiece on its axis.
In the case of this sample parabolic symetric shapes it looks like a lathe, but tools need to rotate, while I do not like to move the workpiece.
I'd like to add also some kind of horizontal position sensor in another bigger version to adjust to not perfect flat ground base, so create surface as close as possible to the project without need to precise workpiece mounting which can be a few meters in diameter.
There are a few projects it could be usable and this parabolic mirror shape is only one of them, but concept is the same-make something big (very often symetric with hole inside) using much smaller moveing tools ;)
Last edit: 20 May 2014 18:36 by eneuro.

Please Log in or Create an account to join the conversation.

More
20 May 2014 18:53 #47090 by andypugh

Rather something reverse, while I do not like or in some cases will not be able to rotate the workpiece on its axis.

If it is only ever going to make rotationally symmetrical things then I think you should configure it as a lathe.
Adding an encoder to the rotary axis might help, but isn't strictly necessary.

Try it as a lathe first. It's a much easier configuration.

Please Log in or Create an account to join the conversation.

More
20 May 2014 23:00 - 20 May 2014 23:01 #47102 by eneuro

Try it as a lathe first. It's a much easier configuration.

I will try create sample G-code for this symetric 3 meter diameter parabolic mirror surface with hole in the center directly from my CAE later and try to load it into LinuxCNC in simulator mode, while I was not able to run current (development version I guess) of HeeksCNC 1.0.0 under Ubuntu 10.04 inside VirtualBox-I had to disable 3D accelaration while LinuxCNC was not able to start with enabled and VirtualBox guest additions installed for higher screen resolution: 1024x768.
I Will try to test other Linux CAM software-maybe even BlenderCAM could do the job and create test G-code for the moment.

Just reading HAL tutorial linuxcnc.org/docs/html/hal/tutorial.html while I'd like to use halscope to catch what LinuxCNC sends to LPT port with hal configured.
It would be nice to bypass or modify halscope to log LPT I/O to text file.
I'd like to write something like hardware circuit simulator of my future PCB electronics which could respond to LinuxCNC LPT output and be able to set LPT input at response, but have no idea how to trigger it-maybe with HAL configured in its module?
It looks like it is posible to see what happends inside HAL on halscope
linuxcnc.org/docs/html/hal/tutorial.html#_triggering
Is it possible to bypass LPT inputs and set them using own software and pass this changed LPT inputs to LinuxCNC?
Last edit: 20 May 2014 23:01 by eneuro.

Please Log in or Create an account to join the conversation.

More
21 May 2014 06:27 #47126 by andypugh

It would be nice to bypass or modify halscope to log LPT I/O to text file.

You can export a Halscope trace to a file.
You can also log from HAL to a file directly:
www.linuxcnc.org/docs/html/man/man1/halsampler.1.html

Is it possible to bypass LPT inputs and set them using own software and pass this changed LPT inputs to LinuxCNC?

Yes, you can do almost anything in HAL.

Please Log in or Create an account to join the conversation.

More
21 May 2014 15:36 - 21 May 2014 18:17 #47144 by eneuro

Yes, you can do almost anything in HAL.

Just tried run some HAL stuff under VirtualBox from latest LinuxCNC Ubuntu 10.04 but it is not possible on my setup while latency test and running sample HALs makes system not able to respond to user interface, so it is time to setup LinuxCNC in a way it was designed on real hardware ;)

If we talking about what task this CNC machine have to do in solar parabolic mirror project there is mold I'd like to create using this developed machinery.
Solar parabolic 3m focus 1m mirrors 500 mold:
File Attachment:

It is about 0.600m high and has diameter of 3 meters, however focus can change.
I've created *.stl 3D file in my CAE and succesfully imported to Blender.
This mold will change a little bit, while there are a few overlaping triangles because of reflector thickness is not entered and not calculated, so final mold will have those triangles a little bit smaller with a few more beetween them, but it will look like this mold concept with up to 0.500m hole in the center based on use case.
So, this is why I'd like have this machine capable to do this transformation from cartesian XYZ space to its own-simply now while I have this STL mold file I could create G-code and make such prototype on many 3D prototyping machines, but the bigger the size the more logistics transport costs-it could be nice to be able create such molds in home, while I have another projects that could be done using such machine.
While I have 3D STL mold prototype, now I'm looking for tools to create G-code for my machine from first post.
It could be nice to make this latest HeeksCNC 1.0.0 working on Linux box.
For the moment maybe BlenderCAM will do the job.
However, I'd like to have CAM software under Linux and create tool paths like shell for this parabolic mirror projects while there is some symetry around Z axis.
If everything fails I will try create G-Code myself assuming this mold will be made from cuted cylindric or box (smaller prototypes) shaped workpiece soft materials.
Any references to good Linux CAM for this custom CNC machine to create cylindric tool paths in XYZ cartesian coords?
Maybe radius paths could be fine too, but it looks for me that moving this machine (red parts) around Z axis (X angle), and adjusting a little bit distance from the centre to bigger radius (Y) and blue (Z) depth is the best path in this case, but maybe I'm wrong?
Last edit: 21 May 2014 18:17 by eneuro. Reason: mistake

Please Log in or Create an account to join the conversation.

Time to create page: 0.155 seconds
Powered by Kunena Forum