Contact and Coil | Nearly In Control

Jul/14

1

Ladder Logic running on an Arduino UNO

Happy Canada Day!

Some of you may wonder if I’d fallen off the face of the Earth, but the truth is life just gets busy from time to time. Just for interest’s sake, here’s my latest fun project: an Arduino UNO running ladder logic!

Ladder Logic on a UNO

You may remember I wrote a ladder logic editor about 5 or so years ago called SoapBox Snap. It only had the ability to run the ladder logic in a “soft” runtime (on the PC itself). This is an upgrade for SoapBox Snap so that it can download the ladder logic to an Arduino and even do online debugging and force I/O:

Arduino UNO Ladder

I haven’t released the new version yet, but it’s very close (like a few days away probably).

Edit: I’ve now released it and here is a complete tutorial on programming an Arduino in Ladder Logic using SoapBox Snap.

· · ·

9 comments

  • Jim · July 3, 2014 at 9:45 pm

    Way to go!

  • rafael · October 29, 2014 at 12:09 pm

    Hello ! I wonder how I would command on / off
    in android , app inventor on how they would already have two logical one for screen and other to chart and I have more easy with ladder because we already work with instrumentation industrial.thanks up soon.

  • Mild Lee Interested · December 2, 2014 at 9:41 am

    Thanks so much for this! I’ve been looking for an easy to use ladder IDE for Arduino for years!
    Looks like to took less time than expected, based on your 6/7/13 comment under “finally-getting-an-arduino”.
    Are you interested in feedback, or is your bug and request list already stretching off into infinity…

  • Author comment by Scott Whitlock · December 2, 2014 at 12:55 pm

    @MildLeeInterested – Development is stalled until I find some more time. I’m hoping to do another release sometime this winter, but the new features are pretty much set: I want to add analog PWM output capability, and support the Arduino Mega.

  • Dani · December 22, 2015 at 6:10 pm

    Hi Scott!

    Thank you very much for this piece of Software!!!
    My first impression is that it works OK in development and learning, I’m a student in automation and robotics, and i must for use limited PLCs in my school (one for eeach 8 person group) Now i’m probing exercises and ideas for my own with an inexpensive Arduino!

    Thanks again, and please write me if you need translation into Castilian or Catalan, would be happy to do them!

  • Author comment by Scott Whitlock · December 22, 2015 at 8:44 pm

    @Dani – Excellent! I’m really glad I can help students learn about ladder logic and PLC programming. That’s what this site is all about. Thanks!

  • dan · May 19, 2016 at 1:42 pm

    just wondering if more complex programming, like moves,arrays etc can programmed with soapbox,and where would you get the instructions for these commands

  • Author comment by Scott Whitlock · May 19, 2016 at 1:54 pm

    @dan – You can use the Choose Number instruction to remember a number as state, which is equivalent to a MOVE instruction. There are currently no array, stack (LIFO) or queue (FIFO) instructions. That is something I might add in the future. For an array you could use a bunch of Choose Number instructions.

    The SoapBox Snap ladder language doesn’t include the idea of addresses or a memory map. That’s all handled internally (so when you drop a coil on the page, it internally allocates a bit to hold the state – you don’t have to manually assign a bit for it). It works this way for all instructions, so the idea of having an array is too “low level” for Snap. Instead I’d add a higher level instruction like a Queue, Stack or maybe even a List.

  • Ron Kierstead · December 6, 2016 at 11:12 pm

    I’m a mature student taking Industrial Electrical Technology at a local College here on Prince Edward Island, and as they don’t allow us to take the Allen-Bradley units home with us, I spend a fair bit of time playing with an Arduino, and SoapBox Snap just took it to a whole new level of ‘homework’.

    Thanks for your efforts!

    Cheers,

    Ron

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me