Lathe Macros

More
14 Nov 2022 12:52 #256682 by Masiwood123
Replied by Masiwood123 on topic Lathe Macros
..as I see it, it can't work for me, I should probably connect everything as in the example(linuxcnc.org/docs/html/examples/spindle....#cha:spindle-control), except that I don't have a physical encoder on the head shaft, I only have a closed loop servo with own motor encoder that is connected to the servo motor driver, not to the7i96s card.Now it is difficult for me to install an additional encoder because i primarily made the head to work as an A axis, and the S command only to cut pieces. I am certainly very grateful for the effort and explanations

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

More
16 Nov 2022 01:14 #256823 by andypugh
Replied by andypugh on topic Lathe Macros
Try connecting spindle.0.speed-out to spindle.0.speed-in (I am not sure what the exact HAL pin names are, you need to make sure that the units match).

I think that might be enough to make feed-per-rev mode work.

You can't thread without real position feedback, though.
The following user(s) said Thank You: Masiwood123

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

More
16 Nov 2022 10:36 #256842 by Masiwood123
Replied by Masiwood123 on topic Lathe Macros
thank you. I will try to do that.. I am currently in the phase of making two configurations, one for lathe mode where z will be the long axis and x will be transverse, and I need another where the names of the axes will change places, because on the transverse support I have motors that will to process wood, and the cam program I use for that always considers the Z axis as a mill and I can't modify the postprocessor.

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

More
16 Nov 2022 11:51 #256846 by andypugh
Replied by andypugh on topic Lathe Macros
The other alternative is to edit the G-code subroutines to use feed-per-minute mode.
However, that would probably require changes to the "Adjustments" of the feed parameters in the .ui file as they are set up with limits and resolution for feed-per-rev.

If you can use FPR then it is much better for a lathe. After all, lathes have been using FPR for over 100 years as the feeds have always been geared to the spindle.
The following user(s) said Thank You: Masiwood123

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

More
16 Nov 2022 12:18 #256848 by Masiwood123
Replied by Masiwood123 on topic Lathe Macros
your ui'' file has nearly 3000 lines, even if I find it, I wouldn't know how to change it... also in routines:) in solidcam I can change feed/rev to feed/min, but that doesn't mean anything to me, in only the A-axis mode, but the macros are also unusable in that case, so I thought that maybe the simplest solution is to insert an additional encoder (in the pictures this one has 2500ppr) which I would physically connect to the card, and programmatically I would again need help from one of you with experience?   
Attachments:

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

More
16 Nov 2022 12:22 #256849 by andypugh
Replied by andypugh on topic Lathe Macros
Just make the HAL connections that I suggested first. I think that should work.

Then start looking to see if the motor driver outputs quadrature pulses, many do for exactly this sort of situation.

But the HAL connection should work, so give that a try first.

You wouldn't edit the UI file by hand, you can use the Glade editor.
But, again, that shouldn't be necessary.

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

More
16 Nov 2022 12:37 #256851 by Masiwood123
Replied by Masiwood123 on topic Lathe Macros
just like ``net spindle.0.speed-out => spindle.0.speed-in`` or i need to look at the pins in ``hall configuration'' my hall knowledge is very close to ``user frendly configs'' :)

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

More
16 Nov 2022 12:43 #256853 by andypugh
Replied by andypugh on topic Lathe Macros
Attach your HAL file, I will put in the change and send it back.
The following user(s) said Thank You: Masiwood123

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

More
16 Nov 2022 13:10 #256854 by Masiwood123
Replied by Masiwood123 on topic Lathe Macros
 

File Attachment:

File Name: ss_2022-11-16.hal
File Size:14 KB
 

File Attachment:

File Name: ss_2022-11-16.ini
File Size:6 KB
Attachments:

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

More
16 Nov 2022 13:24 #256856 by andypugh
Replied by andypugh on topic Lathe Macros
Try this one
Attachments:
The following user(s) said Thank You: Masiwood123

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

Time to create page: 1.923 seconds
Powered by Kunena Forum