Install Advice (HOME_USE_INDEX with stepper using an encoder)

More
20 Jan 2024 15:48 #291207 by PCW
Yes, you need 2.9.1 or > to support Step/Dir index

Please Log in or Create an account to join the conversation.

More
20 Jan 2024 20:05 #291217 by jtrantow
I updated to 2.9.2 and the new "sdi" bit file and both my mill and lathe are now homing correctly! (Thanks)

To close off this HOME_USE_INDEX with a stepper and encoder topic:
  1. Pncconf generates .hal with two options for -pos-fb signal. Either stepgen position-fb or encoder position. Both options have their uses.
  2. The default configs will NOT HOME_USE_INDEX correctly with stepgen position-fb. You must connect -index-enable to stepgen index-enable for correct homing with index.
  3. stepgen index-enable is only available in .bit files with "sdi" in the file name.
  4. stepgen index-enable bit files only work with linuxcnc > 2.9.1

Here are the appropriate lines I add to pncconf generated .hal file:
#
# If you want to use x-pos-fb from the stepgenposition-fb with HOME_USE_INDEX or the encoder position as joint fb,  then you will need to use a bit file that supports stepgen.00.index-enable.
# This is required when using stepgen posititon for feedback and doesn't hurt when you use the encoder for feedback.
#
net x-index-enable  <=> joint.0.index-enable  <=>  hm2_7i96.0.encoder.00.index-enable <=>  pid.x.index-enable <=> hm2_7i96.0.stepgen.00.index-enable
#
# Enable/Disable BOTH the following TWO lines to use the encoder to close the control loop.
# Use both the encoder position and velocity.
# This should be the optimal configuration.
net x-pos-fb         <= hm2_7i96.0.encoder.00.position  => pid.x.feedback        => joint.0.motor-pos-fb
net x-vel-fb         <= hm2_7i96.0.encoder.00.velocity  => pid.x.feedback-deriv
#
# Enable/Disable BOTH the following TWO lines to use stepgen position to close the control loop.
# Add a new signal from encoder position so it can be used independent of pid fb signal. This allows encoder to be used as DRO without closing the control loop.
# Do not use the encoder x-vel-fb is you are using the stepgen position for x-pos-fb.
#
#net x-pos-fb         <= hm2_7i96.0.stepgen.00.position-fb  => pid.x.feedback    
#net x-pos-encoder    <= hm2_7i96.0.encoder.00.position  => joint.0.motor-pos-fb
 
The following user(s) said Thank You: Mr. Mass

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum