Servo Spindle motor encoder Mesa 7i76e

More
27 Apr 2020 13:57 #165820 by andypugh

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 or Create an account to join the conversation.

More
27 Apr 2020 14:19 #165827 by Erikcnc

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 or Create an account to join the conversation.

More
27 Apr 2020 14:58 #165834 by andypugh

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 or Create an account to join the conversation.

More
27 Apr 2020 15:59 #165841 by Erikcnc

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 or Create an account to join the conversation.

More
27 Apr 2020 18:54 #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.
The following user(s) said Thank You: Erikcnc

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

More
28 Apr 2020 12:28 #165971 by Erikcnc

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
net spindle-vel-cmd-rps    =>  near.0.in1
to
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
net spindle-fb-rpm   => near.0.in2
to
net spindle-fb-rpm-abs => near.0.in2

every direction is false again.

maybe ringing a bel?

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

More
28 Apr 2020 13:15 #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.
The following user(s) said Thank You: Erikcnc

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

More
28 Apr 2020 15:23 - 28 Apr 2020 22:22 #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
near.0.out false
near.0.in1 16.66667
near.0.in2 -16.68*** fluctuating 

M4 1000 rpm
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.

File Attachment:

File Name: EMCOTURN22...4-28.hal
File Size:11 KB

File Attachment:

File Name: EMCOTURN220.doc
File Size:4 KB
Attachments:
Last edit: 28 Apr 2020 22:22 by Erikcnc.

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

More
28 Apr 2020 18:35 #165999 by andypugh

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 or Create an account to join the conversation.

More
28 Apr 2020 18:49 #166002 by Erikcnc

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 or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum