Open source ladder logic editor


Thread Starter

Scott Whitlock

Years ago I remember reading about the Puffin PLC project on The idea was to make an open source PLC system that ran on Linux. You can still find lots of references to that project if you Google for it, but it didn't seem to come to fruition.

I was inspired, partly by that project, to make some kind of open ladder logic based automation platform. I wanted to aim it at the hobbyist/hacker types who just wanted to add a little automation to one of their projects but they're not necessarily traditional programmers. I also wanted it to be an open and extensible platform.

I ended up choosing Windows and the .NET framework, mostly due to my familiarity with it, but also because most people are familiar with it and already have it installed. I realize this goes against the original intent of Puffin PLC, but we have to make choices and live with them.

I'm pleased to announce that I actually have a working version of the software. It's called SoapBox Snap. The "Snap" part is a recursive acronym, in honor of GNU, that stands for "Snap is Not a PLC". The application is released under the GPL (version 3). Part of the application is a communication and file format module called SoapBox Protocol. That module is based on open standards (XML for data format, and SSL for communications) and it's dual-licensed as both GPL and CDDL. That means you could write a proprietary product that actually spoke the "language" of SoapBox Snap, but the editor itself can't be made proprietary because it's GPL'd.

It's still a work in progress, but it is a working application. You can write logic and it executes it. It has two drivers right now: Phidgets (a set of USB I/O devices) and Twitter (so you can actually control your logic from a your Twitter status updates). New drivers can be added with the built-in add-in architecture. It also has pluggable instructions, runtimes, and even language modules, if someone wanted to take it that far.

I just wanted to put it out there for anyone who wants to play with it. I appreciate any and all feedback. I'm going to continue working on it to make it better. You can download it here:
That is quite an interesting project. I had a brief look at it, but I will admit that I'm not sure just how it works. Do you have any documentation for it? Also, do you have plans to support common industrial protocols, such as Modbus/TCP?

I do want to comment on a point that you made however. The "Puffin PLC project" was an idea that was started here. The actual implementation however was called "MAT" (Manufacturing Automation Tools"). At least one of the originators of that is still quite active here (Curt Wuollet). You can still find the original MAT on Sourceforge.

After MAT became working software, some of the original founders dropped out of the project, but some of the others carried on and turned it into a complete IEC 61131-3 soft logic system. MAT then got rolled into Beremiz, which included an editor supporting ladder, IL, SFC, FBD, and ST formats. I believe that it is being used in commercial applications, but I don't know the details.

There is another project that I think is similar to yours called ClassicLadder.

I have my own project called MBLogic.

If you want to discuss any matters related to your project or anything else, I would be happy to talk about it.

Scott Whitlock

That's some good info, thanks!

>Do you have plans to support common industrial protocols, such as Modbus/TCP?<

Modbus/TCP is nice and open, so I could see supporting it one day (and the pluggable architecture makes new drivers easy to add), but my goal is to take it in a decidedly non-industrial track.

Right now I'm interested in exploring connecting to inexpensive off-the-shelf devices that you can connect to your computer, and even integrating with more web services, like gmail, weather services or IP-based geo-location services.

I want to explore what it would be like to be able to use ladder logic to integrate stuff that's traditionally been the domain of PC programming only.
>Right now I'm interested in exploring connecting to inexpensive
>off-the-shelf devices that you can connect to your computer ...

I can see this from your current support of the Phidgets devices. You may also want to consider Arduino, loaded with firmata ( which allows this open source hardware platform to be used for general purpose I/O.

Should you consider more traditional industrial applications, perhaps you might consider Modbus RTU. There are a lot of inexpensive devices, like the ADAM-4000 serial I/O modules from my company, which would easily allow attaching discrete and analog I/O.

>Years ago ...
>I just wanted to put it out there for anyone who wants to play with it. I appreciate any and all feedback. I'm going to continue working on it to make it better. You can download it here:

Thank You! I went and bought a $10 arduino mega 2560 r3 board from a US vendor and an 8 relay output card to use the Arduino as a RF Linear Amplifier controller for band switching, power control and such like functions for a software defined Lime SDR ham radio that I have started building. I've been looking for a simple low cost open source implementation of PLC ladder logic like this for some 15 years. Was able to talk to the arduino and start playing with blinking lights, a pwm output and analog voltage measurement.

Your painfully explicit step by step instructional tutorial was refreshingly helpful and quite literal. I only had to check the support forums once, cause I had no need of any Phidgets as yet.

Your link to the collection of Ladder Logic Programming Patterns at Contact and Coil Nearly In Control was really great too, even for someone such as myself who has been doing AB Micrologix stuff in their sleep for decades.

Like my grandma used to say "You are wizard!"

Many Kudos and Thanks!