Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Upstage on March 19, 2023, 01:19:33 PM

Title: ESS 2.83 With C 53 encoder input board Mach 4
Post by: Upstage on March 19, 2023, 01:19:33 PM
Hi All,
Has anyone had luck with using the C53 to read back glass scales? in Mach 4
to be clear I am Not looking for closed loop feedback, currently I only use the motors to
my mill is not quite up for a full CNC conversion, as such I am only interested in getting the scales to read correctly.

I am getting readings, though I don't see an input for the scale Index, I've got A and B mapped to aux 1 encoder input in the MPG tab.
and am viewing changes both in the diagnostic window in the encoder tab as well as the current positions window, but I can't get them to scale correctly.

I'm just a bit out of my depth here, I have also seen an installation file on the cnc4pc website for the c53, though there's no support manual, and I can't figure out if I need it or where it would go, the file extensions are for Mach 3 I think, and don't seem to be something I would just drop in a folder

I understand if one or both of these things are causing my issues, I've just hit a wall.

-Peter
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: Upstage on March 23, 2023, 10:08:04 AM
Hi All, I'm guessing based on the lack of replies no one is using the C53 in Mach 4 for scales?

I didn't quite explain my situation very well in my last post. I'm hoping to get the scales as inputs in Mach 4 so I can make some parts for the CNC conversion.
the scales will not be needed after the conversion is complete, at this point I am considering just buying a DRO and eventually moving it to my lathe or surface grinder after the mill conversion. though I was hoping to find a way to use Mach 4 with the scales, and run it on all the tools as I add functionality to each of them.

-Peter
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 27, 2023, 09:24:19 PM
I had a similar situation converting from Nach 3 to Mach 4,  USB smooth stepper to Ethernet.   Below is what Andrew from the Warp 9 forum helped me with.   My scales are working but I still need to add code to zero them manually.   

You mapped them correctly to the ESS pins, but I would change the alias names to show the port/pin numbers, and I would also have them count 0, 1, 2 instead of 1, 2, 3 since Mach4 has you X motor start with 0 instead of 1. This will make it MUCH less confusing in the long term.


For the input signals, again, make it go from 0, 1, 2 instead of 1, 2,3

In the Mach config -> Aux positions, assign ESS encoders 0, 1, 2 and the count values. You can grab on the column line and slide it over to make the column wider.


Now everything is configured, and you need to modify your screen set. Do you want the A, B, C DROs below to show the encoder values? I would think that would be the easiest. If so, I would change the button labels on the left to show X Enc, Y Enc, Z Enc, and then set those three DROs to Motor 0 Aux, Motor 1 Aux, Motor 2 Aux....
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: Upstage on March 28, 2023, 09:12:11 AM
Thanks for the reply
I already managed to get output to the DRO in Mach 4, I've tried various values in the " Counts Per Detent " box, with no helpful outcome.
attached are a couple screen shots that might explain my setup. I'm also still confused by not finding the index input for the encoder.

-Peter
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: joeaverage on March 28, 2023, 06:08:54 PM
Hi,
if I'm not mistaken the Aux Encoders are all reported in encoder counts not units. You would have to do a calculation to convert encoder counts to
distance units.

Craig
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 28, 2023, 08:06:48 PM
I originally transitioned everything from Mach 3 to Mach 4 exactly like it was setup in working,  I couldn't get the readout from the glass scales to work at all.    I reached out on the warp 9 forum and Andrew had me send my profiles and basically had me change the setup to have the glass scale input configured as AUX motor encoders, they were setup in the MPG tab in Mach 3, I grabbed a couple screenshots of how they are pinned out and setup.     The scales on my mill are Accurite Model ENC 125T, the pulses per unit in the aux tab is set to 2540.      I haven't dived into creating the script to zero the scale readout and I also need to reconfigure how the encoder interface is setup as currently it utilizes the heartbeat signal from Mach and I'll have to hardwire something to allow it to be enabled with the servos off as my spindle control is wired to one of the outputs on that card as well.     The screen shots of how it is all configured are attached.
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 28, 2023, 08:07:16 PM
second pic
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 28, 2023, 08:07:42 PM
3rd pic
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 28, 2023, 08:15:10 PM
A screen shot of the program run/current positions is attached, I debated on adjusting home sensors until I could get the position to reset but highly doubt that mechanical switches would be repeatable enough to make that work.     If I power the machine off with the axis in weird positions the aux encoder feedback comes up as zero in that position.     I currently home the machine before power off and the mach estimated position and feedback from the aux encoders are within .005.     I agree with Craigs reply on my post, if the machine is good and your setup is right you really don't need the scales.     I wanted them for a manual function but normally have been using one of the mill wizard tools or the jog function.     I had debated about going with the Centroid all in one DC control which is a true closed loop and would be able to utilize their provided motor encoders and the glass scale feedback.    Right now, I don't think it's worth it, if my situation changes or I have some extra cash lying around I might explore that as I think it would be more reliable.   
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: joeaverage on March 28, 2023, 09:50:31 PM
Hi,

