Retrofitting an old industrial CNC mill with EtherCAT components - MAHO MH400E

More
5 months 2 days ago #346775 by PedPEx
I do actually like the way the spindle encoder is mounted. Unfortunately, I already sourced a SICK absolute multiturn SSI encoder ATM60-A4A 13x13 bit a long time ago and only paid 65 EUR for it - or I'm going to use my leftover Baumer OG73 S SN1024 1V_pp encoder, which I received as a gift a long time ago. In case neither implementation works out as it should, I'll have a detailed look at your encoder :D ( AliExpress Link )

Back to the modified EL5021 terminal: I couldn't believe that it was that easy to modify it and be able to read the encoders back. That's when - as any sane person would do xD - I got into the car, drove to my parents' house, and tested the modified terminal on the Maho CNC mill. What can I say, it's working like a charm, even on the first try :o So, yes, an EL5021 Beckhoff terminal can actually read 11µA_pp signals and you only have to modify 9 resistors in total. A rudimentary schematic is attached :) I'm not able to measure the capacitance of the capacitors due to the installed resistors within the circuit, but their values shouldn't really matter (maybe an RC low-pass filter is no longer tuned as it should be, but that shouldn't cause problems here - I hope). I documented the very first test of the modified terminal and uploaded the video to YouTube.

I've also attached a screenshot of the CiA Danfoss VFD diagnostic tool for anyone interested :)

The following user(s) said Thank You: RotarySMP, vibram, Surmetall

Please Log in or Create an account to join the conversation.

More
5 months 2 days ago #346780 by Surmetall
how cool is that! great work! that opens a huge door for older Heidenhain scales to ethercat without the need of exe's. thank you very much!
The following user(s) said Thank You: PedPEx

Please Log in or Create an account to join the conversation.

More
5 months 1 day ago #346804 by PedPEx
Hello guys,

I did some further testing of the modified EL5021 terminal. As expected, when a 120-ohm resistor is added to each channel, it is indeed able to read 1V_pp sensors again. I confirmed this with a Baumer OG73 S SN1024 (SEW branded). So, it was time to get the EL5021 integrated into LinuxCNC. For this, I used my Claude subscription and pretty quickly got a working driver for the encoder input terminal. As far as I can tell, there are no bugs in the driver. Unlike the EL5101 and EP5101, the EL5021 doesn't have the option to reset its counter with every C pulse (at least with the revision that I have - HW: 08; SW: 05). I also found out that Beckhoff seems to have made a major revision change with the newer terminals. A lot of the documented Data Objects from the Beckhoff Information System are not implemented in my terminal.

The only thing left to do is to write a component that takes care of the Beckhoff Latch-C and Latch-C-valid signals and makes them as easy as possible to use for the standard homing procedure of LinuxCNC.

Wish you all a nice Sunday :)
The following user(s) said Thank You: vibram

Please Log in or Create an account to join the conversation.

More
1 month 2 weeks ago #349608 by PedPEx
Hello :D

After almost 4 months of no news, I am able to give you further details and insights on the retrofit. In the meantime, we received a new machine (KUKA KR15-2 KRC2) which required a little bit of maintenance, and we were in need of some maintenance too, in the form of holidays :D . In the remaining time in between, all electronics of the control cabinet were removed (only the Indramat and the corresponding transformers have stayed) and the ancient components were replaced. Due to the new variable frequency drive, most of the original electronics weren't needed anymore. Therefore, a whole rebuild of the cabinet was the most logical thing to do.

By now, all components are wired in and the cabinet only needs a cleanup. We decided to build and wire all safety related components into EK1914 and EL1918 TwinSafe terminals. One of the EK1914 safety outputs drives a PILZ PNOZ s7 safety relais, which inturn cuts power to all "dangerous" output terminals. After the safety program is finished, all components of the mill can be tested. We did not test the communication between the TwinSafe PLC and LinuxCNC beforehand, so let's see how that will turn out :D For now, the cabinet is mostly finished and just in need of a cleanup.We are also using the aforementioned modified EL5021 terminals for the X, Y, and Z glass scales. Due to their minimum interpolation setting of 10 bit (=1024), we are theoretically able to read each 20 µm glass scale down to a resolution of around 20 nm. We do not believe that we are actually that accurate by any means, but we are indeed able to register every single move of each axis. Even if it is just caused by a finger pressing slightly on an axis. In the hot summer months, we also saw the mill getting bigger/smaller due to thermal expansion.

Our very first implementation of a homing component dedicated to Beckhoff encoder inputs is also working, granted not 100% as expected. The bugs still need to be fixed. Our installed VFD also needs to be tested. It interlocks the contactor for the hydraulic system opening the tool changer and vice versa. An inductive sensor is also mounted on the fan side of the spindle motor, which sends 2 pulses for every revolution of the motor shaft. These pulses are counted by the VFD for a potential PID loop in the future. It is also equipped with a brake resistor, which should allow us to cut some serious threads with rigid tapping by using the original gearbox. Speaking of which, that also needs to be tested. It received its own 16 channel input card and two EL7332 motor driver terminals to drive all three motors.

There still needs to be some serious work done, but we are getting there :D

If you want further details, just let me know and i will send you some details as soon as possible :)

Please Log in or Create an account to join the conversation.

More
1 month 3 days ago - 1 month 3 days ago #349987 by PedPEx
Hello folks :D

Very good news: The MAHO mill retrofit has entered the finishing state. 
LinuxCNC can now read all inputs, sensors, thermal-switches, ... and also control everything, from the gearbox-motors, the VFD with the spindle motor, the Indramat DC motor driver and all the other components.

Features working at the moment:
- Working DC axis motors (PID not tuned)
- Reading the Heidenhain LS403 glass scales directly with modified EL5021 terminals
- Working gearbox and VFD (EL7332 controlling gearbox motors, Danfoss FC302 controlling original spindle motor)
- Working toolclamp-mechanism (with added button)
- Safety related inputs handled with TwinSafe Safety Hardware (EK1914 and EL1918)
- BusCheck monitors EtherCAT bus config (SafetyPLC CRC now too)
- Faulthandler gives operator detailed info, warning and alarm messages (message conditions need to be cleaned up)

The best feature probably is the continuously adjustable spindle speed. When a speed between 8 and 4400 RPM is requested, the best suited gear of the gearbox is selected (and will be used for all further requested speeds until a M5 command is sent) and the last speed adjustments are done by setting the spindle motor speed accordingly. That way it should be possible to cut threads with rigid tapping in theory up to 260 Nm in the lowest gear. A video of the three LinuxCNC spindle related components (fc302VFD, gearbox and spindle_master) working together  is over on YouTube .

Beckhoff has their own way of implementing a zero logic for their encoder terminals - for the Z(ero)/reference impulse. There is now also a component, which ties this index zero logic into the LinuxCNC homing logic. The component should work with all Beckhoff encoder input terminals and boxes - it was only tested with an EL5021 terminal. All components and the whole machine config can also be found over on github .

There are still quite some things that need to be done, like tuning the PID controllers, designing and building the new monitor-arm and so on... But we are getting there :D
Last edit: 1 month 3 days ago by PedPEx. Reason: formatting
The following user(s) said Thank You: tommylight, Unlogic

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum