G33.1 - no position reset when index detects
04 Jan 2020 14:21 #153990
by Cynas
G33.1 - no position reset when index detects was created by Cynas
Hi, I'm trying to run rigid tapping g33.1 but I've found a problem.
All readings in Hal Meter and Hal Scope are only correct when starting the G33.1 cycle the position counter does not reset.
After starting G33.1, it waits for the index signal and receives it, and then quickly moves down the distance (position * thread pitch).
the index signal receives from the hall sensor
my hal:
my ini:
The same problem occurs when using g76
It looks like the Z movement is trying to catch up with the position of the spindle, which is being added all the time. After starting g33.1 it can still have a very high value.
Did I miss something in the configuration or maybe my thinking is wrong?
All readings in Hal Meter and Hal Scope are only correct when starting the G33.1 cycle the position counter does not reset.
After starting G33.1, it waits for the index signal and receives it, and then quickly moves down the distance (position * thread pitch).
motion.spindle-revs increases by 1 for one spindle revolution
the index signal receives from the hall sensor
my hal:
#*******************
# SPINDLE S
#*******************
setp pid.s.Pgain [SPINDLE_9]P
setp pid.s.Igain [SPINDLE_9]I
setp pid.s.Dgain [SPINDLE_9]D
setp pid.s.bias [SPINDLE_9]BIAS
setp pid.s.FF0 [SPINDLE_9]FF0
setp pid.s.FF1 [SPINDLE_9]FF1
setp pid.s.FF2 [SPINDLE_9]FF2
setp pid.s.deadband [SPINDLE_9]DEADBAND
setp pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output
# ---digital potentionmeter output signals/setup---
setp hm2_7i76e.0.7i76.0.0.spinout-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-scalemax [SPINDLE_9]OUTPUT_SCALE
net spindle-output => hm2_7i76e.0.7i76.0.0.spinout
#net spindle-enable => hm2_7i76e.0.7i76.0.0.spinena
net spindle-enable => or2.0.in0
net spindle-enable-oriented => or2.0.in1
net spindle-enable-or2.0 or2.0.out => timedelay.1.in
net opoznienie-spindle-enable timedelay.1.out => hm2_7i76e.0.7i76.0.0.spinena
net spindle-ccw => hm2_7i76e.0.7i76.0.0.spindir
# ---Encoder feedback signals/setup---
#setp hm2_7i76e.0.encoder.00.counter-mode 0
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 1
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-speed-cmd-rps <= motion.spindle-speed-cmd-rps
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
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
net spindle-index encoder.0.phase-Z
net spindle-index hm2_7i76e.0.7i76.0.0.input-12-not
net spindle-orient <= motion.spindle-orient
net spindle-is-oriented => motion.spindle-is-oriented
net spindle-locked <= motion.spindle-locked
# ---Setup spindle at speed signals---
sets spindle-at-speed true
my ini:
ENCODER_SCALE = -1000
The same problem occurs when using g76
It looks like the Z movement is trying to catch up with the position of the spindle, which is being added all the time. After starting g33.1 it can still have a very high value.
Did I miss something in the configuration or maybe my thinking is wrong?
Please Log in or Create an account to join the conversation.
04 Jan 2020 15:07 #153993
by PCW
Replied by PCW on topic G33.1 - no position reset when index detects
For the hardware index to work, the index signal must connect to the encoder input on the 7I76E.
The following user(s) said Thank You: Cynas
Please Log in or Create an account to join the conversation.
04 Jan 2020 15:13 - 04 Jan 2020 15:23 #153995
by Cynas
Replied by Cynas on topic G33.1 - no position reset when index detects
How can I make such a connection in the hal ?
Last edit: 04 Jan 2020 15:23 by Cynas.
Please Log in or Create an account to join the conversation.
04 Jan 2020 15:20 #153996
by PCW
Replied by PCW on topic G33.1 - no position reset when index detects
It has to be done in hardware, not hal, that is, you must connect the index signal to the 7I76E's index input
This can be done in hal with a software encoder counter but a software encoder will not work well with a 1000 count/turn encoder
This can be done in hal with a software encoder counter but a software encoder will not work well with a 1000 count/turn encoder
Please Log in or Create an account to join the conversation.
04 Jan 2020 15:23 #153997
by Cynas
Replied by Cynas on topic G33.1 - no position reset when index detects
If I use a 5V encoder for A, B signals. Can I connect a 24 V sensor output in place of the Index?
Do I have to use a transition system that converts 24V to 5V?
I don't see this information anywhere in manual 7i76E
Do I have to use a transition system that converts 24V to 5V?
I don't see this information anywhere in manual 7i76E
Please Log in or Create an account to join the conversation.
04 Jan 2020 15:32 #153998
by PCW
Replied by PCW on topic G33.1 - no position reset when index detects
You would need to translate the voltage from the sensor to 5V
(voltages in excess of 12V will damage the 7I76E encoder inputs)
This translation could be done with an opto-coupler or similar device
(voltages in excess of 12V will damage the 7I76E encoder inputs)
This translation could be done with an opto-coupler or similar device
The following user(s) said Thank You: Cynas
Please Log in or Create an account to join the conversation.
04 Jan 2020 15:37 #153999
by Cynas
Replied by Cynas on topic G33.1 - no position reset when index detects
I will try to build such a system
Thank you
Thank you
Please Log in or Create an account to join the conversation.
04 Jan 2020 20:23 #154018
by Cynas
Replied by Cynas on topic G33.1 - no position reset when index detects
Attachments:
Please Log in or Create an account to join the conversation.
08 Jan 2020 15:11 #154312
by Cynas
Replied by Cynas on topic G33.1 - no position reset when index detects
One picture expresses more than 1000 words
Please Log in or Create an account to join the conversation.
08 Jan 2020 17:34 #154326
by Clive S
Replied by Clive S on topic G33.1 - no position reset when index detects
Very nice.
Would you mind posting your config files.
Would you mind posting your config files.
Please Log in or Create an account to join the conversation.
Time to create page: 0.132 seconds