- Posts: 111
- Thank you received: 0
MPG Count per click
I have it working (yay!) thanks to this forum.
My MPG encoder sends a full quadrature per "click," which is read by the controller as 4 clicks. What is the simplest way to correct this? I don't want to just change the scale because it causes the machine to move four steps while the MPG is slowly rolled from one detent to the next.
Please Log in to join the conversation.
But do you think for the life of me I can find that thread, despite how hard I've looked......?
EDIT: Found it - I think. It may be helpful, if not specifically, at least to lead you in the right direction. Start reading the thread starting here: forum.linuxcnc.org/27-driver-boards/3045...steps?start=10#70703
Please Log in to join the conversation.
(this should be fixed when the INM module is supported, this will support up to 4 MPGs on the generic inputs)
Please Log in to join the conversation.
No, you don't have to do this. The output from the MPG's encoder counter can simply be divided by 4 to get the desired result.PCW wrote: The hardware encoder in the 7I96 does not support 1X mode so you would need to use a software encoder component
(this should be fixed when the INM module is supported, this will support up to 4 MPGs on the generic inputs)
In fact, at least axis encoders have a scale factor built into the driver. The scale normally defaults to 1.0, just supply a factor of 0.25 to the appropriate encoder's scale factor.
Jon
Please Log in to join the conversation.
jmelson wrote: The output from the MPG's encoder counter can simply be divided by 4 to get the desired result
Jon
Tell me if I understand this correctly.
My current setup is as such:
Encoder.count => ilowpass.in
And you say I should have something like:
Encoder.count => multiply by .25 => ilowpass.in
I couldn’t find a divide function.
Ignoring the wrong syntax, is this what you meant? What happens when you feed a floating point value into an integer input? Will it automatically round the number? Or just truncate it?
Please Log in to join the conversation.
setp ilowpass.0.scale 102.4
it should make the MPG encoder count approximately 4 X slower.
I have the scale parameter set to 100 on my system's ilowpass, and then have a multiplexer that divides by different factors depending on the setting of a switch on the pendant.
Jon
Please Log in to join the conversation.
axis.<n>.jog-scale
where <n> is the axis number for the axes you want to set the jog rate.
So, I have a mux that selects between these values :
setp mux4.0.in0 .00000025
setp mux4.0.in1 .0000025
setp mux4.0.in2 .000025
setp mux4.0.in3 0
net jogscale mux4.0.out => axis.0.jog-scale
To select the desired jog rate. The zero disables jogging unless I press a button, so an accidental bump of the MPG won't sent the machine crashing off somewhere.
Jon
Please Log in to join the conversation.
jmelson wrote:
setp mux4.0.in0 .00000025
setp mux4.0.in1 .0000025
setp mux4.0.in2 .000025
Jon
Oh, that’s what you meant. That’s actually exactly what I have mine set to right now. What I’ve noticed, though, is that occasionally the detent causes the wheel to bounce slightly, which results in some oddd and unexpected motion. I admit that this is a minor issue.
So my system is working. What I aim to achieve now, is a one to one relationship between MPG clicks and machine moves.
Please Log in to join the conversation.
thadwald wrote:
OK, you may want to twiddle with the parameters to the ilowpass. I have mine set so that it takes about one second for the last click to come out of the ilowpass, which works out right to prevent the buzzing of the servos. That has gain at .01jmelson wrote: What I’ve noticed, though, is that occasionally the detent causes the wheel to bounce slightly, which results in some oddd and unexpected motion. I admit that this is a minor issue.
So my system is working. What I aim to achieve now, is a one to one relationship between MPG clicks and machine moves.
Jon
Please Log in to join the conversation.
