7i76E one PWM needed
- sirhc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
31 Jan 2016 14:17 #69312
by sirhc
Replied by sirhc on topic 7i76E one PWM needed
I've got this part working, but I'm facing another strange problem which is maybe related to the bit file.
I've hooked up a spindle encoder. I don't know why but the index signal does not work. I have the encoder in counter mode because I only have one input on signal A. And I've hooked the index signal. When I open hal scope I can see both signals are working. The index signal is available at hm2_7i76e.0.encoder.00.input-index.
Hal looks like:
# ---Encoder feedback signals/setup---
setp hm2_7i76e.0.encoder.00.counter-mode 1
setp hm2_7i76e.0.encoder.00.filter 1
setp hm2_7i76e.0.encoder.00.index-invert 0
setp hm2_7i76e.0.encoder.00.index-mask 0
setp hm2_7i76e.0.encoder.00.index-mask-invert 0
setp hm2_7i76e.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
net spindle-revs <= hm2_7i76e.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_7i76e.0.encoder.00.velocity
net spindle-index-enable <=> hm2_7i76e.0.encoder.00.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
What could be wrong? The spindle-index-enable signal alwaysstays FALSE.
Regards Chris
I've hooked up a spindle encoder. I don't know why but the index signal does not work. I have the encoder in counter mode because I only have one input on signal A. And I've hooked the index signal. When I open hal scope I can see both signals are working. The index signal is available at hm2_7i76e.0.encoder.00.input-index.
Hal looks like:
# ---Encoder feedback signals/setup---
setp hm2_7i76e.0.encoder.00.counter-mode 1
setp hm2_7i76e.0.encoder.00.filter 1
setp hm2_7i76e.0.encoder.00.index-invert 0
setp hm2_7i76e.0.encoder.00.index-mask 0
setp hm2_7i76e.0.encoder.00.index-mask-invert 0
setp hm2_7i76e.0.encoder.00.scale [SPINDLE_9]ENCODER_SCALE
net spindle-revs <= hm2_7i76e.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_7i76e.0.encoder.00.velocity
net spindle-index-enable <=> hm2_7i76e.0.encoder.00.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm <= motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb-rps => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
What could be wrong? The spindle-index-enable signal alwaysstays FALSE.
Regards Chris
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17903
- Thank you received: 4774
31 Jan 2016 14:38 - 31 Jan 2016 14:39 #69313
by PCW
Replied by PCW on topic 7i76E one PWM needed
If motion.spindle-index-enable is false (so hm2_7i76e.0.encoder.00.index-enable remains false),
The index hardware is disabled so the index input does nothing
For spindle synchronized motion, spindle at speed must be true for motion to set index enable,
so I would check this first
The index hardware is disabled so the index input does nothing
For spindle synchronized motion, spindle at speed must be true for motion to set index enable,
so I would check this first
Last edit: 31 Jan 2016 14:39 by PCW.
Please Log in or Create an account to join the conversation.
- sirhc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
31 Jan 2016 14:58 #69314
by sirhc
Replied by sirhc on topic 7i76E one PWM needed
I see.. spindle-at-speed is TRUE so that should be okay.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17903
- Thank you received: 4774
31 Jan 2016 15:46 #69318
by PCW
Replied by PCW on topic 7i76E one PWM needed
motion.spindle-index-enable will not be set true until spindle synchronized motion
( G33, G33.1 G76 etc ) is required. so I would not expect any index activity until then
If you simply want to check the hardware part of index operation, you can:
sets spindle-index-enable true
(either via axis or via halcmd)
and watch spindle-index-enable as you rotate the spindle by hand
it should get set false at the index location
( G33, G33.1 G76 etc ) is required. so I would not expect any index activity until then
If you simply want to check the hardware part of index operation, you can:
sets spindle-index-enable true
(either via axis or via halcmd)
and watch spindle-index-enable as you rotate the spindle by hand
it should get set false at the index location
Please Log in or Create an account to join the conversation.
- sirhc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
31 Jan 2016 19:56 #69333
by sirhc
Replied by sirhc on topic 7i76E one PWM needed
That's also working!. I've tried this code:
G90 (absolute distance mode)
G0 X1 Z0.1 (rapid to position)
S100 M3 (start spindle turning)
G33 Z-2 K0.125 (move Z axis to -2 at a rate to equal 0.125 per revolution)
G0 X1.25 (rapid move tool away from work)
Z0.1 (rapid move to starting Z position)
M2 (end program)
When the G33 is executed I see the spindle-index-enable is set to true. At the index it will go to false which is correct?
But after that it does not go back to true anymore. There is no motion. So some other signal is not correct. I've noticed the
spindle-revs is negative. Not sure if it matters.
G90 (absolute distance mode)
G0 X1 Z0.1 (rapid to position)
S100 M3 (start spindle turning)
G33 Z-2 K0.125 (move Z axis to -2 at a rate to equal 0.125 per revolution)
G0 X1.25 (rapid move tool away from work)
Z0.1 (rapid move to starting Z position)
M2 (end program)
When the G33 is executed I see the spindle-index-enable is set to true. At the index it will go to false which is correct?
But after that it does not go back to true anymore. There is no motion. So some other signal is not correct. I've noticed the
spindle-revs is negative. Not sure if it matters.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17903
- Thank you received: 4774
31 Jan 2016 19:59 #69334
by PCW
Replied by PCW on topic 7i76E one PWM needed
Yep, AFAIK spindle-revs has to be correct or you will be stuck waiting forever
Please Log in or Create an account to join the conversation.
- sirhc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
31 Jan 2016 20:11 #69337
by sirhc
Replied by sirhc on topic 7i76E one PWM needed
But why are the numbers negative? I did not hook up input-b of the encoder. My encoder just has one phase and the index signal.
The counts are also negative. So I have to make input-b true to make sure the encoder counts positive.
The counts are also negative. So I have to make input-b true to make sure the encoder counts positive.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17903
- Thank you received: 4774
31 Jan 2016 20:15 #69339
by PCW
Replied by PCW on topic 7i76E one PWM needed
Either set the B input to TTL mode and (I think) tie it low or reverse the encoder scale
The following user(s) said Thank You: sirhc
Please Log in or Create an account to join the conversation.
- sirhc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
31 Jan 2016 20:30 #69342
by sirhc
Replied by sirhc on topic 7i76E one PWM needed
ahhhh that did the trick. I've reversed the scale. Thanks a lot!!
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.111 seconds