Configuring EMC to substitute U for A in gcode

More
21 Aug 2012 01:51 #23454 by Gadget047
Thanks to the great help here I got the fourth axis working as desired.
Now I need to know if there is any way to configure EMC to take all Gcode lines with A as the axis designation and change it to U. The software I use generates the fourth axis feeds as axis A and EMC is looking for U now. I could just use Gedit to change all but it would be easier if EMC just makes the change on the fly.
Thanks,
Dan

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

More
21 Aug 2012 08:38 #23462 by andypugh
Gadget047 wrote:

Now I need to know if there is any way to configure EMC to take all Gcode lines with A as the axis designation and change it to U.


You know, it might have just been easier to change the Axis A SCALE so that the answer came out in mm/inch rather than degrees.

But: You can configure LinuxCNC to pass files through a filter before loading them:
www.linuxcnc.org/docs/html/config/ini_co...sub_filter_section_a
It ought to be moderately simple to pass the files through some cunning script to swap all A[Number] to U[Number]
Possibly job for awk.

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

More
21 Aug 2012 08:43 #23463 by andypugh
This mailing list thread discusses almost exactly the same question, and had filter script examples.
thread.gmane.org/gmane.linux.distributions.emc.user/28010

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

More
21 Aug 2012 14:02 #23478 by Gadget047
andypugh wrote:

Gadget047 wrote:

Now I need to know if there is any way to configure EMC to take all Gcode lines with A as the axis designation and change it to U.


You know, it might have just been easier to change the Axis A SCALE so that the answer came out in mm/inch rather than degrees.
.

I thought AC and E were always angular. How would you go about changing A to linear. That still might be a better solution.

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

More
21 Aug 2012 14:47 - 21 Aug 2012 14:48 #23483 by andypugh
Gadget047 wrote:

I thought AC and E were always angular. How would you go about changing A to linear. That still might be a better solution.


Can you explain why you think it matters?

I am not sure it makes sense to have the extruder as a linear axis, as that means that it gets included in the tool speed calculations (Actually, I don't think that UVW are included)

You could leave A as angular and set the scale to steps per mm of filament rather than steps per rev or per degree.

However, you can also set the A axis to LINEAR in the INI file. I actually have no idea what effect this has.
www.linuxcnc.org/docs/html/config/ini_co...d_sub_axis_section_a
Last edit: 21 Aug 2012 14:48 by andypugh.

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

More
21 Aug 2012 14:55 #23489 by Gadget047
The program that slices the stl file feeds the filament in mm. The hob drives the filament and is calculated by how many mm's are moved by one revolution of the hob gear. Much like how many mm's per turn in a lead screw. The slicer program has a multiplier that can adjust the feed based on your results but are calculated for feed in a linear movement. With angular movement the multiplier gets way out of wack and makes it very difficult to determine the best feed rate.
Bottom line is the slicer program is best suited for linear movement calculation. I wanted to keep it apples to apples to keep things simple.
I'm new at 3D printing so it's possible I'm attacking this the wrong way but it made sense to me to keep things the same between the slicer program and the CNC program.

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

More
21 Aug 2012 15:41 #23492 by andypugh
Gadget047 wrote:

The program that slices the stl file feeds the filament in mm. The hob drives the filament and is calculated by how many mm's are moved by one revolution of the hob gear.

You can still do that with a rotary axis. LinuxCNC wouldn't even know if you calibrated an angular axis in furlongs.
But, if it makes you feel better, you can set [AXIS_3] to LINEAR.
The trick is to set the SCALE for that axis correct, but that is steps-per-mm-of-filament, and will work the same regardless of whether the axis is set to angular or linear.

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

More
21 Aug 2012 16:10 #23496 by Gadget047
I've been playing with the scale this morning. I have two working configurations now. One using A with angular movement and the other with U and linear.
I tried setting axis 3 to linear before with A but still got the angular indicator in the GUI. I'll play with it and see if I can get A to move the correct amount using scale. Either way, I'm happy with the configurations and am ready to start printing now. Sure is a lot to learn with Linuxcnc but it's really a great program once you get the hang of it.
Thanks again for all your help.
Dan

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

Time to create page: 0.085 seconds
Powered by Kunena Forum