Spindle encoder wiring check

More
04 Jul 2017 08:24 #95345 by timmert
Hi
I'm busy connected a spindle encoder to my 7i76. Did I wired everything the right way?

black = GND
brown = +5VDC
green = 1ppr output
white = 360ppr output


I connected the wires to DB3

black -> Pin9 GND
brown -> Pin12 +5V
green -> Pin13 IDX+
white -> Ping7 ENCA+

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

More
04 Jul 2017 13:25 #95355 by PCW
Replied by PCW on topic Spindle encoder wiring check
That looks correct

You also need to set the encoder mode jumpers for single ended mode
(W4,W5,W6 in left hand position)
The following user(s) said Thank You: timmert

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

More
04 Jul 2017 13:31 #95356 by timmert
Thanks :)

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

More
09 Jul 2017 12:31 #95536 by timmert
Is it possible to configure this with PNCconfig?
With stepconf it's possible it seems. To configure a phase A and index

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

More
10 Jul 2017 18:33 #95616 by timmert
Ok I'm a bit further with the configuration.
I used PNCconfig.

HAL section
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE

net spindle-revs <= hm2_5i25.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_5i25.0.encoder.00.velocity
net spindle-index-enable <=> hm2_5i25.0.encoder.00.index-enable

Ini file
ENCODER_SCALE = 360.0

When I check with HALmeter and I turn the spindle the value goes up. So that's good I guess.

The scale is 360 in the ini file (it's a 360ppr encoder)
I think the index doesnt work? It doesnt change from False to true in the HAL meter

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

More
10 Jul 2017 18:53 #95618 by PCW
Replied by PCW on topic Spindle encoder wiring check
for "A" only encoders you need to set the encoder counter to up/down mode
setp hm2_5i25.0.encoder.00.counter-mode 1

After changing this, you may have to change the sign of the scale value if the count goes the wrong way

Often the index is too short to see with halmeter or halscope, so the way ti test it is to
set spindle-index-enable true and watch spindle-index-enable as you manual turn the spindle
it should go false when the index is detected (in just one place per rotation)

So with linuxCNC running, setup a halmeter to watch spindle-index-enable,
set spindle-index-enable true with:
halcmd sets spindle-index-enable true
and then rotate the spindle by hand as you watch spindle-index-enable with the halmeter

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

More
11 Jul 2017 19:13 #95686 by timmert
I checked with HALmeter
spindle-index-enable is true. When I turn the spindle manually it doesn't switch to false.

Phase A is working fine though.

When I check the encoder.00.count I get a - value. No matter which side I turn the spindle. Don't know if that's good?

I also don't fully understand how the scale is being calculated?
It asks for the pulses per revolution. It will multiply by 4 and that's the encoder scale.
The PPR is 360. But why does it multiply with 4 to calculate the encoder scale?
Do I need to fill in 90? 90 x 4 = 360

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

More
11 Jul 2017 21:04 - 11 Jul 2017 21:04 #95698 by PCW
Replied by PCW on topic Spindle encoder wiring check
Yes, if you are not using quadrature ( A and B ) the scale should not be multiplied by 4
You also need to change the sign of the scale value so it counts up so if pncconf multiplies
by 4 you should enter -90.

Also at some point you are better off not using pncconf and just editing the hal file directly
pncconf is good for creating the basic structure of the configuration, but for anything beyond
the basics, you will need to edit the hal file by hand, and once you have done this you cannot use
pncconf again without losing your changes
Last edit: 11 Jul 2017 21:04 by PCW.
The following user(s) said Thank You: timmert

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

More
12 Jul 2017 10:10 #95715 by timmert
Index and PhaseA is working!
I changed 360 to -360. And the pin: encoder.position (checked with halmeter) is counting upwards instead of negative.
All seems good I think? :)

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

More
22 Sep 2017 08:30 #99247 by timmert
I want to upgrade the encoder on my machine to a quadrature so I can do rigid tapping on my lathe.

Currently a rotary encoder is connected with a belt to the spindle.
Which kind of things I need to check for a new encoder? or does a quadrature encoder always got a index, a and b pulse?

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

Time to create page: 0.106 seconds
Powered by Kunena Forum