Help on getting spindle indexer reading into axis?

More
10 years 6 months ago #73131 by midyo
I've started changing over my machines from mach 3 to linuxcnc. This particular lathe has a single index per rev which produced reasonably good threading in mach. I have 2 questions - how do you set linux up to read the pulse (count the revs) and will it thread with a single pulse?

cheers

Please Log in to join the conversation.

More
10 years 6 months ago #73150 by cncbasher
yes it will , use stepconf to produce your config , and select an input pin as spindle index and also a pin for spindle-a
( connect your index to both these pins ) , however ideally you really need an encoder with a of least of say 60 - 120 slots
will make life a lot easier .
you can also import your mach config using stepconf

Please Log in to join the conversation.

More
10 years 6 months ago #73154 by andypugh
Just to clarify: LinuxCNC with one pulse per rev will work a little better for threading than Mach with one pulse per rev.
However it will work better still with more pulses + index.

Please Log in to join the conversation.

More
10 years 6 months ago #73169 by midyo
Hi thanks for the replies chaps, I was hoping I could use the single pulse just for the time being (fully intend to go with an encoder when time allows) However I am struggling with the setup procedures in LCNC. Could you help me a little futher with the setup:

yes it will , use stepconf to produce your config , and select an input pin as spindle index and also a pin for spindle-a
( connect your index to both these pins )

I can't quite understand the above? I can control the speed of my spindle so have got the basics working but i don't see how to get it to show the correct speed or to set the correct speed etc. Bare with me, i'm a little slow!

Please Log in to join the conversation.

More
10 years 6 months ago #73173 by cncbasher
have you used stepconf program to produce your config ?
without knowing how your controllng the spindle or if it has a vfd etc , it's difficult to advise
you need to set spindle scale , you need to know the top speed and set this as max speed in your ini

Please Log in to join the conversation.

More
10 years 6 months ago #73190 by midyo
Sorry, yes I did use stepconf to produce config and i'm using a vfd to control 3 phase motor which i have managed to get working with the PWM? The spindle speed scale is up to 3000 and mine is max 1000, also i dont see an actua speedl value from the indexer? But its the spindle setup page that i'm confused with. I know this LCNC is better than mach but its hard to setup! For me anyway...

Please Log in to join the conversation.

More
10 years 6 months ago #73221 by andypugh
Your HAL file will (probably) load an encoder component. It should then be being set to counter-mode 1 and the index and A phases of it should then be connected to the parport.
If stepconf did its job right you should also see the encoder position being connected to motion.spindle-revs and the velocity being connected to motion.spindle-speed-in.

This last signal (encoder.0.velocity) is what you would need to connect to a spindle speed display, but as it is in revs-per second you would need a scale function to get rpm. stepconf might have done this for you.

Please Log in to join the conversation.

More
10 years 6 months ago #73259 by midyo
Thanks for the reply Andy, this is a real steep learning curve for me (struggling to be honest) Is all of the above in the HAL file?

Please Log in to join the conversation.

More
10 years 6 months ago #73260 by andypugh
Yes. Try to read and understand the HAL file. If it helps, the motion pins are described here:
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html

And other pins, such as iocontrol, halui, etc are all described in the HAL components section near the bottom of here:
linuxcnc.org/docs/2.7/html/

Please Log in to join the conversation.

Time to create page: 0.105 seconds
Powered by Kunena Forum