Step 7 AWL/STL/PLC simulator
Image preview of awlsimgui.png

Awlsim is a free Step 7 AWL/STL/PLC simulator written in Python. Depending on the host machine and the Python interpreter used, it achieves good performance of several thousand to millions of AWL/STL instructions per second. German and english AWL/STL mnemonics are supported.

The current focus is the S7-3xx and S7-4xx family of PLC CPUs (2 and 4 accu).

Simulation accuracy is taken seriously by the awlsim project. We want to be as close as possible to the real PLC hardware with our simulation. For this reason awlsim ships an extensive selftest suite. If you find any bugs and inconsistencies with respect to a real PLC CPU, please contact us.

Awlsim is Open Source Free Software licensed under the GNU General Public License v2. That means it's available in full source code and you are encouraged to improve it and contribute your changes back to the community. Awlsim is also free of charge.

Awlsim requires two software packages to be installed before it can be used:

Please install Python and PySide to their default install locations.

After the dependencies have been installed (see Installing above), the awlsim-X.X.tar.gz archive can be extracted.

After extracting the tar.gz archive, simply run the awlsim-win.bat file. The graphical user interface of awlsim should appear.

If you did not install a dependency correctly, or if there is any other problem, an error message will be printed to the console window that also appears.

Alternatively, you may download the awlsim win32.exe installer file and install awlsim into the system. But this is not a requirement. Awlsim can run without install.

Awlsim runs on any platform that supports Python and PySide, which includes Linux and Mac OS X.

Awlsim runs on Python 2.7 and Python 3.3 or later.

The command-line-interface version 'awlsimcli' also runs on PyPy 2 or later.

Awlsim includes an experimental hardware access layer for connecting the awlsim S7-CPU to real PROFIBUS-DP slave hardware. It does this by providing an interface to the Raspberry Pi PROFIBUS module.

The hardware access layer module is loaded and executed with the new -H command to awlsimcli.
For example: awlsimcli -D -H pyprofibus program.awl
The pyprofibus module has some module options. See the --help and --hardware-info pyprofibus options to awlsimcli for details.

The pyprofibus module is highly experimental at this time. It lacks a lot of flexibility, but it does work.

Needless to say, the Raspberry Pi PROFIBUS module must be installed before the awlsim pyprofibus hardware access layer can be used. Otherwise to following error will occur:

  [PyProfibus hardware module] Failed to import PROFIBUS protocol stack module 'pyprofibus':
    No module named 'pyprofibus'

A LinuxCNC HAL module is included in awlsim. With this module it is possible to use awlsim as a non-realtime S7-compatible PLC backend.

To use awlsim in LinuxCNC, a HAL configuration file has to be added to your LinuxCNC configuration. See the LinuxCNC Integrators Manual on how to add HAL-files. An example HAL-file is included in the awlsim package as awlsimhw_linuxcnc/awlsim.hal
See this .hal file for additional information.

Currently, the use of the awlsim GUI is not supported in combination with the LinuxCNC HAL module. The S7 program will execute in the background without any user visible interface except the LinuxCNC HAL. The LinuxCNC HAL Meter or other HAL diagnostics tools can be used for debugging.

Latest bleeding edge awlsim can be downloaded using the Git version control software by issuing the following command

git clone git://git.bues.ch/awlsim.git

or by downloading the awlsim snapshot archive.
To browse the Git repository online, go to the gitweb interface.
A mirror of the repository is available on Github.

Thanks to the Balthasar Neumann Technikum Trier for providing access to PLC hardware.

Copyright (C) Michael Büsch
Licensed under the terms of the GNU General Public License version 2. See the sourcecode for details.

Updated: Monday 31 March 2014 13:39 (UTC)
https (SSL) encrypted
xhtml / css