Servo Spindle motor encoder Mesa 7i76e

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 or Create an account 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 or Create an account 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.
The following user(s) said Thank You: Erikcnc

Please Log in or Create an account 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 or Create an account 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.
The following user(s) said Thank You: Erikcnc

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

More
6 years 6 months ago - 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.

File Attachment:

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

File Attachment:

File Name: EMCOTURN220.doc
File Size:3.59 KB
Last edit: 6 years 6 months ago by Erikcnc.

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

Time to create page: 0.448 seconds
Powered by Kunena Forum