Closed loop operation following error
- jtrantow
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 18
12 Apr 2023 05:08 #268866
by jtrantow
Closed loop operation following error was created by jtrantow
I have been running my mill with closed loop steppers and using glass scales connected to encoders(no index) for several years. I damaged the 5um y scale and replaced it with a 1um magnetic scale with index. The damaged glass scale was giving me quadrature encoder errors at the damaged section of the scale, so I disabled the fb mode for that axis. (I sometimes disable fb on the other axis too when I want to simplify the system.)
#
# In open loop, -pos-fb goes directly from stepgen to joint.
# In closed loop, -pos-fb is provided by the encoder position.
#
net y-pos-fb <= hm2_7i92.0.stepgen.01.position-fb => joint.1.motor-pos-fb
#net y-pos-fb <= hm2_7i92.0.encoder.01.position => joint.1.motor-pos-fb
But when I installed the new scale and enable the encoder position as y-pos-fb, I get a joint following error? The encoder is scaled correctly and my initial thought was this was because I was playing around with HOME_USE_INDEX, but I think it's the other way around. i.e. I think I need to use encoder feedback in order to use HOME_USE_INDEX?
forum.linuxcnc.org/9-installing-linuxcnc...nstall-advice#268864
I started a new topic looking for hints on why I get joint following errors when I updated from 5um encoder to 1um encoder with index. (works for open loop)
Provided I can get the loop closed, should I expect HOME_USE_INDEX to work with 2.8.4 and my existing 7i92/7i85 bitfile?
Do I need to update the 7i92 files to work open loop? I'm not clear on when an updated bitfile is needed. My .hal always has a pid between the joint and stepgen that converts y-pos-cmd to a y-output velocity command.
#
# In open loop, -pos-fb goes directly from stepgen to joint.
# In closed loop, -pos-fb is provided by the encoder position.
#
net y-pos-fb <= hm2_7i92.0.stepgen.01.position-fb => joint.1.motor-pos-fb
#net y-pos-fb <= hm2_7i92.0.encoder.01.position => joint.1.motor-pos-fb
But when I installed the new scale and enable the encoder position as y-pos-fb, I get a joint following error? The encoder is scaled correctly and my initial thought was this was because I was playing around with HOME_USE_INDEX, but I think it's the other way around. i.e. I think I need to use encoder feedback in order to use HOME_USE_INDEX?
forum.linuxcnc.org/9-installing-linuxcnc...nstall-advice#268864
I started a new topic looking for hints on why I get joint following errors when I updated from 5um encoder to 1um encoder with index. (works for open loop)
Provided I can get the loop closed, should I expect HOME_USE_INDEX to work with 2.8.4 and my existing 7i92/7i85 bitfile?
Do I need to update the 7i92 files to work open loop? I'm not clear on when an updated bitfile is needed. My .hal always has a pid between the joint and stepgen that converts y-pos-cmd to a y-output velocity command.
Please Log in or Create an account to join the conversation.
- rmu
- Offline
- Elite Member
Less
More
- Posts: 277
- Thank you received: 100
12 Apr 2023 06:03 - 12 Apr 2023 08:02 #268867
by rmu
Replied by rmu on topic Closed loop operation following error
There was a bug in hostmot drivers that generated a following error when homing to index in some specific corner case (no encoder count in one servo period or something like that), but that should be fixed in 2.8.4, 2.9-pre and main.
Last edit: 12 Apr 2023 08:02 by rmu. Reason: clarified
Please Log in or Create an account to join the conversation.
- JPL
- Offline
- Platinum Member
Less
More
- Posts: 335
- Thank you received: 113
12 Apr 2023 07:09 #268872
by JPL
Also, for HOME_USE_INDEX you only need an INDEX, this has nothing to do with open vs closed loop.
Replied by JPL on topic Closed loop operation following error
If you get a joint following error when you enable the encoder then i would first double/triple check the ENCODER_SCALE value in your ini. You can also watch the value of "hm2_7i92.0.encoder.01.position while manually moving the axis at at specific distance. This will help finding if a) the encoder is working and b) the reported distance is right (eg scaling is right)...
# In open loop, -pos-fb goes directly from stepgen to joint.
# In closed loop, -pos-fb is provided by the encoder position.
#
net y-pos-fb <= hm2_7i92.0.stepgen.01.position-fb => joint.1.motor-pos-fb
#net y-pos-fb <= hm2_7i92.0.encoder.01.position => joint.1.motor-pos-fb
But when I installed the new scale and enable the encoder position as y-pos-fb, I get a joint following error?
Also, for HOME_USE_INDEX you only need an INDEX, this has nothing to do with open vs closed loop.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19463
- Thank you received: 6529
12 Apr 2023 12:12 #268893
by tommylight
Replied by tommylight on topic Closed loop operation following error
Changing the scale requires changing PID parameters and probably FF values also.
Please Log in or Create an account to join the conversation.
- jtrantow
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 18
12 Apr 2023 14:25 #268899
by jtrantow
Replied by jtrantow on topic Closed loop operation following error
Posted late last night after multiple attempts to get it going. Kept coming back to the scale, double checked it this morning and sure enough I had the wrong sign for ENCODER_SCALE which fixes my closed loop operation. (May not be tuned well, but it's functional.)
With the encoder using the correct values, the HOME_USE_INDEX works as expected.
THANK YOU!
With the encoder using the correct values, the HOME_USE_INDEX works as expected.
THANK YOU!
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.055 seconds