Spindle orientation, M19
- chrimabelini
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
15 Feb 2015 22:46 #55987
by chrimabelini
Spindle orientation, M19 was created by chrimabelini
Hello,
I tried to add spindle orientation, which works so far....
But every machie start up, the orientation of the spindle is different.
Now "spindle-revs" zero at machine start up is at an arbitrary position, so I think it is necessary to zero "spindle-revs" once at the indexpoint of my encoder.
The rest should be done by "orient".
But I am unable to zero "spindle-revs" (count of spindle revolutions) with index enable machine start up with:
setp hm2_5i25.0.encoder.02.index-enable True
(marked yellow and commented in my hal-file)
because of:
net spindle-index-enable <=> hm2_5i25.0.encoder.02.index-enable
net spindle-index-enable <=> motion.spindle-index-enable
(marked green, which is necessary for rigid tapping, works well).
Could anyone help?
Best regards
Markus
I tried to add spindle orientation, which works so far....
But every machie start up, the orientation of the spindle is different.
Now "spindle-revs" zero at machine start up is at an arbitrary position, so I think it is necessary to zero "spindle-revs" once at the indexpoint of my encoder.
The rest should be done by "orient".
But I am unable to zero "spindle-revs" (count of spindle revolutions) with index enable machine start up with:
setp hm2_5i25.0.encoder.02.index-enable True
(marked yellow and commented in my hal-file)
because of:
net spindle-index-enable <=> hm2_5i25.0.encoder.02.index-enable
net spindle-index-enable <=> motion.spindle-index-enable
(marked green, which is necessary for rigid tapping, works well).
Could anyone help?
Best regards
Markus
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 761
16 Feb 2015 01:07 #55989
by ArcEye
Replied by ArcEye on topic Spindle orientation, M19
Hi
Not sure if setting index-enable is the best option, the encoder can just be zeroed using the reset bit
#####################################################################
# SPINDLE ENCODER
##################
##########################################################################
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.count 0.000000 0
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.count-latched 0.000000 0
# 32771 bit I/O FALSE hm2_5i25.0.encoder.00.index-enable 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.latch-enable 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.latch-polarity 0.000000 0
# 32771 float OUT 0 hm2_5i25.0.encoder.00.position 0.000000 0
# 32771 float OUT 0 hm2_5i25.0.encoder.00.position-latched 0.000000 0
# 32771 bit OUT FALSE hm2_5i25.0.encoder.00.quad-error 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.quad-error-enable 0.000000 0
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.rawcounts 0.000000 0
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.rawlatch 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.reset 0.000000 0
# 32771 float OUT 0 hm2_5i25.0.encoder.00.velocity 0.000000 0
#
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.counter-mode
# 32771 bit RW TRUE hm2_5i25.0.encoder.00.filter
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.index-invert
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.index-mask
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.index-mask-invert
# 32771 float RW 1 hm2_5i25.0.encoder.00.scale
# 32771 float RW 0.5 hm2_5i25.0.encoder.00.vel-timeout
###########################################################################################
If you need to, you can unlink pins, set a value then link them back when done
www.linuxcnc.org/docs/devel/html/hal/basic_hal.html#_unlinkp
regards
Not sure if setting index-enable is the best option, the encoder can just be zeroed using the reset bit
#####################################################################
# SPINDLE ENCODER
##################
##########################################################################
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.count 0.000000 0
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.count-latched 0.000000 0
# 32771 bit I/O FALSE hm2_5i25.0.encoder.00.index-enable 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.latch-enable 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.latch-polarity 0.000000 0
# 32771 float OUT 0 hm2_5i25.0.encoder.00.position 0.000000 0
# 32771 float OUT 0 hm2_5i25.0.encoder.00.position-latched 0.000000 0
# 32771 bit OUT FALSE hm2_5i25.0.encoder.00.quad-error 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.quad-error-enable 0.000000 0
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.rawcounts 0.000000 0
# 32771 s32 OUT 0 hm2_5i25.0.encoder.00.rawlatch 0.000000 0
# 32771 bit IN FALSE hm2_5i25.0.encoder.00.reset 0.000000 0
# 32771 float OUT 0 hm2_5i25.0.encoder.00.velocity 0.000000 0
#
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.counter-mode
# 32771 bit RW TRUE hm2_5i25.0.encoder.00.filter
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.index-invert
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.index-mask
# 32771 bit RW FALSE hm2_5i25.0.encoder.00.index-mask-invert
# 32771 float RW 1 hm2_5i25.0.encoder.00.scale
# 32771 float RW 0.5 hm2_5i25.0.encoder.00.vel-timeout
###########################################################################################
If you need to, you can unlink pins, set a value then link them back when done
www.linuxcnc.org/docs/devel/html/hal/basic_hal.html#_unlinkp
regards
The following user(s) said Thank You: chrimabelini
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17905
- Thank you received: 4774
16 Feb 2015 01:33 #55990
by PCW
Replied by PCW on topic Spindle orientation, M19
Setting index-enable and spinning the spindle till index-enable is clear does seem like the best
way to establish physical orientation for a spindle with a index
somehardware.index-enable (and motion.index-enable) wiring is awkward because they are both I/O bits
so cannot be simple connected with logic as you might wish, however I suspect this connection can be
done by using the tristate-bit component (this may only be in 2.7, not sure)
way to establish physical orientation for a spindle with a index
somehardware.index-enable (and motion.index-enable) wiring is awkward because they are both I/O bits
so cannot be simple connected with logic as you might wish, however I suspect this connection can be
done by using the tristate-bit component (this may only be in 2.7, not sure)
The following user(s) said Thank You: chrimabelini
Please Log in or Create an account to join the conversation.
- chrimabelini
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
16 Feb 2015 03:09 #55993
by chrimabelini
Replied by chrimabelini on topic Spindle orientation, M19
Thank you very much for your support!
I wrote a spindle homing marco, in which I unlinked index-enable, set it true, spun the spindle and linked it again.
Works perfect!
I need to find out how to use tristate, maybe this brings a solution without the additional step of the macro.
Best regards
Markus
I wrote a spindle homing marco, in which I unlinked index-enable, set it true, spun the spindle and linked it again.
Works perfect!
I need to find out how to use tristate, maybe this brings a solution without the additional step of the macro.
Best regards
Markus
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23560
- Thank you received: 4858
16 Feb 2015 08:32 #55999
by andypugh
It looks like I am too late, but I think that all you actually have to do is "sets spindle-index-enable 1" (ie, use the set-signal command on the signal rather than setp on one of the pins)
Replied by andypugh on topic Spindle orientation, M19
But I am unable to zero "spindle-revs" (count of spindle revolutions) with index enable machine start up with:
setp hm2_5i25.0.encoder.02.index-enable True
(marked yellow and commented in my hal-file)
because of:
net spindle-index-enable <=> hm2_5i25.0.encoder.02.index-enable
net spindle-index-enable <=> motion.spindle-index-enable
(marked green, which is necessary for rigid tapping, works well).
Could anyone help?
It looks like I am too late, but I think that all you actually have to do is "sets spindle-index-enable 1" (ie, use the set-signal command on the signal rather than setp on one of the pins)
The following user(s) said Thank You: chrimabelini
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds