Let's speedup the implementation of MotoLogix into your projects by using library functions and application sample code built by the community.
In this repository we join forces to build the next generation of example programs for MotoLogix together.
The idea behind this is that rather than just expecting the variety of users to use the examples as Yaskawa designed them, we ask the users to bring in their ideas and requirements.
This can happen in the form of discussions but maybe you also want to get your hands dirty on coding and/or testing.
With the first generation of example programs (e.g. 6_PosTable
) we achieved
these goals:
While sticking to these goals we add a few more for the next generation of example programs:
We use Codesys as the development platform of choice.
Codesys comes with good IEC 61131
support, a modern IDE and doesn't require
large investments. In fact, we will use the Codesys Runtime for Raspberry Pi.
That's right, we're gonna use a Raspberry Pi 4 and Codesys to control the robot.
Besides being really low-cost and having good performance, the Codesys Runtime for Raspberry Pi has many field bus masters on board (without additional costs). It means that it can be used with EtherCAT, PROFINET, EtherNet/IP and more. Thanks to that flexibility we don't require a strict configuration of the robot controller. It doesn't matter whether your robot system is equipped with a PROFINET board or any of the other field buses, the PLC just adapts to your system.
Once the functions reach a mature stage a library will be released. This Examples library as a whole will then be ported to the other PLC platforms which support MotoLogix.
It would be a waste of resources to develop a function at many platforms at the same time. Therefore we distinguish between development and porting and use the following order:
If a certain function is already ready and tested (so after finishing above mentioned step 2), you might not want to wait for the library release for your platform. In that case, you can decide to port its code yourself.
Then, if you are willing to share your ported (and tested) code anyone could benefit. This remains your own choice of course.
Porting Structured Text (ST, or SCL) code between PLC platforms is usually not so problematic. From our experience with porting the MotoLogix library more than 90% of the code can be ported by plain copy-pasting.
It's the platform specific functions (e.g. memcpy
vs blkmov
) which require
some editing afterwards. But once you know the syntax, these tasks can often be
semi-automated using an editor with good find and replace functions
(using regex).