Spindle parameter in tool definition

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
toolmaker
Posts: 11
Joined: Wed Mar 16, 2016 6:16 pm

Spindle parameter in tool definition

Post by toolmaker »

Hi All -- just got back into FreeCAD and the Path Workbench after not using it for a few years. The developers have made fantastic progress -- I'm really impressed and excited to use it more!

Here's a quick question -- In the tool editor dialog, what are the units of the Spindle parameter (which I have set to 100000.00)? Should that be in RPM? The G-Code which is produced yields a spindle speed of S3937.0079 RPM -- which is my entered value divided by 25.4. Is there perhaps a bug in the metric to imperial conversion so that it is converting RPM when it should not?

Thanks!
-Bill
Attachments
ToolEditor.png
ToolEditor.png (39.38 KiB) Viewed 1459 times
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Spindle parameter in tool definition

Post by sliptonic »

The units should be RPM and it's a straight pass through float value in the linuxcnc post processor. It might be manipulated in another post. Which one are you using?
toolmaker
Posts: 11
Joined: Wed Mar 16, 2016 6:16 pm

Re: Spindle parameter in tool definition

Post by toolmaker »

I'm using the linuxcnc postprocessor with the "--inches" argument. It looks like it might not handle an 'S' command any differently than anything else so maybe it's converting RPM when it should not?

This might be the relevant code section?

Code: Select all

            # Now add the remaining parameters in order
            for param in params:
                if param in c.Parameters:
                    if param == 'F':
                        if c.Name not in ["G0", "G00"]: #linuxcnc doesn't use rapid speeds
                            speed = Units.Quantity(c.Parameters['F'], FreeCAD.Units.Velocity)
                            outstring.append(
                                param + format(float(speed.getValueAs(UNIT_SPEED_FORMAT)), precision_string) )
                    elif param == 'T':
                        outstring.append(param + str(int(c.Parameters['T'])))
                    else:
                        pos = Units.Quantity(c.Parameters[param], FreeCAD.Units.Length)
                        outstring.append(
                            param + format(float(pos.getValueAs(UNIT_FORMAT)), precision_string) )
                            #param + format(c.Parameters[param], precision_string))
I haven't looked at it very closely, but perhaps it needs:

Code: Select all

                    elif param == 'T':
                        outstring.append(param + str(int(c.Parameters['T'])))
                    elif param == 'S':
                        outstring.append(param + str(int(c.Parameters['S'])))
                    else:
Thanks!
-Bill
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Spindle parameter in tool definition

Post by sliptonic »

Can you put your freecad info here? I think you might be running an old version.

It looks like that exact code is in the current post processor

https://github.com/FreeCAD/FreeCAD/blob ... #L320-L321
toolmaker
Posts: 11
Joined: Wed Mar 16, 2016 6:16 pm

Re: Spindle parameter in tool definition

Post by toolmaker »

I'm subscribed to daily but maybe I don't have the latest... ?

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12920 (Git)
Build type: None
Branch: master
Hash: 8faa9f38bb70a598afc2bc39ea1645d416ab057e
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Spindle parameter in tool definition

Post by sliptonic »

Looks like you're very current and that code has been in the post for quite a while. Perhaps you're using a local, modified copy of the linuxcnc post.
toolmaker
Posts: 11
Joined: Wed Mar 16, 2016 6:16 pm

Re: Spindle parameter in tool definition

Post by toolmaker »

Some sort of upgrade problem... Apt is pulling down:

freecad-daily_0.17~alpha1+git201801022222~ubuntu16.04.1_amd64.deb

That seems to be the most recent built package in the repo and seems to contain the old linuxcnc post?

Thanks for the help!
-Bill
Post Reply