Quote
I had debated about going with the Centroid all in one DC control which is a true closed loop and would be able to utilize their provided motor encoders and the glass scale feedback.    Right now, I don't think it's worth it, if my situation changes or I have some extra cash lying around I might explore that as I think it would be more reliable.   

To be honest I don't think that is the way to go. It has become increasingly rare for a controller to accept feedback from a glass scale. The old standards like Galil and Dynamotion are joined by
a few recent ones like the Centroid Oak.....but they are a dying breed.

If you want to use a glass scale to close the position loop then buy a servo that can do so, for example a Delta A2. It has a regular 20 bit rotary encoder to close the velocity and torque
loops but a secondary encoder, for example  a glass scale, to close the position loop. No need to spend big dollars on a feedback capable controller when the servo drive can do it...and so much
better and without the complication. A 750W Delta A2 costs $640USD whereas the 750W B2 (which does not have the secondary encoder feature) is $438USD, so you do pay a premium but still way cheaper
than a Galil or whatever.

All the top servo manufacturers have models with this feature, it often called 'load sensing', that is it senses the position of the load or axis. They do command a premium but they sure 'put
a horn on a jellyfish'.

Craig
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 28, 2023, 10:44:10 PM
Totally agree,  I was more interested in the all in one as it closes the loop to the controller vs just the servo.  But modern servos are very good if the mechanicals are tight.  I’m just a hobbyist so really no need at this point to go all in.    I had heard all kinds of bad things about Mach 3/4 prior to buying this mill.  After running it with 3 for a short time and updating to 4 I’m impressed.   I haven’t machined anything crazy but so far it’s been on the money.   I need to perform the recommended changes to the PC and clean up some wiring but think Mach 4 will do all I need .
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: joeaverage on March 28, 2023, 10:53:23 PM
Hi,

Quote
I was more interested in the all in one as it closes the loop to the controller vs just the servo

But that what it does. The rotary encoder handle the servo internal loops but the glass scale does the position loop which includes the non-linearities and
lash, the servo can do just exactly what the feed back controller does....only better! What I'm saying is these 'load sensing' servos EXCEED the full closed loop
controller.

Craig
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 28, 2023, 11:44:41 PM
I missed the secondary encoder for the feedback loop,  how is  your system work with Mach 4?  Controller setup, etc. ?  I had two different machines in a non working state, one of mine and a friends. 

The main benefit to the centroid I could see was that we could use the original DC servos and for his machine it was more of a plug and play and he could have support other than me. 
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: joeaverage on March 29, 2023, 12:09:45 AM
Hi,
I use Delta B2 servos, ie the entry level version WITHOUT the secondary feedback loop. Given that I have ground THK C5 ballscrews I believe my accuracy demands, say 0.0mm or better
are reached without recourse to linear scales. As it turns out  the cheap Chinese linear scales are just not that good, and if you want the real deal like Hiedenhan then you pay huge
dollars.

I use an Ethernet SmoothStepper as motion control and an own design breakout board.

Quote
The main benefit to the centroid I could see was that we could use the original DC servos and for his machine it was more of a plug and play and he could have support other than me.

To be honest retaining the original DC servos is NOT a bonus. Yes; they can be made to perform well but requires considerable tuning, cost and complexity with respect to the motion controller.
Quite frankly my 750W Delta B2 servos ($438USD/each) make old school DC servos look like absolute muppets. The extra dollars you spend on a feedback capable controller like a Galil or a Centroid
will probably tip the balance in dollar terms alone by replacing the old DC servos and getting some decent AC servos. You never know you might find some twat to buy the old DC stuff....
you'd have money left-over to get really pissed! Do it before the twat realises what a mistake he's made.

Craig
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: Upstage on March 29, 2023, 09:01:59 AM
Hi all, and thanks for the help

I am getting readings out of the scale,

I changed the x axis DRO input to the encoder, I have not determined that they are correct though by some crude tests its close, though scaled up by 4 decimal places
As ryno3 mentioned the Zero X button broke

joeaverage in my case I am just installing scales I already have, to aid me in my CNC upgrade, basically to help me make the parts that will eventually make the scales unnecessary. The scales will likely end up on my lathe which I don't plan to CNC.

Attached are screen shots from my setup
-Peter
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: Upstage on March 29, 2023, 10:31:54 AM
sorry the attachments were not included in my last post here they are
Title: Re: ESS 2.83 With C 53 encoder input board Mach 4
Post by: ryno3 on March 30, 2023, 10:18:03 PM
Take a look at the link below,  I haven’t got around to trying it yet but might this weekend.   You wouldn’t need the degree calculations. 

http://documentation.warp9td.com/Hardware/ESS/Software_Mach4/lua/luaEncoderInDegreesWithZero.htm