Free, open source PLC emulator for SAP EWM MFS
PLC Sim is a free, open source, platform independent tool to test SAP EWM MFS connectivity and facilitate SAP EWM MFS implementation projects.
The software has been made available under copyleft GNU Affero General Public License v3.0
The current release of PLC Sim supports:
- Optional automatic telegram acknowledgment with handshake response
- Optional LIFE telegrams filtering
- Multiple communication channels
- Structural display of telegrams with dynamic determination of the telegram structure from SAP data dictionary
- Direct TCP/IP (ABAP Push Channel) and SAP Plant Connectivity PLC communication layers
- Configurable handshake request and response indicators
- Configurable telegram structure
- Configurable switching of sender and receiver fields in handshake response telegrams
- Configurable telegrams logs styling based on telegram types and handshake indicators
- Application logging implemented with Apache log4j2 library
Architecture and Usage
PLC Sim consist of two independent Java applications working together
PLC simulation application
It implements a TCP/IP server that receives and sends telegram messages either directly to SAP EWM MFS through ABAP Push Channel or indirectly through a RFC connectivity adapter like SAP PCo or TCP/IP-RFC bridge that is part of the project.
The application is implemented with the Sim class and is operated with a single window:
Double click on a telegram line brings a structural telegram display/edit dialog:
The bride implements an intermediate communication layer between SAP RF and TCP/IP server. The application is implement with the Bridge class. It is started with two arguments:
- RFC server Id as defined with a .jcoServer properties file – refer to SAP JCo documentation on how to define it
- the application configuration properties file
While running the bridge supports the following console commands:
- help, ? – displays help message with supported commands
- status – prints the RFC server and communication channels statuses
- stop, exit, bye – stops and exits the bridge
The commands are case insensitive.
- PLC communication layer type B “Proprietary Communication Layer” is not supported yet
- One telegram structure only – all telegram types have to have the same structure
- Channel synchronization is not implemented yet
- PLC Sim is not localized yet. English version is implemented.
- Life telegram has to be of LIFE type.
- Login credentials for SAP Java Connectors need to be defined in a JCo properties file.
I would like to express my deepest gratitude to:
- Victor Cerullo – his PLC Emulator has inspired this project.
- Joerg Michaelis – his Blog Series about the Material Flow System Component of SAP Extended Warehouse Management has been an invaluable introduction to the configuration and workings of SAP EWM MFS.
- Hendrik Schulte-Bahrenberg whose WMexperts.online blogs have provided all-important technical insights into SAP EWM MFS inner working.
- Countless Java experts and enthusiasts who share their knowledge on the net.
This project would have not been possible without them.
The project is available on GitHub in the repository mfs-plc-sim
It is still in its infancy and being actively developed. I would appreciate any comments, feature requests or bug notifications – post them with GitHub issues.
!!!Contributors are most welcome!!!
Looks good, Thanks Dominik.
Thank you! Please spread the word as an open source project won't thrive without the community support and contribution.
In the limitations I see the following:
Is this a limitiation
Kind Regards for your answers
Hello Lothar Streb
For now the limitation is general. It means that the emulator doesn't allow to reflect different telegram structures as defined in SAP EWM-MFS configuration: SCM Extended Warehouse Management -> Extended Warehouse Management -> Material Flow System (MFS) -> Telegram Processing -> Define Telegram Structure.
That is one of the features to be implemented. I am here in a bit of Catch 22 situation. The emulator interprets telegrams with JCoStructure functionality. I need to know a telegram structure as defined in SAP Data Dictionary to determine its type from the TELETYPE field. On the other hand if I allow different structures per telegram type, then I need to determine the telegram type before creating JCoStructure. I have a rough idea of how to solve the issue, but I'd appreciate any insights of yours.
Hello Dominik Tylczynski,
in SAP EWM you define a telegram header structure on PLC level which is similar for all telegram types. The header structure contains information like sender, receiver, sequence no and also the telegram type.
Based on the telegram type the overall telegram structure (header and data) can be defined.
So on receiving a telegram, first the telegram type is determined out of the telegram header and than the received telegram is moved to the overall telegramm structure which is configured for the telegram type.
Thank you Lothar Streb
I'm putting that on my to-do list - to implement different PLC types / interface types in the emulator. For now, I'm only concerned with different communication channels.
Hope this project will get off the ground and fly high.
Hello Dominik Tylczynski,
Where can i find PLC SIM EMULATOR file to download ? Can you guide me.
Hello Shaikh Masir
The source code of the emulator is made available in the GitHub repository - https://github.com/dominik-tylczynski/mfs-plc-sim
You need to clone the repository, install SAP JCo and build the application yourself. The process is as follows:
I'll update the README file with detailed description of the build process.
the tool is a nice idea. For me as a non Java Expert ist was really hard to launch the application.
With help of an experienced java devolper - we made it.
This comment was really helpful.
Dominik Tylczynski : I would be very helfpul to have more details about to install or let's better say launch the application. Maybe you can add there something inside your blog posts. Thanks
A blog on how to build and run the emulator is on my to do list. Stay tuned.
Simon Scheuring Here it is: How to setup and run PLC emulator for SAP EWM MFS
It's a really impressive solution. Thank you for sharing your tool!
You probably never rest 🙂 the better for all of us 😉
It do rest when having fun - cranking up projects like that is so much fun 🙂 🙂 🙂
great initiative! I think this is the way forward. If everybody would open source some of his/her enhancements we could make much larger steps towards a more advanced warehouse management environment based on EWM. I am happy that my blogs could provide some useful input here.
Will explore your tool for sure once I find the time!
I could not agree more. Just imagine a SAP space with enhancements marketplace like Eclipse plugins or central repository of ABAP developments like Maven. That would be so cool. Maybe SAP will embrace that idea?
Let me know your thoughts once you had time to review the emulator. I definitely want to continue with it.
...unfortunately it does not look like they are going that way. I've been waiting since years already for the 'App Store' for EWM where developers worldwide can offer/sell their enhancements/apps/add-ons and compete with the big consulting companies on one level.
At the end would still be a net benefit for all parties involved in EWM projects. Right now the EWM community is implementing the same enhancements over and over again in parallel at different projects worldwide.
Not very efficient. I guess at one point in time some company/startup will evolve and disrupt this space...
Indeed they don't. I guess being software provider they don't see much value in that. Especially now with rush-to-the-cloud frenzy and "keep the core clean". In my opinion app store won't do here as it is more for ready made applications not for reusable enhancements.
One approach could be to open enhancements on GitHub and have them published for instance on ABAP Open Source Projects repository.
...might be one way. Question is whether this will thrive without monetary incentives. Probably not.
I was rather thinking about some talented freelancing developers/consultants without direct access to projects developing Fiori-Apps, RF transactions, FMs for new monitor nodes etc. and sell those in an app-store.
We will see. Maybe I think to simple here...
sounds very promising but I see a lot of arguments against it... truly speaking I do not imagine that a huge corporation with milions $ budgets on the logistics solution buys something that is not "official approved", tested, signed by SAP with quality assured. I know SAP solutions are not always providing that, but the corporations stick to the rules...
...I am not sure about this. There could be certificates for uploaded add-ons / developments. There could also be some kind of user reviews / ratings to qualify for good solutions. Contributers would gain credibility this way. Why do you think an app-store for apple is working but this should not for SAP?
In any way I found this to be very risky not to give it a try from SAP perspective. Their moat is still huge but technology is moving quicker than ever and they will be attacked by small disrupters. Not sure whether they offer enough innovation to save their moat in the long term...
Hi Dominik Tylczynski
Hello Ganesh Navale
The emulator doesn't predefine any telegram structure. The structure can be specified in the properties file - https://github.com/dominik-tylczynski/mfs-plc-sim/blob/master/MFS.properties
That corresponds to the telegram structure configuration in SAP EWM-MFS:
For now, only one telegram structure is supported by a single instance of Sim class. However you can define different properties files and different telegram structures and run different instances of Sim class with them.
I know having a single telegram structure for all telegram types is a limitation - https://github.com/dominik-tylczynski/mfs-plc-sim/issues/2
I hope to have that limitation lifted soon.
Feel free to add issues to the project on the GitHub if you have any other feature requests: https://github.com/dominik-tylczynski/mfs-plc-sim/issues
Any idea how to develop emulator for certain project like Pick to Light where we can also see the graphical layout as mentioned below.
Link: - http://www.venetica.net/Sites/EWM_PTL/EWM_Pick_To_Light.html
Is there any software available to create emulator and graphical representation as shown in above link.
Hello Ganesh Navale
Thank you for your comment and an interesting idea. In fact I've been contemplating enhancement of the emulator with more graphical visualization, maybe similar to mentioned virtual pick-to-light program. However, please understand that the emulator is my side project that I implement in my spare time. I'll start building the visualization layer once I feel the basic functionality is mature and stable, once I'm done with the issues of the emulator.
It would help me tremendously if you provide any comments or feature requests to the emulator as issues on the GitHub.
I'm not aware of any free pick-to-light simulators. There might be some commercial software but I guess that's not what you need.
If you can make small video on your YouTube channel about how we can implement and test the your free simulator shared on gitHub then I can add issues I faced.
I know you have provided the guide on GitHub but having video demo certainly help more.