PDA

View Full Version : Leadshine EasyServo Question



mitchejc
30-11-2014, 12:05 PM
I know this is a long shot, but does anybody perhaps know if its possible to get the encoder position from the driver so I can use it e.g. for limits. Getting the protocol for the serial interface on the drivers would be first prize but I don't think its published. Any suggestions?

irving2008
01-12-2014, 12:32 AM
Getting the encoder info from the drivers isn't easy, getting it of the encoder would be easier, however the encoder data is typically just a pulse train so you'd need some external intelligence to use it. I think Mach3 can run its internal DRO off the encoder pulse train but whether it can use it for hard limits I don't know.

EddyCurrent
01-12-2014, 10:30 AM
Yes, they will likely be incremental rather than absolute. Could you mount an absolute encoder on the end of the shaft ? There are commercial encoder limit switches but probably expensive.

mitchejc
01-12-2014, 06:14 PM
Thanks gents. My knowledge of electronics is a bit lacking so I would be hesitant to try and split the built in encoder output to the ESS driver and use it into an arduino or something. The shaft does run through the stepper but the build in encoder is mounted on that back part. Haven't fiddled with it in a while but if I recall correctly you can plot the encoder position on those graphs in protune so I'll drop them an email and ask if they are willing to give a little insight into the serial protocol. Did not even think about the absolute/incremental thing. These are likely incremetal so I guess its not going to be very helpful for something like zeroing.

What actually triggered this search again was the laser scanning thread. I bought a laser distance sensor several years back but it was never practical to use as there's no way I could get a real-time xy in mach3 via vb script so the best I could do was to stop and read hight at each xy in the loop which defeats the purpose of using a sensor that can pump height at a reasonable rate. I just ended up with an an expensive probe and was hoping to toy with that again.

EddyCurrent
01-12-2014, 07:26 PM
You can get to the encoder DRO's in Mach3, do a search in this document for them; http://www.machsupport.com/forum/index.php?action=dlattach;topic=19482.0;attach=278 39
Then you might be able to write a Mach3 'Brain' to achieve what you want.

mitchejc
01-12-2014, 08:29 PM
Thanks, Eddy, at the time I went the add-on route (Wizard) but I could not figure out a way to read the oemDRO's while the machine was moving e.g. if you do a
code "G1 X 100" the script would just sit on that line till the movement is completed before moving to the code that gets height from the sensor so I had to go the move stop, then get height route.

I'm not familiar with brains and will certainly read up on that. Would a brain allow some custom script to execute while some g-code is executing, as that would be exactly what I need? For interest sake the sensor I have is a Wenglor CP35MHT80

JAZZCNC
01-12-2014, 08:31 PM
You can get to the encoder DRO's in Mach3, do a search in this document for them; http://www.machsupport.com/forum/index.php?action=dlattach;topic=19482.0;attach=278 39
Then you might be able to write a Mach3 'Brain' to achieve what you want.

But only if the encoder talks to Mach3 and in this case they don't. The loop is closed at the drive and Mach never see's the encoder so that won't work.

Not sure if the drives will report encoder position thru the serial connection but suspect they will or could be made too.? In which case it may be possible to feed this to Mach3 then use a brain like Eddy suggests.?

mitchejc
01-12-2014, 09:21 PM
Jazz if its possible to get the driver encoder position back into Mach3 or even use the build in soft DRO's in mach3 like eddy suggested along with the sensor output it would create some very useful possibilities to toy with like e.g. a contactless edgefinder for setting work-offsets. I might be totally wrong but my gut feel is that the mach3 soft DRO's does not always know where the machine actually is in real-time while moving if you use a controller that does buffering etc ?

EddyCurrent
01-12-2014, 10:36 PM
If it does all come together this is a good video on Brains; https://www.youtube.com/watch?v=O8V7dZy02og

mitchejc
01-12-2014, 11:15 PM
Thanks Eddy, that helps.

EddyCurrent
02-12-2014, 12:13 AM
I've just read the servo manual and it looks like the only way to get at the encoder is via that RS232 interface.

EddyCurrent
21-12-2014, 09:19 PM
@mitchejc
Don't know if this is any use for your limits application, Hiwin - Intelligent Linear Guideway ( Page 4 ); http://www.hiwin.com/pdf/lg/linear_guideways_e2.pdf

mitchejc
22-12-2014, 05:49 AM
Thanks Eddie, looks interesting! I wonder if its very expensive?