spindle speed not working

More
30 Aug 2011 00:35 #12840 by cncbasher
could someone confirm that the spindle speed bar is working fine in 2.5 and git master perhaps ?

i have a value shown in spindle-fb-filtered-abs-rpm , but pyvcp.spindle-speed display shows nothing

so i'm trying to hunt down the culprit

( using default from pncconf )

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

More
30 Aug 2011 07:13 - 30 Aug 2011 07:13 #12846 by cmorley
Not sure how old your 2.5 is. can you post your config files?
I just built a config and see nothing obvious.
I will have to check with hardware later in week.

Chris M
Last edit: 30 Aug 2011 07:13 by cmorley.

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

More
30 Aug 2011 08:33 - 30 Aug 2011 08:36 #12847 by cncbasher
version i have chris is 2.5.0-pre1-616
also appears to be the same using 2.6 also

hal file produced from pncconf , with no changes
for example the values i have are :

spindle-fb-filtered-abs-rpm 1.186e-321
spindle-fb-filtered-abs-rps 2e-323

i'll post the approprate files in a few mins

File Attachment:

File Name: orac1-3bb1...5ef4.hal
File Size:8 KB
Attachments:
Last edit: 30 Aug 2011 08:36 by cncbasher. Reason: attach files

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

More
30 Aug 2011 08:38 #12848 by cncbasher
and the custom postgui file

File Attachment:

File Name: custom_pos...b597.hal
File Size:0 KB
Attachments:

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

More
30 Aug 2011 10:43 #12849 by ArcEye
Replied by ArcEye on topic Re:spindle speed not working
Hi

I can't see why your hal files don't work and don't think it is a EMC version problem.

Underneath the layers of complication from using a Mesa board, the spindle rpm seems to be derived almost exactly the same way as the below code from my setup (except I have no lowpass filter)
I have used this from version 2.3 through to 2.6

net spindle-position encoder.0.position-interpolated => 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-index parport.0.pin-11-in-not => encoder.0.phase-Z
net spindle-pulse parport.1.pin-10-in => encoder.0.phase-A

setp scale.1.gain 60.0 #convert velocity per sec into rpm
net spindle-velocity => abs.1.in
net absolute-spindle-velocity <= abs.1.out => scale.1.in
net scaled-spindle-velocity <= scale.1.out => pyvcp.spindle-speed


Have you gone right back to the start and looked at what value hm2_7i43.0.encoder.00.velocity is producing?
Does it look like a valid rps value for the speed you are running at?
The hole in my knowledge is where the Mesa board gets its signal from, I just use a simple hall effect indexing switch fed into encoder.0.phase-Z

regards

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

More
30 Aug 2011 11:26 #12851 by cncbasher
input is from 2 optos one gives a single pulse per rev attached to the index pin and the other opto to 100 count per rev attached to the quadrature A pin ,

handled just about the same way as any pin , but i could change it to a general io pin quite easily

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

More
30 Aug 2011 12:39 #12852 by andypugh
cncbasher wrote:

spindle-fb-filtered-abs-rpm 1.186e-321
spindle-fb-filtered-abs-rps 2e-323

Those numbers are both approximately zero.
I suspect that the scale is set wrong.
Using Halmeter, follow the trail all the way from the mesa card encoder.N.velocity onwards.

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

More
30 Aug 2011 12:44 #12853 by andypugh
cncbasher wrote:

input is from 2 optos one gives a single pulse per rev attached to the index pin and the other opto to 100 count per rev attached to the quadrature A pin

Aha!

If you only have one quadrature phase connected you need to set counter-mode to 1 in the HAL file.
# ---Encoder feedback signals/setup---

setp    hm2_7i43.0.encoder.00.counter-mode 1
setp    hm2_7i43.0.encoder.00.filter 1

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

More
30 Aug 2011 14:41 #12855 by cncbasher
thanks Andy setting counter mode to 1 , got me in the ball park

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

More
30 Aug 2011 22:29 #12863 by cmorley
I'll add that to the docs as that may be a common problem.
Ultimately it should be choose-able on the Mesa page.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum