Servo Spindle motor encoder Mesa 7i76e

More
6 years 6 months ago #165820 by andypugh

Erikcnc wrote: im using 2.4.17


Some of the spindle speed pins have changed since v2.4 (2011?) Are you sure that you are usiong that version? I would expect there to be an error if you were adding pins to a net that don't exist. linuxcnc.org/docs/2.4/html/man/man9/motion.9.html

I am beginning to wonder if you are running the HAL file that you think you are.

Are you really saying that motion.spindle-speed-out has a value, but motion.spindle-speed-out-rps does not? That seems almost impossible.

Please Log in to join the conversation.

More
6 years 6 months ago #165827 by Erikcnc

andypugh wrote:

Erikcnc wrote: im using 2.4.17


Some of the spindle speed pins have changed since v2.4 (2011?) Are you sure that you are usiong that version? I would expect there to be an error if you were adding pins to a net that don't exist. linuxcnc.org/docs/2.4/html/man/man9/motion.9.html

I am beginning to wonder if you are running the HAL file that you think you are.

Are you really saying that motion.spindle-speed-out has a value, but motion.spindle-speed-out-rps does not? That seems almost impossible.


wait i am doing something really dumb here.
i was turning it by hand.

so, at manual speed set to 1000 rpm i see that motion.spindle-speed-out-rps is also 1000 rpm.

near.0.in1 is then 16.66667
near.0.in2 is fluctuating around that same value.

Please Log in to join the conversation.

More
6 years 6 months ago #165834 by andypugh

Erikcnc wrote: near.0.in1 is then 16.66667
near.0.in2 is fluctuating around that same value.


And what is near.0.out doing?

And does motion.spindle-revs _increase_ by 1 for each forward rotation of the spindle?

Please Log in to join the conversation.

More
6 years 6 months ago #165841 by Erikcnc

andypugh wrote:

Erikcnc wrote: near.0.in1 is then 16.66667
near.0.in2 is fluctuating around that same value.


And what is near.0.out doing?

And does motion.spindle-revs _increase_ by 1 for each forward rotation of the spindle?


near.0.out

is true when spindle is not rotating. is false when spindle is on

motion.spindle-revs

every one rotation its counts 1.

Please Log in to join the conversation.

More
6 years 6 months ago #165854 by andypugh
near.0.out should go true (at 1000 rpm) if:

in1 > 11 AND in1 < 25
OR
in1 > 13 AND in1 < 19

So, for the numbers given, near.0.out really should be changing value.

Please Log in to join the conversation.

More
6 years 6 months ago #165971 by Erikcnc

andypugh wrote: near.0.out should go true (at 1000 rpm) if:

in1 > 11 AND in1 < 25
OR
in1 > 13 AND in1 < 19

So, for the numbers given, near.0.out really should be changing value.


i found something thoug.

i changed
Code:
net spindle-vel-cmd-rps => near.0.in1
to
Code:
net spindle-vel-cmd-rps-abs => near.0.in1

at M4 (what i use for normal turning (slandbed)) i got spindle at speed on true (green led)
M3 does not get on true.

to be fair, have no idea what abs does.

if i ajust
Code:
net spindle-fb-rpm => near.0.in2
to
Code:
net spindle-fb-rpm-abs => near.0.in2

every direction is false again.

maybe ringing a bel?

Please Log in to join the conversation.

More
6 years 6 months ago #165978 by andypugh
When you said that in1 and in2 were "about the same value" did you possibly mean "except for one being positive and one being negative"

I suspect that if you used both the -abs signals then it would work.

"abs" means "absolute value", without the sign.

Please Log in to join the conversation.

More
6 years 6 months ago #165987 by Erikcnc
I'm sorry, things getting weirder and weirder.

I changed something, but before that i checkt the near pin again in halshow

M3 1000 rpm
Code:
near.0.out false near.0.in1 16.66667 near.0.in2 -16.68*** fluctuating

M4 1000 rpm
Code:
near.0.out false near.0.in1 16.66667 near.0.in2 16.68*** fluctuating


So what did i changed

Hal

counter-mode set to 0 to quadrature mode

INI

Encoder is A+ B+ and Z+ 1024 P/R
www.antratek.com/rotary-encoder-1024-p-r-quadrature

Encoder_scale = 4096
Output_scale = 5700 (because of the drive wheel diameter difference 5%)

Standard i got 1000 rpm in gmoccapy.
M3 1000 rpm gets true
M4 is -1000 rpm gets also true.

Now, at 2000 rpm...spindle goes to around 500 in both directions.
Same counds for 1200 rpm.

But, if i touch the slide bar to 50% and carfully go to 100%...i got the right rpm....

What is going on here?
Sorry i i'm doing things 'out of the box'....

I will attach new hal and ini files.

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
6 years 6 months ago #165999 by andypugh

Erikcnc wrote: Encoder_scale = 4096
Output_scale = 5700 (because of the drive wheel diameter difference 5%)


Where does your encoder index come from?

Now, at 2000 rpm...spindle goes to around 500 in both directions.
Same counds for 1200 rpm.

500 rpm actual speed or 500 rpm encoder measured speed?

Please Log in to join the conversation.

More
6 years 6 months ago #166002 by Erikcnc

andypugh wrote:

Erikcnc wrote: Encoder_scale = 4096
Output_scale = 5700 (because of the drive wheel diameter difference 5%)


Where does your encoder index come from?

Now, at 2000 rpm...spindle goes to around 500 in both directions.
Same counds for 1200 rpm.

500 rpm actual speed or 500 rpm encoder measured speed?


Do you mean where the encoder is located in the machine?
Directly to the spindle with a timing belt 1:1. (emcoturn 220)


I read ~500 rpm on the rpm barthat show the realtime rpm. so it runs slower than the givin actual speed in mdi.

i hope i explained it good enough though.

Please Log in to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum