Choice of encoder for 7i76 + Pathpilot
15 Apr 2018 20:30 #109088
by Robi63
Choice of encoder for 7i76 + Pathpilot was created by Robi63
Hi,
I have to choose an encoder (spindle speed) for converting a CNC lathe.
I have to mount it on a 7i76 board with Pathpilot.
I attach files with features (I thought 1000 P / R)
Thanks
Roberto
I have to choose an encoder (spindle speed) for converting a CNC lathe.
I have to mount it on a 7i76 board with Pathpilot.
I attach files with features (I thought 1000 P / R)
Thanks
Roberto
Please Log in or Create an account to join the conversation.
15 Apr 2018 20:37 #109089
by PCW
Replied by PCW on topic Choice of encoder for 7i76 + Pathpilot
In general you are much better of with line driver (differential) outputs so I would not chose that type of
encoder but rather one with line driver outputs. These will have 2 signals for A, B and Z, often named A,/A B,/B and Z,/Z
encoder but rather one with line driver outputs. These will have 2 signals for A, B and Z, often named A,/A B,/B and Z,/Z
Please Log in or Create an account to join the conversation.
16 Apr 2018 13:52 #109120
by Robi63
Replied by Robi63 on topic Choice of encoder for 7i76 + Pathpilot
Please Log in or Create an account to join the conversation.
16 Apr 2018 14:56 #109124
by PCW
Replied by PCW on topic Choice of encoder for 7i76 + Pathpilot
That looks good.
The following user(s) said Thank You: Robi63
Please Log in or Create an account to join the conversation.
06 Jun 2018 21:30 #111791
by Robi63
Replied by Robi63 on topic Choice of encoder for 7i76 + Pathpilot
Hi,
I connected the ecoder in TB3 between 7 and 14.
7 Green A
8 Brown A-
9 Black GND
10 White B
11 Gray B-
12 Red Vcc
13 Yellow Z
14 Orange Z-
In the HAL file I set this way:
# Spindle Encoder
setp hm2_5i25.0.encoder.00.counter-mode 0
# setting scale negative makes spindle position increase in CW
# and decrease in CCW - if this not done threading and rigid tapping stall
# perhaps swapping the A-B encoder inputs would have the same effect
setp hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
setp hm2_5i25.0.encoder.00.filter 1
# see 'man hostmot2' for descriptions
setp hm2_5i25.0.encoder.00.index-mask 0
# LinuxCNC
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.index-invert 0
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
##net spindle-position hm2_5i25.0.encoder.00.position => motion.spindle-revs
##net spindle-raw-velocity hm2_5i25.0.encoder.00.velocity => motion.spindle-speed-in lowpass.0.in
net spindle-velocity lowpass.0.out
net spindle-index-enable hm2_5i25.0.encoder.00.index-enable <=> motion.spindle-index-enable
# note: gpio pins only read at servo thread frequency
# these nodes are only for driving diagnostic "LEDs" in the UI
# this is only going to be useful when the spindle is rotated by hand slowly
net spindle-phase-A hm2_5i25.0.gpio.016.in
net spindle-phase-B hm2_5i25.0.gpio.015.in
net spindle-phase-Z hm2_5i25.0.gpio.014.in
##################################################I
Problem :
Signal A and B is read well.
While the Z signal is not read.
I tried with another encoder of different brands, but the problem is the same.
Where am I wrong?
Thanks
Roberto
I connected the ecoder in TB3 between 7 and 14.
7 Green A
8 Brown A-
9 Black GND
10 White B
11 Gray B-
12 Red Vcc
13 Yellow Z
14 Orange Z-
In the HAL file I set this way:
# Spindle Encoder
setp hm2_5i25.0.encoder.00.counter-mode 0
# setting scale negative makes spindle position increase in CW
# and decrease in CCW - if this not done threading and rigid tapping stall
# perhaps swapping the A-B encoder inputs would have the same effect
setp hm2_5i25.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
setp hm2_5i25.0.encoder.00.filter 1
# see 'man hostmot2' for descriptions
setp hm2_5i25.0.encoder.00.index-mask 0
# LinuxCNC
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.index-invert 0
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
##net spindle-position hm2_5i25.0.encoder.00.position => motion.spindle-revs
##net spindle-raw-velocity hm2_5i25.0.encoder.00.velocity => motion.spindle-speed-in lowpass.0.in
net spindle-velocity lowpass.0.out
net spindle-index-enable hm2_5i25.0.encoder.00.index-enable <=> motion.spindle-index-enable
# note: gpio pins only read at servo thread frequency
# these nodes are only for driving diagnostic "LEDs" in the UI
# this is only going to be useful when the spindle is rotated by hand slowly
net spindle-phase-A hm2_5i25.0.gpio.016.in
net spindle-phase-B hm2_5i25.0.gpio.015.in
net spindle-phase-Z hm2_5i25.0.gpio.014.in
##################################################I
Problem :
Signal A and B is read well.
While the Z signal is not read.
I tried with another encoder of different brands, but the problem is the same.
Where am I wrong?
Thanks
Roberto
Please Log in or Create an account to join the conversation.
06 Jun 2018 21:41 - 06 Jun 2018 21:48 #111792
by PCW
Replied by PCW on topic Choice of encoder for 7i76 + Pathpilot
How did you check the index?
On the LinuxCNC side one easy way to test the index is to (with LinuxCNC running)
halmeter signal spindle-index-enable &
halcmd sets spindle-index-enable true
Then rotate the spindle slowly by hand and see if spindle-index-enable is cleared at the index position
On the LinuxCNC side one easy way to test the index is to (with LinuxCNC running)
halmeter signal spindle-index-enable &
halcmd sets spindle-index-enable true
Then rotate the spindle slowly by hand and see if spindle-index-enable is cleared at the index position
Last edit: 06 Jun 2018 21:48 by PCW. Reason: too many by's
Please Log in or Create an account to join the conversation.
07 Jun 2018 10:35 #111849
by Robi63
Replied by Robi63 on topic Choice of encoder for 7i76 + Pathpilot
Hi,
I have tested in PP with Halmeter
in pins hm2-5i25.0.gipo.015.in / 016.in are OK 014.in no signal
in signal I tested spindle-phase-A / B are OK Z no signal even spindle-index-enable no signal.
Thanks
I have tested in PP with Halmeter
in pins hm2-5i25.0.gipo.015.in / 016.in are OK 014.in no signal
in signal I tested spindle-phase-A / B are OK Z no signal even spindle-index-enable no signal.
Thanks
Please Log in or Create an account to join the conversation.
07 Jun 2018 12:57 - 07 Jun 2018 13:52 #111868
by PCW
Replied by PCW on topic Choice of encoder for 7i76 + Pathpilot
I would not expect to see the index signal, that's why you must test for it in the way I indicated
This is because the index signal is a very short pulse on a high resolution encoder and its easy to miss
because of both the 1 KHz servo thread sampling and the fact that halmeter or "show" are only sample
hal data at about a 10 Hz rate
This is because the index signal is a very short pulse on a high resolution encoder and its easy to miss
because of both the 1 KHz servo thread sampling and the fact that halmeter or "show" are only sample
hal data at about a 10 Hz rate
Last edit: 07 Jun 2018 13:52 by PCW.
Please Log in or Create an account to join the conversation.
07 Jun 2018 20:35 #111934
by Robi63
Replied by Robi63 on topic Choice of encoder for 7i76 + Pathpilot
Hi PCW,
As always, you're right.
I have done your test and one point passes from true to false.
In PP A and B they count + or - according to the rotation.
What role does Z have to reset this count?
Thanks
As always, you're right.
I have done your test and one point passes from true to false.
In PP A and B they count + or - according to the rotation.
What role does Z have to reset this count?
Thanks
Please Log in or Create an account to join the conversation.
07 Jun 2018 22:07 #111943
by PCW
Replied by PCW on topic Choice of encoder for 7i76 + Pathpilot
Ha! not always right and sometimes crazy wrong...
The encoder scaled position is cleared on index (Z)
( The low level count is not cleared because this would break the velocity estimation so what the hardware
does is latch the count at index and this count is scaled and used as a position offset to set the position count to 0 at index )
The encoder scaled position is cleared on index (Z)
( The low level count is not cleared because this would break the velocity estimation so what the hardware
does is latch the count at index and this count is scaled and used as a position offset to set the position count to 0 at index )
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.125 seconds