Fusion 360 post issues (maybe?) on 2 axis lathe conversion

More
22 Oct 2023 05:28 - 22 Oct 2023 05:39 #283478 by jimmyrig
Hey Everyone almost through a Rockwell lathe conversion and im having issues running gcode generated from fusion 360.It'll run just fine till it hits a g01 and freeze.......like its waiting for something to happen before starting the move. I have tried a g01 in mdi and it works fine...... so obviously its something wrong with my code. Freezes on the last line.
I included my setup files and have a few different gcode files i tried. both with constant sfm and without. I didnt notice a change.
Any ideas i am stumped.
Using the default fusion 360 emc2 turning post.

 Thanks!

edit
I am running the linuxcnc default build with 2.8.4 with gmoccapy for the ui with a mesa 7i96s

Code Below


LATHE TAKE 4)
N10 G7
N11 G90 G18
N12 G20
N13 G53 G0 X0.
N14 G53 G0 Z0.

(PROFILE ROUGHING2)
N15 T1 M6
N17 G90 G95 G18
N18 G54
N19 M8
N20 G97 S1000 M3
N21 G0 X1.175 Z0.125
N22 G96 D1000 S8255 M3
N23 G0 Z0.005
N24 X0.3555
N25 G1 Z-1.8825 F0.508
Attachments:
Last edit: 22 Oct 2023 05:39 by jimmyrig.

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

More
22 Oct 2023 06:14 #283479 by jimmyrig
Found the issue i think, through chopping the code up to see what was causing the issue. 

g95 is getting thrown in which per manual.... only works when the spindle speed is known...... not sure why this is strictly required. A rough approximation via S1000 should be good enough??? we arnt threading here. 

G95 - is Units per Revolution Mode In units per revolution mode, an F word is interpreted to mean the controlled point should move a certain number of inches per revolution of the spindle, depending on what length units are being used and which axis or axes are moving. G95 is not suitable for threading, for threading use G33 or G76. G95 requires that spindle.N.speed-in to be connected. The actual spindle to which the feed is synchronised is chosen by the $ parameter
 

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

More
22 Oct 2023 06:34 #283481 by jimmyrig
Its 2am here so i might be crazy at this point but it looks like something funny is going on around here

linuxcnc.org/docs/html/man/man9/spindle.9.html
According to the spindle docs it should be able to get the speed via a simulated encoder. 
However when pulling up the spindle.0.speed-in value on hal show i get nada. Spindle.output shows 1000 rpm (what i am testing at)

So maybe it wasnt configured via the pncconf wizard
added "sets spindle.0.simulate-encoder  true" to the hal file and no luck. Threw error at lcnc startup. 

Will take a look again tomorrow. g

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

More
22 Oct 2023 06:49 #283482 by JPL
FYI: If you open the fusion360 tool library and then select a given tool you will find the  option "Use feed per revolution" in the "Feed & Speed" tab. Selecting this will generate G95 for this given tool. un-selected will generate G94 instead. Note that this is a per tool setting. You may then end up with a mixture of G94 and G95 if multiple tools are used in the same program. 

Likewise, selecting "Use constant surface speed" will generate G96  (Instead of G97)
The following user(s) said Thank You: jimmyrig

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

More
22 Oct 2023 11:54 #283496 by andypugh
You do need a spindle-speed-in for G95 to work.

You probably don't need a simulated encoder to achieve this. You can just connect spindle.0.speed-out to spindle.0.speed in in the HAL.

But, it would be much better to have an actual spindle encoder. There are many ways to get one set up, including using a gear in the head and a gear tooth sensor.

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

More
22 Oct 2023 16:51 - 22 Oct 2023 16:53 #283513 by jimmyrig
Ahhhh, thanks Jpl for the detailed explanation. I was only changing one of those not both.
Last edit: 22 Oct 2023 16:53 by jimmyrig.

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

More
22 Oct 2023 16:57 #283514 by jimmyrig

You do need a spindle-speed-in for G95 to work.

You probably don't need a simulated encoder to achieve this. You can just connect spindle.0.speed-out to spindle.0.speed in in the HAL.

But, it would be much better to have an actual spindle encoder. There are many ways to get one set up, including using a gear in the head and a gear tooth sensor.



Thanks will try that hal code. Planning on adding an encoder soon just wanted to see movement and cut a few parts to test out the steppers.  

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

More
29 Oct 2023 06:01 #284004 by jimmyrig
That worked great thanks! Was able to run the part I needed for another project.


Few more questions
Any issues with a single encoder, thinking of using an induction sensor to read the three chuck holes. I could read a gear if needed but not sure what would be a good sensor for doing so.

What is the recommended interface these days? I used gmoccapy for plasma a few years ago and it's OK for lathe but not great. The new qtplasmac interface is great for plasma but don't see a lathe version yet.

Does anyone use touch probes for setting tools? If so any recommendations?


Thanks for the help!

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

More
29 Oct 2023 14:12 #284020 by andypugh
Ideally you need pulse and index. You can do it with a single sensor and a missing tooth, but then you probably don't want to remove a tooth from the gears in your lathe headstock. (When cars use a "missing tooth" it is actually a slightly shorter tooth, which still drives)

For sensing gear teeth the ATS667 sensor has been used by a number of LinuxCNC folks. Though there are many other options out there, including housed versions for e-bikes.
Some car parts are very cheap, but I don't know if they need a magnetised wheel to work:
www.autodoc.co.uk/dakatec/15730222
But those are also quite cheap:
www.autodoc.co.uk/corteco/13842295

ATS667 onto a gear for pulse and one more on a bolt or keyway for index is more tried-and-tested though.

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

Moderators: piasdom
Time to create page: 0.091 seconds
Powered by Kunena Forum