soft limits different after power cycle
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18592
- Thank you received: 5113
16 Oct 2017 21:12 - 16 Oct 2017 21:13 #100449
by PCW
Replied by PCW on topic soft limits different after power cycle
Dont know about a tutorial but for encoder feedback you need to replace:
net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
with
net x-pos-fb <= hm2_5i25.0.encoder.00.position
(and for all axis where you want closed loop with encoder feedback)
Note that the encoder and stepgen scaling and directions must be correct
or you will get an immediate following error
net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
with
net x-pos-fb <= hm2_5i25.0.encoder.00.position
(and for all axis where you want closed loop with encoder feedback)
Note that the encoder and stepgen scaling and directions must be correct
or you will get an immediate following error
Last edit: 16 Oct 2017 21:13 by PCW.
Please Log in or Create an account to join the conversation.
- RayJr
- Offline
- Senior Member
-
Less
More
- Posts: 64
- Thank you received: 4
18 Oct 2017 01:41 #100496
by RayJr
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Replied by RayJr on topic soft limits different after power cycle
Thank you, Peter!
Changing that HAL connection corrected the homing issue.
Now, why?
I had the stepgen feedback connected to start checking out the machine in open loop. Was there another connection I should have done to make that work correctly?
Thank you, again for your support!
Ray
Changing that HAL connection corrected the homing issue.
Now, why?
I had the stepgen feedback connected to start checking out the machine in open loop. Was there another connection I should have done to make that work correctly?
Thank you, again for your support!
Ray
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18592
- Thank you received: 5113
18 Oct 2017 03:02 #100499
by PCW
Replied by PCW on topic soft limits different after power cycle
It has to do with the returned position from the encoder and stepgen
if index enable is true and the index is detected, the position pin from the encoder
is zeroed at the index location (effectively in hardware), but a
stepgen has no index input and is not zeroed
There is a index capability in the stepgen hardware but it is not currently supported
by the hm2 driver
if index enable is true and the index is detected, the position pin from the encoder
is zeroed at the index location (effectively in hardware), but a
stepgen has no index input and is not zeroed
There is a index capability in the stepgen hardware but it is not currently supported
by the hm2 driver
Please Log in or Create an account to join the conversation.
- RayJr
- Offline
- Senior Member
-
Less
More
- Posts: 64
- Thank you received: 4
18 Oct 2017 03:35 #100500
by RayJr
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Replied by RayJr on topic soft limits different after power cycle
That makes a lot of sense!
Now on to tuning up each axis.
Is there some magic in getting pncconf to enable the test panels, and have them work?
Ray
Now on to tuning up each axis.
Is there some magic in getting pncconf to enable the test panels, and have them work?
Ray
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18592
- Thank you received: 5113
18 Oct 2017 03:57 #100502
by PCW
Replied by PCW on topic soft limits different after power cycle
I dont think the test panels work but once you are this far along, i would use the calibrate menu in LinuxCNC
along with halscope for tuning
along with halscope for tuning
Please Log in or Create an account to join the conversation.
- RayJr
- Offline
- Senior Member
-
Less
More
- Posts: 64
- Thank you received: 4
22 Oct 2017 23:54 - 22 Oct 2017 23:55 #100643
by RayJr
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Replied by RayJr on topic Sanity Check (was soft limits different after power cycle)
OK, I have 3 axises moving accurately, and the spindle getting to speed. I know the PIDs will need more tuning.
I am still having some resonance issues on X & Y.
Now I am wondering if the mentors here would take a moment to look over my config files as a "sanity check" before I move on to more advanced topics.
My concerns are scaling on the axises, and the spindle section, as I want to do rigid tapping.
Please point all my bone head moves, and ignorant oversights.
Willing to learn, but freely admit that I don't know what I don't know.
Thank you again for all of your expert help!
Ray
I am still having some resonance issues on X & Y.
Now I am wondering if the mentors here would take a moment to look over my config files as a "sanity check" before I move on to more advanced topics.
My concerns are scaling on the axises, and the spindle section, as I want to do rigid tapping.
Please point all my bone head moves, and ignorant oversights.
Willing to learn, but freely admit that I don't know what I don't know.
Thank you again for all of your expert help!
Ray
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Last edit: 22 Oct 2017 23:55 by RayJr.
Please Log in or Create an account to join the conversation.
- RayJr
- Offline
- Senior Member
-
Less
More
- Posts: 64
- Thank you received: 4
26 Oct 2017 02:01 #100825
by RayJr
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Replied by RayJr on topic Sanity Check (was soft limits different after power cycle)
Should the signal:
net x-vel-fb <= hm2_5i25.0.encoder.01.velocity
be connected to something? (y & z as well?)
Another thing I am seeing on this machine is:
after the final move from homing, the "actual" dro is showing a pretty big discrepancy from the "machine" dro.
I would think that in closed loop the should be the same. This is why I think there is something not quite right in the hal file.
This is so on x & y. I have not scrutinized z yet.
Ray
net x-vel-fb <= hm2_5i25.0.encoder.01.velocity
be connected to something? (y & z as well?)
Another thing I am seeing on this machine is:
after the final move from homing, the "actual" dro is showing a pretty big discrepancy from the "machine" dro.
I would think that in closed loop the should be the same. This is why I think there is something not quite right in the hal file.
This is so on x & y. I have not scrutinized z yet.
Ray
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4998
- Thank you received: 1459
26 Oct 2017 13:47 - 26 Oct 2017 13:53 #100833
by Todd Zuercher
Replied by Todd Zuercher on topic Sanity Check (was soft limits different after power cycle)
Usually that would be connected to pid.N.feedback-deriv. But if nothing is connected to it, the PID component is smart enough to calculate it from the position feedback. However the calculated value isn't as good as the real value given by the HM2 encoder. The HM2 stepgen does not have a velocity feedback, so that is why your initial stepper config didn't use it.
If your following error is large (commanded position differs greatly from actual). Then your PID loop needs to be tuned better.
Or are you referring to another DRO outside of Linuxcnc?
If your following error is large (commanded position differs greatly from actual). Then your PID loop needs to be tuned better.
Or are you referring to another DRO outside of Linuxcnc?
Last edit: 26 Oct 2017 13:53 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
- RayJr
- Offline
- Senior Member
-
Less
More
- Posts: 64
- Thank you received: 4
27 Oct 2017 06:37 - 28 Oct 2017 18:05 #100873
by RayJr
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Replied by RayJr on topic Sanity Check (was soft limits different after power cycle)
Hi Todd.
I added that line for each axis.
The tuning seems a lot more responsive & predictable now.
But I am still having issues with how far it moves, although it is now within a few thousandths, where before it was out several hundredths her inch. (my external dro agrees with the linuxcnc internal dro).
Here is what I have for each axises now:
Still getting stalls & resonance if I try to move at 60IPM. Moves OK if I keep it at or below 50.
Thank you for your help!
Ray
I added that line for each axis.
The tuning seems a lot more responsive & predictable now.
But I am still having issues with how far it moves, although it is now within a few thousandths, where before it was out several hundredths her inch. (my external dro agrees with the linuxcnc internal dro).
Here is what I have for each axises now:
Warning: Spoiler!
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [AXIS_0]P
setp pid.x.Igain [AXIS_0]I
setp pid.x.Dgain [AXIS_0]D
setp pid.x.bias [AXIS_0]BIAS
setp pid.x.FF0 [AXIS_0]FF0
setp pid.x.FF1 [AXIS_0]FF1
setp pid.x.FF2 [AXIS_0]FF2
setp pid.x.deadband [AXIS_0]DEADBAND
setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT
setp pid.x.error-previous-target true
setp pid.x.maxerror .0005
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-vel-cmd => pid.x.command-deriv
net x-pos-fb => pid.x.feedback
net x-vel-fb => pid.x.feedback-deriv
net x-output => pid.x.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [AXIS_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 1
setp hm2_5i25.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAXVEL
setp hm2_5i25.0.gpio.019.invert_output true
setp hm2_5i25.0.gpio.021.invert_output true
# ---closedloop stepper signals---
net x-pos-cmd <= axis.0.motor-pos-cmd
net x-vel-cmd <= axis.0.joint-vel-cmd
net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd
#net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
#net x-pos-fb => axis.0.motor-pos-fb
net x-enable <= axis.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [AXIS_0]ENCODER_SCALE
net x-pos-fb <= hm2_5i25.0.encoder.00.position
net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
net x-pos-fb => axis.0.motor-pos-fb
net x-index-enable axis.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_5i25.0.encoder.00.rawcounts
# ---setup home / limit switch signals---
net min-home-x => axis.0.home-sw-in
net min-home-x => axis.0.neg-lim-sw-in
net max-x => axis.0.pos-lim-sw-in
# AXIS X
#*******************
setp pid.x.Pgain [AXIS_0]P
setp pid.x.Igain [AXIS_0]I
setp pid.x.Dgain [AXIS_0]D
setp pid.x.bias [AXIS_0]BIAS
setp pid.x.FF0 [AXIS_0]FF0
setp pid.x.FF1 [AXIS_0]FF1
setp pid.x.FF2 [AXIS_0]FF2
setp pid.x.deadband [AXIS_0]DEADBAND
setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT
setp pid.x.error-previous-target true
setp pid.x.maxerror .0005
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-vel-cmd => pid.x.command-deriv
net x-pos-fb => pid.x.feedback
net x-vel-fb => pid.x.feedback-deriv
net x-output => pid.x.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [AXIS_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 1
setp hm2_5i25.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAXVEL
setp hm2_5i25.0.gpio.019.invert_output true
setp hm2_5i25.0.gpio.021.invert_output true
# ---closedloop stepper signals---
net x-pos-cmd <= axis.0.motor-pos-cmd
net x-vel-cmd <= axis.0.joint-vel-cmd
net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd
#net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
#net x-pos-fb => axis.0.motor-pos-fb
net x-enable <= axis.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [AXIS_0]ENCODER_SCALE
net x-pos-fb <= hm2_5i25.0.encoder.00.position
net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
net x-pos-fb => axis.0.motor-pos-fb
net x-index-enable axis.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_5i25.0.encoder.00.rawcounts
# ---setup home / limit switch signals---
net min-home-x => axis.0.home-sw-in
net min-home-x => axis.0.neg-lim-sw-in
net max-x => axis.0.pos-lim-sw-in
Still getting stalls & resonance if I try to move at 60IPM. Moves OK if I keep it at or below 50.
Thank you for your help!
Ray
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Last edit: 28 Oct 2017 18:05 by RayJr.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18592
- Thank you received: 5113
27 Oct 2017 11:57 #100880
by PCW
Replied by PCW on topic Sanity Check (was soft limits different after power cycle)
I would take out the
setp pid.N.maxerror .0005
Lines
This (maxerror) makes sense for a open loop system but not for closed loop
setp pid.N.maxerror .0005
Lines
This (maxerror) makes sense for a open loop system but not for closed loop
The following user(s) said Thank You: RayJr
Please Log in or Create an account to join the conversation.
Time to create page: 0.085 seconds