Locking Indexer Function
18 Sep 2017 13:10 - 18 Sep 2017 13:14 #99081
by Diederik
Locking Indexer Function was created by Diederik
Hi,
I Noticed a problem on a Machine that I retrofitted last year:
In the INI File, I enabled the LOCKING_INDEXER = 1 Function, and it works well, but recently we have been experiencing some problems, and from time to time had following errors, which we managed to solve, but now there is other issues arrising, and this is giving me problems now again:
If a error like E-Stop or following error occurs during "Indexing" Then the Unclamp / axis.N.unlock remains unclamped and If I enable the machine again, this axis remains axis.N.is-unlocked = 1, because unlock stays on.
Is there a way that the axis can clamp / Lock as soon as a emergency Stop or any error occur, Because for the operator now, the only way to get the machine to run again, is to close the software and open linuxcnc again. I Normally disable the axis.N.unlock through the ladder, and enable it again through the ladder, and so manage to get the machine to continue wrking again, But I need a solution so that the operator does not need to disable the machine.
Just to add in, I could have linked a e-stop chain in ladder, to lock the indexer, but the problem is when you enable the machine then axis.N.unlock remains on, and I think when you command in mdi movements for the indexer, It waits to change state, and axis.N.is-unlocked needs to switch from 0 to 1, before any further actions can take place.
Thanks
I Noticed a problem on a Machine that I retrofitted last year:
In the INI File, I enabled the LOCKING_INDEXER = 1 Function, and it works well, but recently we have been experiencing some problems, and from time to time had following errors, which we managed to solve, but now there is other issues arrising, and this is giving me problems now again:
If a error like E-Stop or following error occurs during "Indexing" Then the Unclamp / axis.N.unlock remains unclamped and If I enable the machine again, this axis remains axis.N.is-unlocked = 1, because unlock stays on.
Is there a way that the axis can clamp / Lock as soon as a emergency Stop or any error occur, Because for the operator now, the only way to get the machine to run again, is to close the software and open linuxcnc again. I Normally disable the axis.N.unlock through the ladder, and enable it again through the ladder, and so manage to get the machine to continue wrking again, But I need a solution so that the operator does not need to disable the machine.
Just to add in, I could have linked a e-stop chain in ladder, to lock the indexer, but the problem is when you enable the machine then axis.N.unlock remains on, and I think when you command in mdi movements for the indexer, It waits to change state, and axis.N.is-unlocked needs to switch from 0 to 1, before any further actions can take place.
Thanks
Last edit: 18 Sep 2017 13:14 by Diederik.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
18 Sep 2017 14:01 #99085
by Todd Zuercher
Replied by Todd Zuercher on topic Locking Indexer Function
Would you mind posting a copy of your ini and hal files so we might have a look so we might be able to suggest a work around for you.
(I've never used a locking indexer config, so I don't have any clue if there are bugs lurking there.)
(I've never used a locking indexer config, so I don't have any clue if there are bugs lurking there.)
The following user(s) said Thank You: Diederik
Please Log in or Create an account to join the conversation.
18 Sep 2017 15:03 #99087
by Diederik
Replied by Diederik on topic Locking Indexer Function
Please see .txt
Contents is as follows:
#*******************
# AXIS A
#*******************
setp pid.a.Pgain [AXIS_3]P
setp pid.a.Igain [AXIS_3]I
setp pid.a.Dgain [AXIS_3]D
setp pid.a.bias [AXIS_3]BIAS
setp pid.a.FF0 [AXIS_3]FF0
setp pid.a.FF1 [AXIS_3]FF1
setp pid.a.FF2 [AXIS_3]FF2
setp pid.a.deadband [AXIS_3]DEADBAND
setp pid.a.maxoutput [AXIS_3]MAX_OUTPUT
setp pid.a.error-previous-target true
net a-index-enable <=> pid.a.index-enable
net a-enable => pid.a.enable
net a-pos-cmd => pid.a.command
net a-vel-cmd => pid.a.command-deriv
net a-pos-fb => pid.a.feedback
net a-output => pid.a.output
# ---PWM Generator signals/setup---
setp hm2_7i92.0.7i77.0.1.analogout3-scalemax [AXIS_3]OUTPUT_SCALE
setp hm2_7i92.0.7i77.0.1.analogout3-minlim [AXIS_3]OUTPUT_MIN_LIMIT
setp hm2_7i92.0.7i77.0.1.analogout3-maxlim [AXIS_3]OUTPUT_MAX_LIMIT
net a-output => hm2_7i92.0.7i77.0.1.analogout3
net a-pos-cmd axis.3.motor-pos-cmd
net a-enable axis.3.amp-enable-out
# ---Encoder feedback signals/setup---
setp hm2_7i92.0.encoder.06.counter-mode 0
setp hm2_7i92.0.encoder.06.filter 1
setp hm2_7i92.0.encoder.06.index-invert 0
setp hm2_7i92.0.encoder.06.index-mask 0
setp hm2_7i92.0.encoder.06.index-mask-invert 0
setp hm2_7i92.0.encoder.06.scale [AXIS_3]ENCODER_SCALE
net a-pos-fb <= hm2_7i92.0.encoder.06.position
net a-vel-fb <= hm2_7i92.0.encoder.06.velocity
net a-pos-fb => axis.3.motor-pos-fb
net a-index-enable axis.3.index-enable <=> hm2_7i92.0.encoder.06.index-enable
net a-pos-rawcounts <= hm2_7i92.0.encoder.06.rawcounts
# ---setup home / limit switch signals---
net home-a => axis.3.home-sw-in
net a-neg-limit => axis.3.neg-lim-sw-in
net a-pos-limit => axis.3.pos-lim-sw-in
net A-axis-unlock <= axis.3.unlock => classicladder.0.in-29
net E14.1/58.7-A-AxisUnclamped <= hm2_7i92.0.7i77.0.3.input-21 => axis.3.is-unlocked
Then INI File:
#********************
# Axis A
#********************
[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 1
MAX_VELOCITY = 3.80
MAX_ACCELERATION = 120.0
P = 10.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
#0.6
DEADBAND = 0.0005
MAX_OUTPUT = 0.0
ENCODER_SCALE = -1000
OUTPUT_SCALE = 10.0
OUTPUT_MIN_LIMIT = -10.0
OUTPUT_MAX_LIMIT = 10.0
BACKLASH = 0.0
MIN_LIMIT = -190.0
MAX_LIMIT = 20
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 3.333333
HOME_LATCH_VEL = -1.000000
HOME_FINAL_VEL = 3.666667
#HOME_USE_INDEX = YES
HOME_SEQUENCE = 2
LOCKING_INDEXER = 1
Contents is as follows:
#*******************
# AXIS A
#*******************
setp pid.a.Pgain [AXIS_3]P
setp pid.a.Igain [AXIS_3]I
setp pid.a.Dgain [AXIS_3]D
setp pid.a.bias [AXIS_3]BIAS
setp pid.a.FF0 [AXIS_3]FF0
setp pid.a.FF1 [AXIS_3]FF1
setp pid.a.FF2 [AXIS_3]FF2
setp pid.a.deadband [AXIS_3]DEADBAND
setp pid.a.maxoutput [AXIS_3]MAX_OUTPUT
setp pid.a.error-previous-target true
net a-index-enable <=> pid.a.index-enable
net a-enable => pid.a.enable
net a-pos-cmd => pid.a.command
net a-vel-cmd => pid.a.command-deriv
net a-pos-fb => pid.a.feedback
net a-output => pid.a.output
# ---PWM Generator signals/setup---
setp hm2_7i92.0.7i77.0.1.analogout3-scalemax [AXIS_3]OUTPUT_SCALE
setp hm2_7i92.0.7i77.0.1.analogout3-minlim [AXIS_3]OUTPUT_MIN_LIMIT
setp hm2_7i92.0.7i77.0.1.analogout3-maxlim [AXIS_3]OUTPUT_MAX_LIMIT
net a-output => hm2_7i92.0.7i77.0.1.analogout3
net a-pos-cmd axis.3.motor-pos-cmd
net a-enable axis.3.amp-enable-out
# ---Encoder feedback signals/setup---
setp hm2_7i92.0.encoder.06.counter-mode 0
setp hm2_7i92.0.encoder.06.filter 1
setp hm2_7i92.0.encoder.06.index-invert 0
setp hm2_7i92.0.encoder.06.index-mask 0
setp hm2_7i92.0.encoder.06.index-mask-invert 0
setp hm2_7i92.0.encoder.06.scale [AXIS_3]ENCODER_SCALE
net a-pos-fb <= hm2_7i92.0.encoder.06.position
net a-vel-fb <= hm2_7i92.0.encoder.06.velocity
net a-pos-fb => axis.3.motor-pos-fb
net a-index-enable axis.3.index-enable <=> hm2_7i92.0.encoder.06.index-enable
net a-pos-rawcounts <= hm2_7i92.0.encoder.06.rawcounts
# ---setup home / limit switch signals---
net home-a => axis.3.home-sw-in
net a-neg-limit => axis.3.neg-lim-sw-in
net a-pos-limit => axis.3.pos-lim-sw-in
net A-axis-unlock <= axis.3.unlock => classicladder.0.in-29
net E14.1/58.7-A-AxisUnclamped <= hm2_7i92.0.7i77.0.3.input-21 => axis.3.is-unlocked
Then INI File:
#********************
# Axis A
#********************
[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 1
MAX_VELOCITY = 3.80
MAX_ACCELERATION = 120.0
P = 10.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
#0.6
DEADBAND = 0.0005
MAX_OUTPUT = 0.0
ENCODER_SCALE = -1000
OUTPUT_SCALE = 10.0
OUTPUT_MIN_LIMIT = -10.0
OUTPUT_MAX_LIMIT = 10.0
BACKLASH = 0.0
MIN_LIMIT = -190.0
MAX_LIMIT = 20
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 3.333333
HOME_LATCH_VEL = -1.000000
HOME_FINAL_VEL = 3.666667
#HOME_USE_INDEX = YES
HOME_SEQUENCE = 2
LOCKING_INDEXER = 1
Please Log in or Create an account to join the conversation.
18 Sep 2017 15:07 #99088
by Diederik
Replied by Diederik on topic Locking Indexer Function
Everything on the locking indexer works well. I just need it to reset as soon as machine disable. Because the axis.N.unlock remains on when machine-is-on is low, then when I enable the machine again, then axis.N.unlock remains on, and Then I cannot do anything with the A axis again.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
18 Sep 2017 16:24 #99091
by Todd Zuercher
Replied by Todd Zuercher on topic Locking Indexer Function
Some quick experimentation in a simulation config, seems to imply that there could be some sort of bug there.
Could you try to re-home the A-axis after re-enabling the machine after such a fault? Trying that may reset it. In the Axis user interface menu "Machine/Homing/Home Axis A".
But to me it would seem that Linuxcnc should automatically reset the axis to locked when the machine is disabled (in the F2 power off state) and it doesn't appear to do that. I would suggest you file a bug report.
Could you try to re-home the A-axis after re-enabling the machine after such a fault? Trying that may reset it. In the Axis user interface menu "Machine/Homing/Home Axis A".
But to me it would seem that Linuxcnc should automatically reset the axis to locked when the machine is disabled (in the F2 power off state) and it doesn't appear to do that. I would suggest you file a bug report.
The following user(s) said Thank You: Diederik
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
18 Sep 2017 16:35 #99092
by Todd Zuercher
Replied by Todd Zuercher on topic Locking Indexer Function
You might also be able to just issue an MDI movement command for the A axis, and it may just reset itself.
Please Log in or Create an account to join the conversation.
18 Sep 2017 20:13 #99097
by Diederik
Replied by Diederik on topic Locking Indexer Function
thanks for the advice. the problem is that I am not the one operating the machine, so it must be easy for the operator
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
18 Sep 2017 21:17 - 18 Sep 2017 21:18 #99098
by Todd Zuercher
Replied by Todd Zuercher on topic Locking Indexer Function
Does doing either of those things reset it for you? If it does, it would not be difficult to create a button that uses a simple HaluiMDI command to reset it.
(If an operator can't handle sending a simple MDI command or home an axis maybe you need better machine operators.)
(If an operator can't handle sending a simple MDI command or home an axis maybe you need better machine operators.)
Last edit: 18 Sep 2017 21:18 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
19 Sep 2017 06:15 - 19 Sep 2017 06:20 #99111
by Diederik
Replied by Diederik on topic Locking Indexer Function
I agree with you, but we are in South Africa, and some of these operators uses Fanuc Machines, and I think it is a common thing with humans in general to get nervous, and rather return to the familiar in stead of exploring the new. (I'm trying to say it as nice as I can... My thoughts is exactly like yours) But the fact of the matter is that even when I try get the machine out of that error I struggle. It is quite a big machine, To give you an Idea, We climb into the machine to load the gear/material into the machine with a crane, The components/gears that is being cut weighs up to 200kg, so When the gear starts cutting, we want to keep the setup, and we are working our way around the problem, but we for obvious reasons want to improve the machine, and have it run as sufficient and problem free as possible else we would have continued struggling with the old Bosch control. We retrofit machines with linuxcnc to get the machines under our control, and get the machine to maximum productivity.
So to answer your question, to zero return the machine, the operator needs to disconnect the coolant/oil hose which is a 50mm(2") Pipe, and we need to use a 19 Spanner(3/4") to loosen the pipe. and it takes about 1-2 minutes to home the A-Axis. So, it would be best if we can solve the bug, of whenever there is any error during indexing, and machine is disabled, the Clamp/Lock must reset. It's also a accuracy issue, because when you have to home the machine, one has to pick up on the tool again.
To give you an idea of the size of the gears, one gear takes about 2 hours minimum to complete. So, I do not blame our operators too much for complaining to go through this long exercise.
This is the same machine that we're working on. :
forum.linuxcnc.org/10-advanced-configura...-cnc-hobbing-machine
Thanks for the advice so far.
I trust that we can change the behavior of the "locking indexer" as I also think this should be done as a safety feature.
The behavior as it is now works well. The only thing that I think should change, is that as soon as motion.motion-enabled changes to false, or even halui.machine.is-on changes to false, then the axis.3.unlock should also reset/change to false. And only when movement for the axis is commanded again, should it "unlock".
So to answer your question, to zero return the machine, the operator needs to disconnect the coolant/oil hose which is a 50mm(2") Pipe, and we need to use a 19 Spanner(3/4") to loosen the pipe. and it takes about 1-2 minutes to home the A-Axis. So, it would be best if we can solve the bug, of whenever there is any error during indexing, and machine is disabled, the Clamp/Lock must reset. It's also a accuracy issue, because when you have to home the machine, one has to pick up on the tool again.
To give you an idea of the size of the gears, one gear takes about 2 hours minimum to complete. So, I do not blame our operators too much for complaining to go through this long exercise.
This is the same machine that we're working on. :
forum.linuxcnc.org/10-advanced-configura...-cnc-hobbing-machine
Thanks for the advice so far.
I trust that we can change the behavior of the "locking indexer" as I also think this should be done as a safety feature.
The behavior as it is now works well. The only thing that I think should change, is that as soon as motion.motion-enabled changes to false, or even halui.machine.is-on changes to false, then the axis.3.unlock should also reset/change to false. And only when movement for the axis is commanded again, should it "unlock".
Last edit: 19 Sep 2017 06:20 by Diederik.
Please Log in or Create an account to join the conversation.
19 Sep 2017 15:54 #99122
by dgarrett
Replied by dgarrett on topic Locking Indexer Function
I've created a patch and a branch (based on the
2.7 branch) to test a fix:
github.com/LinuxCNC/linuxcnc/commits/dgarr/unlocking_fix
github.com/LinuxCNC/linuxcnc/commit/3b31...a87f22db14381586fbae
The buildbot will make debs for this 'scratch' branch for
a limited number of days.
There may be unrecognized consequences to the fix, so thorough
testing is recommended. If the patch does what you want, you
will need to ask the release manager (Seb) to merge as a
bugfix to the 2.7 branch.
2.7 branch) to test a fix:
github.com/LinuxCNC/linuxcnc/commits/dgarr/unlocking_fix
github.com/LinuxCNC/linuxcnc/commit/3b31...a87f22db14381586fbae
The buildbot will make debs for this 'scratch' branch for
a limited number of days.
There may be unrecognized consequences to the fix, so thorough
testing is recommended. If the patch does what you want, you
will need to ask the release manager (Seb) to merge as a
bugfix to the 2.7 branch.
The following user(s) said Thank You: Diederik
Please Log in or Create an account to join the conversation.
Time to create page: 0.178 seconds