Main Page

From PetriLLD
Jump to: navigation, search
PetriLLD screenshot

PetriLLD: Develop Industrial Automation with Petri Nets

PetriLLD allows you to create real-time, industrial automation control programs using a graphical language based on Petri nets. It can generate output suitable for a variety of different programmable logic controllers, including several IEC 61131-3 languages, and can also generate Java and Visual Basic.

Why use PetriLLD?

The idea of compiling Petri nets to PLC (Programmable Logic Controller) languages is not new. So why prefer this tool? These seem to be the key advantages:

  1. PetriLLD compiles to several different languages and handles a number of different PLCs. If your PLC is not listed, and if you have some Java programming skills, you can code a plug-in to handle this task with a few hundred lines of code.
  2. PetriLLD creates 1-safe nets. Roughly speaking, this means that the behaviour of the net is guaranteed to ensure that each place marking is either 0 or 1, no matter which order transitions fire, and thus each place can be represented by a single bit in the PLC.
  3. PetriLLD nets model inputs and outputs explicitly.
  4. PetriLLD nets support reuse through instances. Each net can have multiple instances. The allows the generation of code for a single PLC that controls devices that have the same behaviour, but are connected to different PLC inputs and outputs.
  5. PetriLLD nets can communicate without conflict. Net communication can be within the same PLC, between different PLCs or even between a PC and PLC.
  6. PetriLLD is free source (a.k.a open-source) software and is licensed for use under the GNU Public License.

If you're interested, I wrote a bit of history on how this software came about.

Download and install

Announcement Mailing List

The announcement list has been removed. Please feel free to e-mail the project administrator with your questions and comments though!

If you find a bug

If you have any problems, please file a bug report. If possible, send include the contents of petrilld.log which is created when the program runs. Note that this is overwritten each time and so if you discover a bug, please make a copy of this file before running the program again.


A draft version of the documentation is now available.


PetriLLD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

For more details, see the file named COPYING that comes with the source distribution.


PetriLLD has evolved to its current state largely due to the valuable input of Cambridge University Manufacturing Engineering Tripos students, and particularly the support and encouragement of Mr Alan Thorne, Manager of the Manufacturing Automation Laboratory.

The author also wishes to acknowledge the large number of free-source / open-source tools that helped make PetriLLD possible, including:

Related Publications

J. Brusey, D. C. McFarlane, and A. Thorne, "Nonautonomous elementary net systems and their application to programmable logic control," IEEE Transactions on Systems, Man, and Cybernetics, Part A, vol. 38, no. 2, pp. 397-409, 2008. [Online]. Available: [1]

J. Brusey and D. C. McFarlane, Designing Communication Protocols for Holonic Control Devices Using Elementary Nets, ser. LNCS. Berlin / Heidelberg: Springer, 2005, vol. 3593/2005, pp. 76-86. [2]