Install Advice (HOME_USE_INDEX with stepper using an encoder)
10 Apr 2023 17:29 #268762
by jtrantow
Install Advice was created by jtrantow
I have four machines running on identical computers. Two use PP and two use Mesa cards. I use tool length setters and probes. The monitors are 1024x768 touchscreens. Linuxcnc software originated with the Linuxcnc Buster ISO and I have been running 2.8.2 using gmoccapy and probe_screen for quite awhile and have been quite happy.
One of the glass scales on the mill was damaged and I finally got around to replacing it with a new magnetic scale which has index signals every 50mm.
Q1) It appears that I should update to 2.9 to use the index signal with homing? A/B are already working with 1u magnetic scale and I can see the index signal with halmeter. I want to home to my existing limit switch, then move to zero the scale index. My understanding is this is possible with HOME_USE_INDEX?
In case it's important, I am using closed loop steppers and using scales to close the loop.
net y-pos-fb <= hm2_7i92.0.encoder.01.position => hm2_7i92.0.encoder.01.index-enable
Q2) Assuming I need to update to 2.9 for HOME_USE_INDEX, what's the best way to use a probe? When I update to 2.9, it appears to update to python3 which doesn't work with the probe screen python scripts that are used via gladevcp.
Q3) Does probe_basic still have a 1920x1080 screen requirement? It looks like there is a pretty clear path from Bullseye or Bookwork to Probe basic. I don't think isn't an option for me with the low res touch screens? So I think I'm staying with gmoccapy and some time of probe add on.
Q4) Are there any latency issues updating beyond Buster? (My router and my friend's mill are still using PPs.)
I only use the linuxcnc computers for machine control. I'm not opposed to update beyond Buster if it makes things easier but I'm not looking for any new linux OS features.
I'm comfortable changing things around in the .hal configurations or modifying scripts like M6, but I find the prereq and compatibility installs frustrating. To maintain my sanity, I to keep all four computers running the same software. My approach is to get my mill working correctly, then I clone the entire drive to a usb drive and copy it to the other machines.
I'd appreciate any simple install that satisfies:
One of the glass scales on the mill was damaged and I finally got around to replacing it with a new magnetic scale which has index signals every 50mm.
Q1) It appears that I should update to 2.9 to use the index signal with homing? A/B are already working with 1u magnetic scale and I can see the index signal with halmeter. I want to home to my existing limit switch, then move to zero the scale index. My understanding is this is possible with HOME_USE_INDEX?
In case it's important, I am using closed loop steppers and using scales to close the loop.
net y-pos-fb <= hm2_7i92.0.encoder.01.position => hm2_7i92.0.encoder.01.index-enable
Q2) Assuming I need to update to 2.9 for HOME_USE_INDEX, what's the best way to use a probe? When I update to 2.9, it appears to update to python3 which doesn't work with the probe screen python scripts that are used via gladevcp.
Q3) Does probe_basic still have a 1920x1080 screen requirement? It looks like there is a pretty clear path from Bullseye or Bookwork to Probe basic. I don't think isn't an option for me with the low res touch screens? So I think I'm staying with gmoccapy and some time of probe add on.
Q4) Are there any latency issues updating beyond Buster? (My router and my friend's mill are still using PPs.)
I only use the linuxcnc computers for machine control. I'm not opposed to update beyond Buster if it makes things easier but I'm not looking for any new linux OS features.
I'm comfortable changing things around in the .hal configurations or modifying scripts like M6, but I find the prereq and compatibility installs frustrating. To maintain my sanity, I to keep all four computers running the same software. My approach is to get my mill working correctly, then I clone the entire drive to a usb drive and copy it to the other machines.
I'd appreciate any simple install that satisfies:
- Linuxcnc version that support encoder index HOME_USE_INDEX. (2.9?)
- GUI support of 1024x768 touch screen including probing. (GMOCCAPY plus ??? for probing)
- Debian versions with acceptable latency for PP configs.
- All in a simple installation?
Please Log in or Create an account to join the conversation.
10 Apr 2023 20:04 #268782
by JPL
Replied by JPL on topic Install Advice
No, you do not need v2.9 as 2.8.4 (current stable version) is supporting HOME_USE_INDEX. Have a look here: linuxcnc.org/docs/stable/html/config/ini-homing.html . See the last 2 diagrams of section "5 homing sequence". Those are showing how homing is executed when USE_INDEX= true.Q1) It appears that I should update to 2.9 to use the index signal with homing? A/B are already working with 1u magnetic scale and I can see the index signal with halmeter. I want to home to my existing limit switch, then move to zero the scale index. My understanding is this is possible with HOME_USE_INDEX?
In case it's important, I am using closed loop steppers and using scales to close the loop.
net y-pos-fb <= hm2_7i92.0.encoder.01.position => hm2_7i92.0.encoder.01.index-enable
Please Log in or Create an account to join the conversation.
12 Apr 2023 04:39 #268864
by jtrantow
Replied by jtrantow on topic Install Advice
Are you sure 2.8.4 HOME_USE_INDEX works with the Mesa encoders?
I tried 2.8.4 and the latest 2.8.4.23 from the buildbot.
When I run this y axis open loop it moves correctly and homes to the switch as expected. When I set HOME_USE_INDEX=yes the motion starts at an unreferenced value and homes to the switch and I momentarily see the expected HOME_OFFSET show on the display. Then it moves to the index latch at which time it reverts back to the unreferenced position it had immediately before it reached the limit switch. Then in continues on to the HOME position but it's messed up because it lost the HOME_OFFSET position. I expected it to latch at the index and start the move from HOME_OFFSET.
I have y-index-enable connected.
net y-index-enable <= joint.1.index-enable => hm2_7i92.0.encoder.01.index-enable
Some of the other posts indicate this works in 2.9 when the loop is closed? Or in open loop with a Mesa fpga update.
I have been able to toggle my axis between open and closed loop using:
#
# 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
Since, I changed out the 5um glass scale for the 1um magnetic scale with index I get joint following errors when I run closed loop. I don't understand this as the scale works correctly in open loop mode and worked with the 5um scale. Any thoughts would be appreciated. If HOME_USE_INDEX does work with closed loop this may be the key to getting this working.
I tried 2.8.4 and the latest 2.8.4.23 from the buildbot.
When I run this y axis open loop it moves correctly and homes to the switch as expected. When I set HOME_USE_INDEX=yes the motion starts at an unreferenced value and homes to the switch and I momentarily see the expected HOME_OFFSET show on the display. Then it moves to the index latch at which time it reverts back to the unreferenced position it had immediately before it reached the limit switch. Then in continues on to the HOME position but it's messed up because it lost the HOME_OFFSET position. I expected it to latch at the index and start the move from HOME_OFFSET.
I have y-index-enable connected.
net y-index-enable <= joint.1.index-enable => hm2_7i92.0.encoder.01.index-enable
Some of the other posts indicate this works in 2.9 when the loop is closed? Or in open loop with a Mesa fpga update.
I have been able to toggle my axis between open and closed loop using:
#
# 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
Since, I changed out the 5um glass scale for the 1um magnetic scale with index I get joint following errors when I run closed loop. I don't understand this as the scale works correctly in open loop mode and worked with the 5um scale. Any thoughts would be appreciated. If HOME_USE_INDEX does work with closed loop this may be the key to getting this working.
Please Log in or Create an account to join the conversation.
12 Apr 2023 06:29 #268869
by JPL
Replied by JPL on topic Install Advice
Please Log in or Create an account to join the conversation.
12 Apr 2023 06:32 #268870
by JPL
Humm, I see that for every single joint in your ini config you have "HOME_USE_INDEX = NO". That should be YES...
Replied by JPL on topic Install Advice
Any thoughts would be appreciated.
Humm, I see that for every single joint in your ini config you have "HOME_USE_INDEX = NO". That should be YES...
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19188
- Thank you received: 6432
12 Apr 2023 12:09 #268892
by tommylight
Replied by tommylight on topic Install Advice
Closing the loop in LinuxCNC will probably require tuning the PID and FF values, hence joint errors.
To make it easier, make 2 configs, one for open loop so you can check that everything works, one for closed loop, do the tuning, then try to get homing right.
As a stab in the dark, try changing HOME and HOME_OFFSET values, see if that works for you.
To make it easier, make 2 configs, one for open loop so you can check that everything works, one for closed loop, do the tuning, then try to get homing right.
As a stab in the dark, try changing HOME and HOME_OFFSET values, see if that works for you.
Please Log in or Create an account to join the conversation.
12 Apr 2023 14:09 #268897
by PCW
Replied by PCW on topic Install Advice
Your P term (1000) seems way too high for a encoder feedback system.
A P term of 1000 works with local (stepgen position counter) feedback
because there is nearly 0 delay between velocity command and position
feedback. This is not the case with encoder feedback where there are delays
in the drive and mechanics
A P term of 1000 works with local (stepgen position counter) feedback
because there is nearly 0 delay between velocity command and position
feedback. This is not the case with encoder feedback where there are delays
in the drive and mechanics
Please Log in or Create an account to join the conversation.
12 Apr 2023 17:37 #268913
by jtrantow
Replied by jtrantow on topic Install Advice
My error was the wrong sign for my encoder scale. All is working when that was fixed.
I only have an index signal on my Y axis with the new magnetic scale. I might have had that turned off in the file I attached, but it's true and working now.
I only have an index signal on my Y axis with the new magnetic scale. I might have had that turned off in the file I attached, but it's true and working now.
Please Log in or Create an account to join the conversation.
12 Apr 2023 17:45 #268916
by jtrantow
Replied by jtrantow on topic Install Advice
I have been using those PID values with the glass scales and closed loop steppers on XYZ for quite a while. This is probably "working" because I opened up the errors? I haven't bothered going through the tune as it worked. Tuning is definitely on the todo list.
[JOINT_1]
TYPE = LINEAR
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
setp pid.y.maxerror 0.012700
Can you point me to the information for PID tuning a closed loop stepper with encoder feedback?
[JOINT_1]
TYPE = LINEAR
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 250.0
setp pid.y.maxerror 0.012700
Can you point me to the information for PID tuning a closed loop stepper with encoder feedback?
Please Log in or Create an account to join the conversation.
12 Apr 2023 21:08 #268936
by PCW
Replied by PCW on topic Install Advice
Its similar to tuning a analog velocity servo
I would think the main thing to tune is P
and perhaps adding a tiny bit of ff2
I would think the main thing to tune is P
and perhaps adding a tiny bit of ff2
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds