Problem homing with index

More
5 years 3 months ago #214148 by PCW
Replied by PCW on topic Problem homing with index
OK backing up a bit, Are you using the step motor drives in a closed loop
with encoder feedback?

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

More
5 years 3 months ago #214160 by Stigoe
Replied by Stigoe on topic Problem homing with index
Not yet. That is the plan later, but now it's just getting homing working properly. I'm using Chinese inductive switches and since they are not incredibly accurate, I wanted to use the index marks in the scales to get more accurate homing.

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

More
5 years 3 months ago #214178 by PCW
Replied by PCW on topic Problem homing with index
LinuxCNC expects the joint position feedback to be zero'ed
at index detection. The standard stepgen does not do this
(it has no connection with index at all) So homing to index on a
step/dir system does not currently work unless you use encoder
feedback. There is new firmware and support in LinuxCNC 2.9
for homing to index on pure step/dir systems if you want to try
it. This does require a direct input for the stepgen index though
it can be shared with an encoder index say on a 7I85/7I85S

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

More
5 years 3 months ago #214181 by Stigoe
Replied by Stigoe on topic Problem homing with index
So if I want to use encoder feedback, I need to set up PID and tune it before homing to index will work? Trying the new firmware and LinuxCNC 2.9 would probably not play nice with PP, I guess? At least, not without a lot for work? I think PP is based on an early version of 2.8.

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

More
5 years 3 months ago #214191 by PCW
Replied by PCW on topic Problem homing with index
Yes I think you are stuck with encoder feedback

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

More
5 years 3 months ago - 5 years 3 months ago #214240 by Stigoe
Replied by Stigoe on topic Problem homing with index
Thanks, PCW.

So if I understand correctly, I need to add a pid-component for X and Z in .hal, something like
Code:
loadrt pid names=pid.x,pid.z 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 .000 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 # ---closedloop stepper signals--- net x-pos-cmd <= axis.0.motor-pos-cmd net x-vel-cmd <= axis.0.vel-cmd net x-output => hm2_5i25.0.stepgen.00.position-cmd net x-pos-fb <= hm2_5i25.0.encoder.02.position 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 net x-enable => pid.x.enable net x-pos-cmd => pid.x.command net x-pos-fb => pid.x.feedback net x-output <= pid.x.output
with the necessary values in the .ini-file and similar for Z-axis? This example was found at Closed loop with linear encoders but still backlash?.

Another thing, in [/url] Encoder Feedback you said encoder 0 was on the 4i85, while the encoder on 7i76e was encoder 4. I don't know if it is different between 7i76 and 7i76e, but on my 7i76, the encoder is encoder 00.[/url][/code]
Last edit: 5 years 3 months ago by Stigoe. Reason: Found several mistakes in my first attempt

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

Time to create page: 0.216 seconds
Powered by Kunena Forum