Spindle index enable

More
12 Jan 2013 20:16 #28624 by gman
Spindle index enable was created by gman
I am trying to get spindle index working but still no luck. Everything else is working fine, I can read the spindle speed, but spindle position does not reset to zero when the spindle index is reached. I thing the problem is somewhere around the signal motion.spindle-index-enable. I am not able to get this signal to logical one, it's value is still zero. I tried to disconnect signals and set it 1, it worked well, the spindle position was reset by first index impulse, but motion.spindle-index-enable fell to zero and did not get up. The change of polarity of input pins did not solve anything.

Here is the encoder setting:
# spindle ENCODER
loadrt encoder num_chan=1
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread
setp encoder.0.position-scale 360 #90 SPR, 360PPR
setp encoder.0.x4-mode true
net spindle-position encoder.0.position => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable

net spindle-phase-a encoder.0.phase-A <= parport.0.pin-11-in-not
net spindle-phase-b encoder.0.phase-B <= parport.0.pin-12-in-not
net spindle-index encoder.0.phase-Z <= parport.0.pin-13-in-not
net spindle-cmd <= motion.spindle-speed-out




File Attachment:

File Name: soustruh.hal
File Size:5 KB
Attachments:

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

More
12 Jan 2013 22:22 - 12 Jan 2013 22:23 #28625 by ArcEye
Replied by ArcEye on topic Spindle index enable
Hi

Are you saying that G76 does not work, or just that in testing, the counter is not behaving as you expected?

I can't see anything wrong with your hal file, it is essentially the same as my lathe but with a quadrature encoder
See this post for jmelson's explanation of when the counter is reset (post 19208)

www.linuxcnc.org/index.php/english/forum...oder-issues?start=12

regards
Last edit: 12 Jan 2013 22:23 by ArcEye.
The following user(s) said Thank You: gman

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

More
13 Jan 2013 02:50 #28631 by gman
Replied by gman on topic Spindle index enable
Hi,
as you said, the counter was not behaving as I expected, so I didn't even try the threading till your answer. Now, everything is working fine. :)
Thank you very much

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

Time to create page: 0.074 seconds
Powered by Kunena Forum