Spindle encoder wiring check

More
9 years 3 months ago #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
9 years 3 months ago #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
9 years 3 months ago #95356 by timmert
Thanks :)

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

More
9 years 3 months ago #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
9 years 3 months ago #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
9 years 3 months ago #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.

Time to create page: 0.067 seconds
Powered by Kunena Forum