Lathe Spindle control with step/dir

More
01 Jan 2024 12:35 #289466 by Limo
Hello

To begin with, i am totally new to Linuxcnc let alone Linux itself.
I build a CNC-Lathe and I now want to add spindle control with step/dir. I have a cheap 750W Servo as my spindle motor, and in terms of hardware I just want to use the parallel-port of the computer as i want to try to avoid buying extra hardware modules. For now I am totally fine with open loop.

Can somebody point me in the right direction, what i need, to get it going. because everything is quite overwhelming right now. Or is my approach what I am trying to do totally over my head?

Thanks in advance.




 

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

More
01 Jan 2024 13:34 #289471 by tommylight
Connect step/dir/gnd pins from parallel port to servo drive, use the included StepConf wizard to make a config, chose stepgen for spindle, save, start the config.
Might also need to wire an enable, but that depends on the drive.

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

More
01 Jan 2024 18:26 #289492 by Limo
I feel really stupid, but I can't find an option in the StepConf to choose stepgen for the spindle.
I just see the options for PWM and analog spindle control. Am I missing something important?

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

More
01 Jan 2024 18:33 #289496 by tommylight
Sorry, long time since i used it, so no idea if there is a choice for spindle and stepgen.
I will check back later, if i get a chance.

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

More
02 Jan 2024 19:13 #289587 by Limo
I have figured out by myself. I will upload my Hal/Ini files tomorrow, in case someone is interested. Perhaps someone can then also validate if I made some serious mistakes which are in need of correction, but my initial test went down very well. I still need to edit the timing for the stepgen to match my drive.
The following user(s) said Thank You: tommylight

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

More
03 Jan 2024 21:15 #289697 by Limo
Here are the relevant Files, maybe someone with greater knowledge of linuxcnc can look over them in case there is an issue.
Attachments:

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

More
03 Jan 2024 22:34 #289705 by 0x2102
I think there is still an issue with Pncconf Wizard in the 2.9x INI and Spindle control via Step/Dir.

github.com/LinuxCNC/linuxcnc/issues/2354

Some settings are in RPM and some in RPS (RPM/60).

Example for a 24000rpm spindle:

[SPINDLE_0]
# Max spindle speed in RPM (LinuxCNC GUI)
MAX_VELOCITY = 24000
# Max spindle acceleration in RPM per second (LinuxCNC GUI)
MAX_ACCELERATION = 5000

# Hardware StepGen requires values in RPS (revolution per second)
STEPGEN_MAXVEL = 400
STEPGEN_MAXACCEL = 500

The general StepGen comment below should probably be revised as well - for a Spindle StepGen.

# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger."
The following user(s) said Thank You: tommylight

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

Time to create page: 0.165 seconds
Powered by Kunena Forum