peru3232
I'd like to convert a Beckhoff controller to Arduino with OpenPLC. The basics are probably simple, since it's almost exclusively digital IOs. A little over 50, but the Giga R1 should be able to provide a perfect platform for that. So far, it's feasible. Two things are still open: a 2-port IO-Link master (but it should be feasible somehow) and the reason for my post:
We use two stepper motor modules with incremental encoders (2x EJ 7047: https://download.beckhoff.com/download/document/io/ethercat-plug-in-modules/ej70x7en.pdf) in one version of the controller) The main reason for the change is size.
I will connect the Arduino board to the mainboard (Formally the SDB board for the Beckhoff modules) via the headers, prepare the IOs there (24V<-3.3V->24V), and distribute them to the sensors. I have the board pretty much under control, but I don't have the slightest idea how to implement the controller. Perhaps someone can help? Both hardware-wise and software-wise. If it's too complex to implement, I'd be happy to provide tips on ready-made modules that would work with the Arduino Basis without the need of complex field busses and could be integrated just as easily.
Reply 0 0
thiagoralves
You can’t do EtherCAT on an Arduino. I don’t know about IO-Link, but I think that’s not possible as well since there aren’t any ready to use IO-Link libraries in the Arduino world.

In general, I don’t think it is a good idea to replace an industrial-grade controller with an Arduino board, unless you know exactly what you are doing. If that’s about using OpenPLC software, there are several industrial-grade controllers that can run OpenPLC as well. Arduino boards are usually intended for prototyping and tests only
Reply 0 0
peru3232
Hi,
thank you for quick repley and also for your work in general - it`s phantastic!
 
yes I know it wouldn't be easy. I don't need Ethercat, I only need a Stepper modul or someting else that I can implement. Or suggestions for controller µC for further research. I saw IO-Link master module which can comunicate via UART or SPI - so I think I can solve this for using. Not a quick fix, but it's not necessary in the first step either. But it should be feasible.
The Beckhoff modules are the smalest possible industrial-grade controllers I know- but with 2 limitations. 1st Minimum hight is 60mm, second the closeness for plc.
 
But if you can give me tips about other industrial-grade controllers who can handle so many IOs on a single board, without the need for many moduls I would like to consider that too - very gladly even - but unfortunately I don't know anything about it
 
For the application I also don`t need hard realtime and no security
Reply 1 0
thiagoralves
For specific code like the stepper motor and IO-Link over SPI, you might be able to handle that through an Arduino Extension. An Arduino Extension allows you to write Arduino code that runs alongside your PLC project on the same Arduino board. It is available on the editor (v3 only for now) at the left panel, on the gray plus icon.
Reply 0 0
peru3232
I read that this Giga R1 board has a dual core: Cortex M7 and M4, which can operate independently. So, one core is dedicated to the PLC and the other for exactly this kind of thing. I like it so far. First, it's more important for me to finalize the hardware platform, including the extensions, as much as possible—then I can finalize a test motherboard with which to develop the software. Or I can also provide interfaces for modules. Or handle it with other µC, or Controller ICs.. The first step needs only the digital IOs to start, but should have the possibility to develop the Rest.
Reply 0 0
Keld Nielsen
To use an Arduino with EtherCAT, you need an EtherCAT shield that turns the Arduino into an EtherCAT slave device, or a specialized board like an ArduCAT for building an EtherCAT slave.

As for the IO-Link - Try this link for a start: https://docs.arduino.cc/libraries/lwiolink/
Reply 0 0
thiagoralves
I believe the OP was interested in IO-Link and EtherCAT master, not slave. That’s more complicated to do in an Arduino
Reply 1 0
Reply