Spindle true RPM..... HELP PLEASE!!!

More
18 May 2013 22:14 - 18 May 2013 22:22 #34333 by dovidu
Hello everyone! Currently I am working on my cnc lathe project (sherline lathe converted to CNC)

Having frustrations with MACH3, I ditched the disgusting windows along with it and formatted my entire computer. Simply, I accepted the genius of Linux system :D!!

Well, so far through my venture, I have accomplished the following:

1. make x, z axis work
2. make x, z homing and limits work
3. make the VFD work via PWM

However, I can't seem to get true RPM speed displayed....


I use an inductive proximity sensor for spindle index, which senses 1 pulse per revolution.

I have set the spindle index on pin 4 of my gecko g540 drive, which sends signals to pin 14 of DB25. I have properly set this up through stepconf wizard.

When I turn the spindle on, I can see the signals with HAL scope.



The problem is, the DRO for spindle speed does not show a true spindle speed, but rather, it is fixed (for example, when I raise the RPM to 100, 200, 300, 400...... , the DRO reads the same as I commanded, not the real RPM).

When I raise the RPM on EMC, I can see my spindle speed increasing, but sadly, the dro for spindle speed does not represent the actual rpm speed of the spindle. :(



How can I make the rpm dro corespond with actual rpm speed?.....

any input is appreciated!! <3


oh, and also, is "spindle index" same as "spindle encoder"...?
Last edit: 18 May 2013 22:22 by dovidu.

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

More
18 May 2013 23:43 #34337 by ArcEye
You will need to zip your config folder and attach it to a post.

We are just guessing otherwise.

regards
The following user(s) said Thank You: dovidu

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

More
19 May 2013 00:29 #34340 by dovidu
I see,

I have attached my config folder!
Attachments:

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

More
19 May 2013 01:36 #34342 by cmorley
To get the true spindle rpm displayed using stepconf,
You must select a' spindle phase a' in the parallel port screen (and of course the spindle display option)

What is not so clear to me is if you also need an index input.

But even at that if you build a sample config and look at the HAL files you'll see how it's done.
(most of the code is in the custom_postgui.hal file.)

Chris M

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

More
19 May 2013 01:53 #34345 by cncbasher
add the following lines to your hal file

setp encoder.0.position-scale 50.000000
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
net spindle-phase-a encoder.0.phase-A
net spindle-phase-b encoder.0.phase-B
net spindle-index encoder.0.phase-Z

position scale value will need to be changed to suit your encoder count

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

More
19 May 2013 16:39 #34378 by ArcEye
Afraid your zip appears to be corrupt, I can't find anything in it except what looks like an orphaned symlink

If the previous answers did not solve it you will have to re post your config

regards

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

Time to create page: 0.098 seconds
Powered by Kunena Forum