How does PNCConfig and mesa encoder index-enable work?
- jtrantow
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 18
12 Oct 2020 06:08 #185799
by jtrantow
How does PNCConfig and mesa encoder index-enable work? was created by jtrantow
I switched my parallel port lathe spindle quad encoder plus index over to a mesa 7i92/7i85. I configured with pncconfig and I can't get the encoder counts to reset. I see the correct A/B/Index signals on HalScope, but counts just keeps increasing (or decreasing if I reverse). Halmeter and scope show hm2_7i92.0.encoder.00.input-index going low when the index pulse comes around. I verified my encoder scale of 260/rev. I played with index-invert, index-mask, index-mask-invert, but I now believe the problem is with index-enable which never goes true???
Looking through the configuration, I see spindle-index-enable at the following lines:
net spindle-index-enable <=> pid.s.index-enable
net spindle-index-enable <=> hm2_7i92.0.encoder.00.index-enable
net spindle-index-enable <=> spindle.0.index-enable
How is spindle-index-enable supposed to get set true? Is this value supposed to come from a hardware signal or some GUI element? I don't have my spindle pwm connected so I tried commenting out the pid.s.index-enable with no success.
I also tried selecting the spindle with:
S100 $0
M3 $0
Looking through the configuration, I see spindle-index-enable at the following lines:
net spindle-index-enable <=> pid.s.index-enable
net spindle-index-enable <=> hm2_7i92.0.encoder.00.index-enable
net spindle-index-enable <=> spindle.0.index-enable
How is spindle-index-enable supposed to get set true? Is this value supposed to come from a hardware signal or some GUI element? I don't have my spindle pwm connected so I tried commenting out the pid.s.index-enable with no success.
I also tried selecting the spindle with:
S100 $0
M3 $0
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
12 Oct 2020 12:05 #185819
by andypugh
Replied by andypugh on topic How does PNCConfig and mesa encoder index-enable work?
Index-enable is set true only when required. This means that it is only ever set before a spindle-synchronised move.
If you want to test it, either try a G33 or G76, or open a terminal (with Linuxcnc running)Rotate the spindle by hand, and watch the halmeters
When happy, don't forget to re-connnect the pin, then exit
If you want to test it, either try a G33 or G76, or open a terminal (with Linuxcnc running)
halcmd -kf
unlinkp spindle.0.index-enable
loadusr halmeter pin hm2_7i92.0.encoder.00.index-enable
loadusr halmeter pin hm2_7i92.0.encoder.00.counts
sets spindle-index-enable 1
When happy, don't forget to re-connnect the pin, then exit
net spindle-index-enable spindle.0.index-enable
exit
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17974
- Thank you received: 4831
12 Oct 2020 13:59 - 12 Oct 2020 14:38 #185842
by PCW
Replied by PCW on topic How does PNCConfig and mesa encoder index-enable work?
You actually don't need to unlink spindle.0.index-enable to test
(tri-state pins can be driven by any number of sources)
(tri-state pins can be driven by any number of sources)
Last edit: 12 Oct 2020 14:38 by PCW.
Please Log in or Create an account to join the conversation.
- jtrantow
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 18
12 Oct 2020 16:18 #185848
by jtrantow
Replied by jtrantow on topic How does PNCConfig and mesa encoder index-enable work?
Thanks, I was looking at my problem incorrectly.
What wasn't working was the pypcp spindle speed display was jumping all over. I was only running spindle at 100RPM with 260 counts/rev and needed to reduce lowpass.spindle.gain.
So my mesa equipped lathe is now back to all the functionality I had with the PP. I played around with the closed loop stepper in pncconf and need to get the encoders mounted before I can add that functionality.
Thanks for all the help!
What wasn't working was the pypcp spindle speed display was jumping all over. I was only running spindle at 100RPM with 260 counts/rev and needed to reduce lowpass.spindle.gain.
So my mesa equipped lathe is now back to all the functionality I had with the PP. I played around with the closed loop stepper in pncconf and need to get the encoders mounted before I can add that functionality.
Thanks for all the help!
Please Log in or Create an account to join the conversation.
- jcdammeyer
- Offline
- Senior Member
Less
More
- Posts: 70
- Thank you received: 5
20 Jun 2021 08:58 - 20 Jun 2021 16:41 #212467
by jcdammeyer
I can do the above and I see the hm2_7i92.0.encoder.01.count increase from 0 to past 400 and the spindle-index-enable goes from true to false as the index occurs.
I then
net spindle-index-enable spindle.0.index-enable
But if I run a G33 or G33.1 I never see the hm2_7i92.0.encoder.01.index-enable go true.
What connection actually sets the index-enable true? Is there a connection with motion....
Solved: From the posting
forum.linuxcnc.org/20-g-code/34936-rigid-tapping-help?start=20
I set the encoder scale to negative. Now tapping cycle works.
Replied by jcdammeyer on topic How does PNCConfig and mesa encoder index-enable work?
Index-enable is set true only when required. This means that it is only ever set before a spindle-synchronised move.
If you want to test it, either try a G33 or G76, or open a terminal (with Linuxcnc running)Rotate the spindle by hand, and watch the halmetershalcmd -kf unlinkp spindle.0.index-enable loadusr halmeter pin hm2_7i92.0.encoder.00.index-enable loadusr halmeter pin hm2_7i92.0.encoder.00.counts sets spindle-index-enable 1
When happy, don't forget to re-connnect the pin, then exitnet spindle-index-enable spindle.0.index-enable exit
I can do the above and I see the hm2_7i92.0.encoder.01.count increase from 0 to past 400 and the spindle-index-enable goes from true to false as the index occurs.
I then
net spindle-index-enable spindle.0.index-enable
But if I run a G33 or G33.1 I never see the hm2_7i92.0.encoder.01.index-enable go true.
What connection actually sets the index-enable true? Is there a connection with motion....
Solved: From the posting
forum.linuxcnc.org/20-g-code/34936-rigid-tapping-help?start=20
I set the encoder scale to negative. Now tapping cycle works.
Last edit: 20 Jun 2021 16:41 by jcdammeyer. Reason: Add solution.
Please Log in or Create an account to join the conversation.
Time to create page: 0.094 seconds