Open source PLC emulator for SAP EWM MFS in action
The article Free, open source PLC emulator for SAP EWM MFS has introduced the PLC Sim project. It is available on GitHub in the repository mfs-plc-sim.
Now, let’s see how the emulator can be used to automate a stock placement process with two different PLCs: a conveyor and a stacker.
The stock placement process setup
SAP EWM MFS initial setup has been implemented with the /SCWM/MFS BC set. Despite a warning from the 2464460 – Restricted usage of BC sets in embedded EWM in S/4HANA and in de-central EWM note:
BC sets for SAP-internal test purposes in EWM
In de-central EWM and in embedded EWM in S/4HANA, the following BC sets contain customizing entries used for SAP-internal test purposes only:
the BC set can be activated in S/4HANA embedded EWM and works very nicely as a jumping point of a MFS demo configuration.
I have enhanced a bit the storage process to implement the following scenario with two automated legs:
The storage process is composed of 4 points:
- A – unloading zone
- B – conveyor entry
- C – conveyor exit
- B – final destination zone
and of 3 legs:
- 1 – manual movement from the unloading zone and placement on the conveyor
- 2 – transportation by the conveyor to the automated warehouse stacker
- 3 – placement into the final bin by the automated stacker
The process is modelled with the following setup of layout-oriented storage control:
Starting PLC communication channels
The demo uses the following telegram styling:
- LIFE, handshake request – red, bold
- LIFE, handshake acknowledgement – red, italic
- WT, handshake request – black, bold
- WT, handshake acknowledgment – black, italic
- WTCO, handshake request – green, bold
- WTCO, handshake acknowledgment – green, italic
The is setup with the properties in the Sim application configuration file:
Style.LIFE-R.=255,0,0,B Style.LIFE-A.=255,0,0,I Style.WT..-R.=0,0,0,B Style.WT..-A.=0,0,0,I Style.WTCO-R.=0,255,0,B Style.WTCO-A.=0,255,0,I
Two instances of Sim application are started:
- one for the conveyor and
- one for the stacker.
The conveyor communicates on the TCP/IP port 7000, the stacker on the port 6969. TCP/IP servers are stopped for now in the Sim applications. That is indicated by input ready TCP/IP field with white background.
Both channels are stopped in SAP EWM MFS too:
I am starting the TCP/IP servers in the Sim applications. The TCP/IP field gets read-only with yellow background, that indicates running TCP/IP server but without TCP/IP client connection yet.
The channels are started in /SCWM/MON
The TCP/IP port field in the Sim application turns green indicating the connection of TCP/IP client, which is SAP EWM MFS. LIFE telegrams start flowing:
Handling unit placement process
The process in EWM begins with an inbound delivery with one handling unit
The handling unit number is 112345671000000286
Warehouse task is created for the handling unit:
Notice that the system actually creates two warehouse tasks:
- to the storage bin 0280 028-02-08, which is our final destination bin
- to the storage bin 0285 I-POINT, which is poin B of the placement process, i.e. the beginning of the conveyor segment
The same is visible in /SCM/MON in the Warehouse Task node:
The warehouse task 1576 to the 0280 0280-02-08 bin, which is the final bin of the placement hast the B “waiting” status. The warehouse task cannot be currently executed as it waits for layout oriented process to finish.
Leg 1 – manual step confirmation
The warehouse task 1577 confirmation:
Upon the warehouse task 1577 confirmation, SAP EWM automatically creates the task 1578, from 0285 I-POINT, to 0285 C-POINT, that is for the second leg of the placement process. This leg is integrated with the conveyor. So a telegram is sent to the corresponding PLC:
Notice that automatic handshake mode is activated in the emulator. Therefore the handshake confirmation is automatically to SAP EWM MFS.
The telegram content can be analyzed in the structured display popup by double clicking the corresponding line number
Leg 2 – conveyor confirmation
The conveyor leg is confirmed now with WTCO telegram. The telegram can be either entered directly in the “Outgoing Telegram” text field or edited more conveniently in the structured edit popup
Receipt of the WTCO telegram is confirmed by SAP EWM MFS with the handshake acknowledgement telegram
Notice the styling of the telegrams.
The WTCO telegram processing the warehouse task 1577 and unblocks the first 1576 task. At the same time the source location of the warehouse task 1576 is changed to 0285 C-POINT
Leg 3 – stacker confirmation
Activation of the warehouse task 1576 generates its WT telegram, that is sent to the stacker PLC. Again the communication is automatically confirmed with the handshake acknowledgment
The communication is handshaked by SAP EWM MFS
The telegram processing confirms the warehouse task 1576
and concludes the inbound delivery 180000851 placement process
Despite its infancy the PLC Sim is already well functional and can be used to test SAP EWM MFS configuration and connectivity.
Stay tuned to next episodes of Opensource PLC emulator series and follow the emulator development and its documentation.
I would appreciate any comments, feature requests or bug notifications – post them with GitHub issues.
Feel free to join the project and contribute to its development – there is only so much I can deliver on my own.
You are amazing, it was nice to see your work in action. Congratulations and thank you for your awesome work and sharing. I hope the project will be developed continuously.
I'm looking forward for feedback from the first customer who used your tool. Fingers crossed!
Thank you so much! It does mean a lot.
Good post, thank you Dominik!
What an achievement.
It looks like it is a normal MFS/AKL emulator, so you can "just" add a visualization (like pallets/containers travelling on conveyors) and you can implement test environment, for which normally you have to pay a lot of money for.
One remark: warehouse task "B" status is not "blocked' but "Waiting"/"Wartend". It gets "B" when another WT needs to be confirmed, exactly as in your test scenario.
Thank you very much! It's a good catch on the B status. I've updated the article.
Very good work Dominik.
I really appreciatte the investigation and your generous contribution to the SAP universe.
Thanks a lot!!
Thank you! I really hope the project gains traction.