Re: Lets talk about encoders
ok, so since the magnetic encoder also has a A and B phase I should also multiply the 1016 by 4, correct? Giving a value of 4064 to enter into the firmware.
Also, thanks for the help everyone. I'm pretty green when it comes to the details of motion control.
Re: Lets talk about encoders
Quote:
Originally Posted by
CS900
ok, so since the magnetic encoder also has a A and B phase I should also multiply the 1016 by 4, correct? Giving a value of 4064 to enter into the firmware.
Also, thanks for the help everyone. I'm pretty green when it comes to the details of motion control.
No, enter 1016, that is the ''lines'' multiplied by 4. In this case, the lines = 254.
Re: Lets talk about encoders
ok, so being overly anxious to get my mill up and running again I spent my lunch break working on this.
Jim, thank you very much for your help. It seems to be working great at 1016.
I hope I'm not beating a dead horse here, but how to you figure the 254 lines? I calculated 1016 given the pitch of the screw and the resolution of the encoder. Does the tape have 1/4 less "lines" than I think it does?
Lets see if this works:
https://www.instagram.com/p/Be0xdQ_j2Ow
Re: Lets talk about encoders
254 lines is 1016 / 4
The linear encoder does not really have ''lines'', but the that would be the rotary encoder equivalent. The tape actually has 2mm magnetic pole spacing and the internal read head electronics converts the sin/cos output to pulses that the encoder input can read. It's all done with electrical magic :)
Re: Lets talk about encoders
well when it comes to electrical magic, I just dont ask why anymore. Thanks again for the help!
Re: Lets talk about encoders
Quote:
Originally Posted by
CS900
well when it comes to electrical magic, I just dont ask why anymore. Thanks again for the help!
The only scales that are the same are the optical scales, they are identical in design to the rotary version, except linear in construction.
Al.
Re: Lets talk about encoders
well I may have done my victory dance prematurely. I went to start tuning mach3 today and the motor was very jumpy and eventually faulted out. I reset the drive went back to the tuning software and tried running the same exact test as the one in the video and I'm now getting around a 750 pulse error and I can hear the stepper making a funny noise. I checked the coupling connecting the motor and ballscrew to ensure it was not slipping and it's not. I also reconnected the original encoder and changed the encoder count back to original and it works fine again.
My next though was maybe the tape wasn't aligned to the sensor since I had jogged the machine down maybe an inch. So I disconnected the ballscrew from the saddle and ran the saddle up and down the entire travel and the green "go" light stays on the entire time.
Any idea what I could look at to start troubleshooting?
Re: Lets talk about encoders
Try setting the acceleration/deceleration in the drive to something crazy high. Then lower the acceleration in Mach3 to a very low level to start with. Mach3 controls the acceleration, I suspect the drive and Mach3 are having a bit of a battle internally.
Re: Lets talk about encoders
I'll absolutely do that, but the issue now being that the protune software is the one sending the control signals for the test. Mach3 isn't even running at the moment. I'm a little baffled as to what changed as the only thing that differs between now and yesterday is the fact that I tried to use mach3 in between.
Re: Lets talk about encoders
Just to give you an idea, industrial versions of CNC equipment that implement scales have a dual loop, One encoder on the motor, the other the linear scale on the axis, this due to problems that can arise when there is any excessive or noticeable backlash between motor and final motion.
Galil have a video explaining how a PID loop is tuned when implementing this arrangement and there is backlash present, the PID loop tuning is spread between the encoder and the scale.
Al.
Re: Lets talk about encoders
that was my first thought as well, which lead me to check the coupler. I know that the ballnut has less than .001" of backlash from previous measurements. Also, I'm not sure why this wouldn't have been an issue yesterday if it were excessive backlash.
1 Attachment(s)
Re: Lets talk about encoders
So I played around with it a bit last night and I have a theory for you guys to scrutinize. The encoder seems to work fine over short distances...sometimes....If i plug in the original encoder and jog the machine to a new position sometimes it works, sometimes it doesn't. Sometimes it will work for a certain distance and then bugger up. I'm wondering if the tape has reference marks (like the picture) and i have the tape installed backwards and when it gets to a reference mark it buggers everything up. I don't have a good way to solidly mount the encoder flipped so before I go make a bracket I wanted to see if this was a viable problem. for what it's worth, I don't see any reference marks on the scale.
Attachment 386064
Re: Lets talk about encoders
The reference or fiduciary marker is usually separate to the main encoder outputs, so it should not affect it, at least on the scales I have used.
Al.
Re: Lets talk about encoders
I guess I'm wondering if the A or B sensors are reading that line when they shouldn't be?
Re: Lets talk about encoders
Not if the system used to track the head to tape is in order. and kept aligned.
Al.
Re: Lets talk about encoders
Quote:
Originally Posted by
Al_The_Man
Galil have a video explaining how a PID loop is tuned when implementing this arrangement and there is backlash present, the PID loop tuning is spread between the encoder and the scale.
Al.
This is really interesting Al. I went looking and couldn't seem to find that video, any idea what keywords I should use? Or if you have any other info on it, I'd love to hear.
Are they doing an /inside/ PID loop between the motor and the encoder, and an /outside/ PID loop between that loops setpoint and the scale? Or something else?
Re: Lets talk about encoders
I will see if I can find it, the PI uses the motor and the scale the D IIRC.
Looks like it is the last video under Tuning.
Online Videos | Galil
You have to register to view them.
Al.
Re: Lets talk about encoders
Quote:
Originally Posted by
Al_The_Man
I will see if I can find it, the PI uses the motor and the scale the D IIRC.
Looks like it is the last video under Tuning.
Online Videos | Galil
You have to register to view them.
Al.
Argh. I hate that. But with the title of the video in hand, a little google-fu brings us to:
Two Feedback Loops are Better Than One | Machine Design
and I've used that to update my page at:
techref.massmind.org/techref/io/servo/index.htm
Turns out it's PD inside and I outside.
Re: Lets talk about encoders
Quote:
Originally Posted by
James Newton
Argh. I hate that. But with the title of the video in hand, a little google-fu brings us to:
.
And of course, Jacob Tal is the president of Galil!
Al.