The open source PLC emulator is available as the copyleft GitHub repository mfs-plc-sim for everyone to clone, build and run. Still building the emulator might get challenging. The intention of this article is to help with the process. Unfortunately due to redistribution restrictions of SAP Java Connector license terms, I must not provide self contained, ready to run, single jar file.
The emulator relies on SAP Java Connector and Apache log4j2 libraries. They need to be installed before running the PLC emulator:
For convenience put all the files in a single directory.
Setting it all up
Refer to Log4j Configuration for the detailed documentation on how to setup the logging options. Provided log4j2.xml sets debug level logging with a rich patter and directs the messages to the console. It can be left as it is.
Java Connector configuration is composed of two files:
SID.jcoDestination - the file defines your SAP system destination and how to log to it
PROGID.jcoServer - the file defines the RFC destination to be used with EMW-MFS
Rename and modify the content of the files. For instance, let's say we are connecting to a single SAP sandbox installation running on 192.168.1.1 address, system number 01, client 100, system id DEV - so we need DEV.jcoDestination file: