spindle rpm readout

More
20 Aug 2011 23:41 #12638 by garylogan
Hello, I am trying to get a rpm readout working on emc2 but not getting it set right in STEPCONF.
I have a simple encoder with 2 magnets hooked to board. I am controlling the spindle manually.
When I run stepconf I put 0 in PWM for PDM mode but not sure what else I need.
I have pin 17 set to Spindle Phase A, and the TRUE & FALSE is working in halprobe when I move spindle.

Hal config gives me this at approx. 140 rpm:
abs-spindle-vel 1.4
scaled-spindle-vel .02

but the readout always says between 0 and .1 rpms.
I definitely need to read up on this but mostly all I can find is info on spindle speed control. Stepconf docs don't really seem to have the answer
unless I am just totally missing it.
Any suggestions would be greatly appreciated, thanks!

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

More
21 Aug 2011 00:59 #12639 by cmorley
Replied by cmorley on topic Re:spindle rpm readout
what version of EMC are you using? I'm pretty sure the scaling is wrong (a bug) what is the scale factor in the post_gui.hal file ?

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

More
21 Aug 2011 01:51 #12640 by garylogan
Replied by garylogan on topic Re:spindle rpm readout
I am on 10.0.4 emc2 and the scale is at 2.000

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

More
21 Aug 2011 07:15 #12641 by cmorley
Replied by cmorley on topic Re:spindle rpm readout
I'm looking for the version of EMC a number like 2.4.3 or 2.4.6. It wil pop up when you load EMC.

in postgui.hal you should see something like this:


setp scale.0.gain 60
setp lowpass.0.gain 0.070000
net spindle-velocity => lowpass.0.in
net spindle-fb-filtered-rps lowpass.0.out => abs.0.in
net spindle-fb-filtered-abs-rps abs.0.out => scale.0.in
net spindle-fb-filtered-abs-rpm scale.0.out => pyvcp.spindle-speed

make sure the scale gain id 60 and not something else.

I assume you are using the pyvcp spindle display option in stepconf.

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

More
21 Aug 2011 20:28 #12645 by garylogan
Replied by garylogan on topic Re:spindle rpm readout
I have version 2.4.3

this is what stepconf put in my hal file:

net spindle-cmd <= motion.spindle-speed-out

setp encoder.0.position-scale 2.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

net spindle-phase-a <= parport.0.pin-12-in-not

thanks

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

More
22 Aug 2011 00:00 - 22 Aug 2011 00:09 #12646 by cmorley
Replied by cmorley on topic Re:spindle rpm readout
There should be more then one HAl file.
you are looking for the one called custom_postgui.hal ( I had the name wrong above)
Can you archive your files and post them?
EMC 2.4.3 definitely had this bug.
Last edit: 22 Aug 2011 00:09 by cmorley.

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

More
22 Aug 2011 00:11 #12647 by cmorley
Replied by cmorley on topic Re:spindle rpm readout
You will find the scale is :
setp scale.0.gain .01667

when It should be 60

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

More
22 Aug 2011 14:05 #12651 by garylogan
Replied by garylogan on topic Re:spindle rpm readout
you are right, I looked in my custom_postgui.hal and it had that .0166 number.
I was aware of this bug from reading another thread but was not looking in the right file.
I can't test it at the moment because I tore it all apart to do some wiring.
thanks very much for your help!

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

More
22 Aug 2011 22:11 #12658 by cmorley
Replied by cmorley on topic Re:spindle rpm readout
Great glad you found it. !

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

Time to create page: 0.124 seconds
Powered by Kunena Forum