realtime independent motor control with linuxcnc

More
11 Aug 2016 14:09 #78614 by giantstone
haha, I'm trying to build a fur cutter, the fur's surface is of random height.
that's right, I need to know how to convert a set of coordinates into G-code in X,Y and C offline, with C tangent to to the X,Y.

basically I guess you approved my approach to control the motion mode.

once I figure out how to convert the coordinates into G-code, how to start running the G-code all in one python script,
My problems will be solved.

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

More
11 Aug 2016 14:19 #78616 by giantstone
I m really grateful for your patience with me and your help, thanks =D

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

More
11 Aug 2016 14:30 #78617 by andypugh

haha, I'm trying to build a fur cutter, the fur's surface is of random height.
that's right, I need to know how to convert a set of coordinates into G-code in X,Y and C offline, with C tangent to to the X,Y.


I think that the combination of Gcodetools and Inkscape might work.
Gcodetools has a tangent knife option, I believe:
www.cnc-club.ru/forum/viewtopic.php?t=35
The following user(s) said Thank You: giantstone

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

More
11 Aug 2016 14:34 - 11 Aug 2016 14:36 #78618 by giantstone
well, to be clearer about what I'm doing, I'm building a fur cutter working in a pipeline/ in an assembly line, so I need to write a script that generate and execute G-codes automatically. The source information of the G-code is a set of coordinates or a depth image generated from another machine. :)
Last edit: 11 Aug 2016 14:36 by giantstone. Reason: poor english

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

More
11 Aug 2016 16:12 #78627 by tommylight
Skinning cats ??? :S
Pictures would be helpful, or we can run in circles as till now !
I build a certain type of cnc machines for engraving, up until 2 years ago only i was making them, as far as i know, now there are 2 more manufacturers making them, but you can find everything about them here or on cnczone.com, and i have even close ups of them posted so anyone can use the idea.
The moral of this story is: this is an open source forum so everything happening here should be open source.
It's been several days beating this topic, with no tangible results, as it is very hard to help when we have no idea what are we helping for.
Carpets would be easy if you need the same height on a certain length, fur coats are doable, but much slower and more complicated, skinning cats on a moving line ......... interesting problem i would not like to deal with, again doable but to much screaming !!! :laugh:
B.Th.W i have done some quite messed up setups for sponge manufacturing, styrofoam manufacturing, making some specific metal parts, with some of the shelf parts and pieces that are being used daily.
Ultimately, on this forum you have a sum of brain power to control the entire galaxy (J.T, PCW, Tod, Andy, and all the rest are extremely capable of solving problems), easily, but we need tangible problems to be able to give tangible solutions.

With utmost respect,
Tom

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

More
22 Aug 2016 15:00 #79253 by giantstone
Hi Badger, I downloaded inkscape and gcodetools, but I don't know how to use them,
I have a picture like this:

In the middle of the picture, gray area is a fur, and there are cutting lines on it as you can see.
I want to generate G-codes for the cutting lines. ( either directly from the coordinates of the cutting lines, or directly from this picture)
with C axis tangent to the cutting lines.

but I don't know how to do it.
I did experiments with the picture using inkscape, but I get crashes and errors.

could you teach me how to do it?
Attachments:

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

More
23 Aug 2016 00:28 #79288 by Badger
I am by no means very competent with Inkscape but here goes....Inkscape is a Vector Graphic program like Adobe Ilustrator, and should not be confused with a pixel based drawing or paint program like Photoshop or Gimp, nor is it a CAD program. It is not easy to enter lines by coordinates but I think you may be able to use a CAD program, save as .DXF and then import and edit in Inkscape.

There is a "tracing" option where you may be able to trace vectors out of a .jpeg image, like the one you attached, but your success may vary. Typically you need a little more contrast, which you may be able to adjust, and you end up with jagged lines. In Inkscape you can then 'simplify' the lines to straighten them out but it will probably change the line shape more than you want.

It looks like you have some fairly simple shapes that you have repeated across the fur and have nested them for maximum utilization. I don't think there is any easy nesting feature in Inkscape but its pretty easy to make duplicates and rotate, flip and move around to nest them.

Once you have your design go to ""Extensions", drop down to "Gcodetools" and then "tools library" and select Tangent knife. This will put a green text box on your drawing which you can drag off to the side and edit. You will need to use the text tool to change the scale from 1 to 57.2963 which converts radians to degrees which are easier to understand and use for me. You can then go back to extensions, gcodetools and select "path to gcode". it will then prompt you to set the coordinates which just hit "OK" and let it set the defaults to the lower left hand corner. When you have the "Path to Gcode" box open you will need to set some other information mainly in the "Preferences" tab such as file name, location where its going to be saved, set your units, for post processor you may want to select Round all values to 4 digits". You may also want to use the following in the "Additional Post Processor" field

regex("G01 A","G00 A");

which will speed up the rotation of you knife about its axis. Even though the correct usage of rotation around the Z axis probably should be "C", gcodetools is going to refer to it as "A", so set up LinuxCNC to use the A axis. Anyway that's what I do and it works for me. Switch back to the "path to gcodetools" tab and hit "Apply". Your gcode file should now be waiting for you in whichever directory you specified.

There is lots of Inkscape help available on their wiki and forums and stuff. For gcodetools you want to check out cnc-club.ru and look up the English Forum and then maybe Gcodetools? The forum doesn't seem to be very active at the moment but there is a lot of questions already asked and answered.

As another option, depending on how many pieces you need cut and you productivity, you may find it easier to use templates and a knife to cut the fur; You could make templates with a laser or cnc router out of metal or hardboard.

Good Luck.
The following user(s) said Thank You: giantstone

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

More
24 Aug 2016 03:22 #79346 by giantstone
Hi, Badger, thanks so much for your detailed instructions. I really appreciate.
I'm following your steps.
and I realised something uncertain.
Please take a look at my picture.
the fur's location and orientation will be different each time,
and when I import my dxf file into inkscape, I find it difficult to map the position of the dxf-drawing to the position of the real fur.
the cutting line in my image can be precicely the same as the cutting line on the real fur on my workstation ( the coordinates are the same).
how do I make sure the generated G-code perseves the location infomation?
Attachments:

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

More
24 Aug 2016 04:03 #79348 by Badger
I'm going to assume that you are creating a cut file for each different fur? Anyway what you probably want to do is select two points on you pattern that are at the edges. Jog the cutter to one coordinate and line the appropriate spot on the fur up to the cutter. Jog the cutter to a known location as far away from the first location as possible. Hold the fur at the first location and move the fur to line up the second spot to the cutter. Once you think you have everything correct you can run the program with the cutter up to make sure every thing goes where you want it. I do a version of this with the laser cutter if I will be near the edges.

If you put a switch on the Z axis enable you can easily run the program as written with the Z axis safely out of the was. If your drive doesn't have an enable feature you can try switching off power to the dive or switching off one wire to each coil going to the Z axis motor.

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

More
24 Aug 2016 05:34 #79349 by giantstone
yes, i have to creat a different cut file for each different fur.
the edge shape of each fur is sort of random as well, impoising further difficulty in localising the cutting lines.
well, this sounds very inconvinent, doesn't it.
I'm thinking to use image to G-code , and do the tangent part myself.

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

Time to create page: 0.118 seconds
Powered by Kunena Forum