Re: Lets talk about encoders
What are you doing with the encoders? And what kind of motors/drives are you using? Typically, the encoder data has nothing to do with the drives in Mach3.
Re: Lets talk about encoders
currently I'm running some closed loop steppers from leadshine, which have a shaft encoder built into the stepper. I'd like to actually use a linear encoder to replace it the rotary encoder.
Yeah, and I guess I don't understand the relationship between mach3, the drive, and the encoder. I know mach3 has nothing to do with the feedback loop, but how does the drive interperate the signal from mach and from the encoder? logically I would think if mach sent 5 pulse signals, the drive would want to read 5 encoder signals. and any deviation from that is the error read by the drive.
Re: Lets talk about encoders
Linear encoders are all metric as far as I know. Normally available in resolutions of 0.1, 0.5, 1, 2, 5, and 10 microns, this is true for both glass and magnetic scales. 1 micron resolution = 25400 pulses / inch, or 0.000039 inch / pulse.
If you are planning on closing the loop at the drive level, I don't know how a drive would react to being fed with an encoder that it was not calibrated for. Depending on the drive, it may be possible to set the scaling.
To really take advantage of linear encoders, you would need a real motion controller between Mach3 and the drives and close the loop at the controller. Dynamotion or Galil would be good choices.
I have 1 micron magnetic linear encoders on all of my machines and have had very good luck with them.
Re: Lets talk about encoders
Quote:
but how does the drive interperate the signal from mach and from the encoder?
I think that they are two separate loops. Or the steps/unit is locked to the encoder resolution.
Mach3 knows nothing about the encoder. It just sends steps to the drive.
The drive just makes sure the motor goes where the steps have told it to go.
Re: Lets talk about encoders
thanks for the responses guys. I'll take a look at my drivers to see if the encoder is truly configurable or if it's just preset values.
I've never really looked at the dynamotion board as I din't know they had a mach3 plugin. But I wish I had known about it before I bought my smoothstepper boards. haha.
Re: Lets talk about encoders
According to the manual, I can set that to be any value I want. So maybe I'll give that a try first.
but i guess on that topic, what exactly does the drive do with that information? Maybe for this drive it helps determine the microstepping?
Re: Lets talk about encoders
Quote:
Originally Posted by
CS900
.............. what exactly does the drive do with that information? Maybe for this drive it helps determine the microstepping?
Lets say Mach3 sends out 100,000 pulses, that drive takes that information and moves the motor (or table) 100,000 encoder pulses. With the loop closed at the drive, the drive looks at the current position and keeps moving the motor until the 100,000 pulse distance is reached.
Re: Lets talk about encoders
That's what I thought was happening. Seems like the encoder itself it's fairly arbitrary and pretty hopeful I can close the position loop at the drive.
Re: Lets talk about encoders
Re: Lets talk about encoders
there's a link in post #3 to them.
Re: Lets talk about encoders
I would think that the encoder resolution needs to match the one on the motor, or it won't work correctly, as the drive is expecting 1000 counts/rev? (Or is it 4000?)
Re: Lets talk about encoders
it's 4000 in quadrature.
That said, I can go into the software for the drive and edit the encoder resolution. I think. I didn't get a chance to try it out last night.
Re: Lets talk about encoders
So looked at the software today, and sure enough I can edit the encoder count. I'm going to order an encoder and give it a try.
Re: Lets talk about encoders
Quote:
Originally Posted by
CS900
it's 4000 in quadrature.
.
The term Quadrature encoder refers to the two detected signals being 90° apart.
I don't know of any controller where you could not scale the encoder count to the machine resolution, it would make the whole system of integration useless.
The encoder IS 'Quadrature' the way it comes out of the box, it can then be then be multiplied X1, X2 or X4 quadrature in order to set the resolution.
Al.
Re: Lets talk about encoders
Quote:
Originally Posted by
Al_The_Man
The term Quadrature encoder refers to the two detected signals being 90° apart.
I don't know of any controller where you could not scale the encoder count to the machine resolution, it would make the whole system of integration useless.
The encoder IS 'Quadrature' the way it comes out of the box, it can then be then be multiplied X1, X2 or X4 quadrature in order to set the resolution.
Al.
Thanks for the info. What exactly do you mean scale? The driver scales the input signal from the encoder.
And if I'm understanding this correctly, you get a quadrature signal from the encoder having 2 sensors 90* out of phase and reading the leading and trailing edge of each encoder "tick"?
Re: Lets talk about encoders
Quote:
Originally Posted by
CS900
Thanks for the info. What exactly do you mean scale? The driver scales the input signal from the encoder.
And if I'm understanding this correctly, you get a quadrature signal from the encoder having 2 sensors 90* out of phase and reading the leading and trailing edge of each encoder "tick"?
Many use the term incorrectly, the origin of the term quadrature for these is the fact that there are two signals generated that are 90° (quadrature) apart, for an optical encoder the signals originate at the sensor output as generally two sine waves, Heidenhain and other manuf often leave the signal as this in order for a control to greatly increase the resolution by using a co-tangent calculation, other simply square them up and this allows the option of using either 1 edge, 2 edges or all 4 to increase the basic resolution/count.
Scale means you set a number of encoder counts to represent a distance moved.l.:cool:
Al.
Re: Lets talk about encoders
i see. I learn something new everyday. Thanks for the explanation.
Re: Lets talk about encoders
update...I got the encoder received in, installed, and wired up yesterday.
https://i.imgur.com/CMvZkfU.jpg
So, I fired up the tuning software for the drives and tried jogging it around and immediately got a positioning fault. ok...kind of saw that coming. So I did the math and figured that I get 5080 pulses/in from the 5micron encoder. Plug that in, also got a fault. I didn't have time to mess with it any more last night, but I got thinking this morning that it needs to be in pulses per rev (PPR) of the stepper. So feel free to double check my math, but I have a .2" pitch on the ballscrew with a .005mm pitch on the encoder. That would give me 1016 pulses/rev
So onto my next question. The spec sheet for the stepper says it's "1000 pulses per revolution" of the original encoder. However, when I go into the software the PPR is set to 4000. I had originally though it was because of the "quadrature signal", but having since learned that's not a real thing why is it 4x the actual encoder count? I the manual it says to multiply the actual count by 4, but why is that?
Also for anyone wondering, these are the settings I can change in the firmware. You can see I already changed the PPR from 4000.
https://i.imgur.com/Hr9AfpP.jpg
Re: Lets talk about encoders
Your math is correct, 1016 pulses per motor revolution. This is what you should set your PPR to in the drive software.
Don't confuse encoder line count with output pulses. A 1000 line encoder normally will be read as 4000 counts by the reading device. The counter reads both rising and falling edges of the output pulses. A rising = 1 pulse, B rising = 1 pulse, A falling = 1 pulse, and B falling = 1 pulse, added together = 4 pulses/line