Standalone electronic leadscrew (gearbox) mode for lathe

More
21 Jan 2020 01:39 #155289 by ttt
This is an example of how to configure LinuxCNC to operate as a pure electronic leadscrew (or gearbox) for a lathe, without any CNC function.

Background: While I do some CNC machining with my converted lathe it turns out that in 95% of my uses cases I prefer using my lathe in classic manual mode, especially for quick projects. Until recently I used a custom solution to use my Z-axis stepper and spindle encoder to behave like an electronic leadscrew. While there have been requests to supply examples on how to do this in LinuxCNC I have never seen a working example.

The example consists of a standalone .hal file with a QtVcp based panel and supporting python code and is available here:

github.com/tinic/ElectronicLeadscrew

Hardware used:

- 7i96 Mesa board
- Clone/fake E6B2-CWZ6C Omron encoder
- Two generic DM680T stepper drivers for Z and X axis
- Two Nema 23 stepper to drive Z and X axis

Not sure how interesting this is for anyone here, but I thought I should at least post about it in case someone searches for a solution/hints. Questions are welcome.
Attachments:
The following user(s) said Thank You: Mike_Eitel, joekline9, Nebur, tommylight, Benb, besriworld, anfänger, J Green, BeagleBrainz, Markyd and 1 other people also said thanks.

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

More
21 Jan 2020 03:01 #155293 by J Green
Hi ttt
A very big thank you for sharing all of your efforts an the results.
Cheers
Bob

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

More
25 Apr 2023 12:03 #269848 by michelko
Hi just found your ELS Project. Exactly what i am looking for unfortunately i use the paralelport instead of an Mesa Card.
Will this work with the parallel Port too?
Thanks Michael

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

More
25 Apr 2023 12:15 #269850 by PCW
It should, You can do almost anything with a simple parallel port system
as you can with fancier hardware, there just will be some limitations
on step rates, PWM rates, and encoder resolution.

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

More
30 Apr 2023 19:09 #270326 by michelko
i tried to change to parallel poert but getting some errors on startup.
There is a window with this message:Traceback (most recent call last):File "/usr/bin/qtvcp", line 377, in <module>APP = QTVCP()File "/usr/bin/qtvcp", line 211, in __init__window.instance()File "/usr/lib/python2.7/dist-packages/qtvcp/qt_makegui.py", line 178, in instanceinstance = uic.loadUi(self.filename, self)File "/usr/lib/python2.7/dist-packages/PyQt5/uic/__init__.py", line 226, in loadUireturn DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)File "/usr/lib/python2.7/dist-packages/PyQt5/uic/Loader/loader.py", line 72, in loadUireturn self.parse(filename, resource_suffix, basedir)File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 1013, in parsedocument = parse(filename)File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parsetree.parse(source, parser)File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 657, in parseself._root = parser.close()File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1671, in closeself._raiseerror(v)File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerrorraise errParseError: no element found: line 692, column 6 

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

More
30 Apr 2023 19:15 #270328 by michelko
iam not good in programming so can someone help out, please?

Here is whats the Terminal is showing:

Cant post the terminal message. Says: to many links in your Message
What am i doing wrong?

Regards

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

More
30 Apr 2023 19:17 #270329 by michelko
Attachments:

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

More
16 Oct 2023 09:28 - 16 Oct 2023 09:29 #283112 by michelko
Hi,
at leats i got i running with my parallel Port setup.
One problem left: 
in the HAL are those  sections one for x and one for z

net x-control-type <= lathe_ui.control_x_type
net x-control-type => hm2_7i96.0.stepgen.01.control-type
net x-velocity-cmd <= lathe_ui.velocity_x_cmd
net x-velocity-cmd => hm2_7i96.0.stepgen.01.velocity-cmd

The problemis in the second and the fourth line
I don´t know how to switch this to the parport stepgen commands.
As far as i understand the Hal those are used for jogging with the cursor buttons, but maybe i am wrong.
Any ideas??

Thanks in advance
 
Last edit: 16 Oct 2023 09:29 by michelko.

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

More
16 Oct 2023 20:02 #283139 by Markyd
Will this work with only one stepper (on the main leadscrew)?

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

More
17 Oct 2023 05:15 #283158 by michelko
Yes but then the facing and taper function won`t work

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

Time to create page: 0.115 seconds
Powered by Kunena Forum