We crossed a bit of a milestone in the development of SoapBox Snap this weekend… I was able to create an automation solution, connect to the included soft runtime, automatically detect the Phidgets 8/8/8 board I have hooked up to a USB port, and then I wrote a little ladder logic. The ladder logic executes in the runtime, and it’s driving an output on the Phidgets board. Here’s a screenshot:
(Click on the image to enlarge it.)
It’s still a little rough around the edges, but it feels good to have the logic running end-to-end. It starts to feel pretty real at this point.
What is SoapBox Snap?
Snap stands for Snap is Not A PLC. It’s not for industrial control. It’s for home automation enthusiasts, students, and generally anyone who likes to make stuff to add a little automation to their project without necessarily knowing classic computer programming.
Extensibility
Pretty much everything in SoapBox Snap is extensible by 3rd party programmers:
- Write your own library of ladder logic instructions
- Plug in a new runtime to replace the “soft” runtime that comes with it
- Add a new language editor for automation languages other than ladder logic
- Write a driver for a new I/O device that you want to control from the runtime
Free
SoapBox Snap will be released under the GNU Public License (GPL). That means it’s free. Free-as-in-beer and free-as-in-speech.
The data structure, file format, and communications protocol are encapsulated in a separate library called SoapBox Protocol. It’s going to be concurrently released under the CDDL so you could build SoapBox Snap compatibility into an application without releasing your entire application under the GPL.
Why SoapBox Snap?
As a controls engineer I’ve loved programming machines in ladder logic. It’s intuitive, especially to someone with any amount of electrical background, and it’s interactive, especially if you have a platform that supports online debugging and programming. I love that you don’t have to be a programmer to “get it”.
I think ladder logic could be applied to many domains outside of strict industrial automation, but as I’ve blogged about before, the existing automation equipment vendors have no reason to take ladder logic outside of their cushy niche and bring it to a larger, more mainstream, audience. I don’t want to see the broken innovation of the industrial automation industry hold back other possibly innovative uses of some of these ideas.
Creating a Framework for Innovation
You need two things to get innovation going: an open standard, and an open set of tools. That’s what SoapBox Snap is.
You can try to create an open standard by getting all the stakeholders to sit around a table and creating a specification, but it usually doesn’t work. Exhibit A: the IEC 61131-3 specification. That standard creates little or no interoperability between various automation platforms.
The other way to create an open standard, the one that actually works, is just to write it and open it up under intellectual property protections like the GPL, and give it away for free. The reason you release it under a license like the GPL is because it protects against embrace-and-extend tactics. No single company can take the application, spend a whole bunch of money to add a bunch of features, and then release it as an incompatible version. If they do that, they have to respect the license and release their changes in kind. That lets the standard evolve, but prevents it from becoming proprietary.
SoapBox Snap is for Me
I’ve been looking for something like SoapBox Snap for almost a decade now. A long time ago there was a small group of people who got together to create an open source Linux-based PLC called Puffin PLC. You can still find references to it around the web, but it never came to fruition. I now understand why. Writing a ladder logic editor is full of challenges I didn’t expect. While I hope the same people who were interested in making Puffin PLC will be interested in SoapBox Snap, I’m ultimately building it for me. I’m going to build something cool with it, and it’s going to be fun. 🙂
Please let me know when this framework will be available for download. I have recently been looking into building my own ladder logic GUI for some personal projects. It appears to me that you have done a lot of the wheel making on this, so no need to reinvent! I cannot wait to see what you have put together.
@Rob: Thanks for the enthusiasm. I’m still getting time to work on it almost every day. It’s coming along, and I’ve got a slowly declining list of punchlist items. It’ll get there. Please be patient. 🙂
I look forward to the release as well. I’ve been wanting to learn ladder logic for a while now and I feel this may be the perfect tool.
@Bryan: thanks! This is definitely going to be “beginner-friendly”. The fact that getting online with the runtime is super-easy, and you don’t have to manage the memory (or tags) explicitly, means that two of the biggest frustrations a lot of beginners experience just won’t be there. At the same time, I think it’s going to be more powerful that most other ladder logic platforms too, especially with the ability for 3rd parties to write add-ins.