Mesa 7i84 encoder addressing

More
23 May 2018 14:44 #111062 by Nitram
Hello.

I am currently using a 7i84 in mode 2 (input pins 16/17/18/19 for encoder input).
The motion is a little jerky when jogging and thus am working on bringing in ilowpass (with reference to "jog.hal with ilowpass").

The current encoder used in hal from the 7i84 is addressed hm2_5i24.0.7i84.0.0.enc0.count

In summary, is there a syntax to obtain the A and B phases separately from the 7i84 encoder inputs other than using the (combined?) hm2_5i24.0.7i84.0.0.enc0.count address? Reason below:

Inputs for "jog.hal" encoder function calls for separate A and B phased encoder inputs:
# The MPG inputs
net mpg-a encoder.0.phase-A <= ???
net mpg-b encoder.0.phase-B <= ???

which I intend to set up only via phase A input using the total count thus:
# The MPG inputs
net mpg-a encoder.0.phase-A <= hm2_5i24.0.7i84.0.0.enc0.count
#net mpg-b encoder.0.phase-B <=

i.e. nothing for phase B.

I will be updating the HAL file tomorrow and hopefully this will work OK and a simple adjustment of ilowpass scale will make up for any lost pulses in the B phase. But if this is not successful (possibly with respect to defining direction?), is there a syntax to obtain the A and B phases separately from the 7i84 inputs to then net both A and B phases into hal as required above?

Many thanks,
Marty.

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

More
23 May 2018 14:55 #111063 by PCW
Replied by PCW on topic Mesa 7i84 encoder addressing
You don't need the A or B signals at all, only the count

(A and B are used in the jog example because a software encoder component was used, none is needed here)

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

More
23 May 2018 14:58 #111064 by Nitram
Replied by Nitram on topic Mesa 7i84 encoder addressing
Wonderful news, thanks Peter.

So just to confirm for the hal file, this would be correct, leaving the B phase out:
# The MPG inputs
net mpg-a encoder.0.phase-A <= hm2_5i24.0.7i84.0.0.enc0.count

as I can't see any other appropriate input pins for the encoder function.

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

More
23 May 2018 15:10 #111065 by Nitram
Replied by Nitram on topic Mesa 7i84 encoder addressing
Just re-read your reply and I don't think I thought about my reply enough.

Given what you've said, I think I can just take the encoder counts (hm2_5i24.0.7i84.0.0.enc0.count) and have it come directly into the ilowpass function, the encoder function (and therefore it's inputs of A and B phases) are not needed.

Am I on the right tack with that?

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

More
23 May 2018 15:25 - 23 May 2018 15:25 #111066 by PCW
Replied by PCW on topic Mesa 7i84 encoder addressing
Yes, no encoder hal component or A/B signals are needed, those are only used
if no encoder hardware is available.
Last edit: 23 May 2018 15:25 by PCW.
The following user(s) said Thank You: Nitram

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

More
23 May 2018 15:28 #111067 by Nitram
Replied by Nitram on topic Mesa 7i84 encoder addressing
Thanks for the swift response.
Given it's 1.30am here, now it's time for bed.
Shall test out the modifications tomorrow.
Again, thanks Peter!

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

More
23 May 2018 15:29 #111068 by Clive S
I have done something similar here:- forum.linuxcnc.org/38-general-linuxcnc-q...ing-a-mpg-to-a-7i85s

You have to be careful with the scales.

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

More
24 May 2018 15:22 #111085 by andypugh

You have to be careful with the scales.


Yes, as he said, the ilowpass works by sending something like 1000 times as many much smaller steps.

So your jog-per-count numbers in the HAL need to be very much smaller, or you will joc 1 meter when you expect to jog one mm.
The following user(s) said Thank You: Clive S

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

More
25 May 2018 04:00 #111101 by Nitram
Replied by Nitram on topic Mesa 7i84 encoder addressing
Thanks everyone. It is all incorporated now. Only fine tuning necessary was to reduce ilowpass gain to .0075 from the typical .01 to balance the acceleration settings of the machine.
Thanks for the input.

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

Moderators: PCWjmelson
Time to create page: 0.160 seconds
Powered by Kunena Forum