Mturk Jobs

Mturk Jobs
Mturk Jobs

Tank

Tuesday, October 23, 2018

Arduino Ladder Logic - How to program Arduino like PLC using Ladder Logic

I've posted an article about Arduino based PLC and I've an unexpected response.

Many Arduino enthusiasts and students and also many other automation specialists showed interest to the subject.

This simply shows how there are so many people wanting to know more about open source and freely developed tools that can be used in automation and in industry as a whole.

I remember a friend of mine who had a dream since fourteen years ago. That dream he had was to replace old PLCs with modern Microcontrollers like PIC, Atmel and lately Arduino.

I guess now his dream came true.

I received a lot of questions on Arduino based PLC products and how they can be programmed.

So I’ve searched further and found that there are already some tools that can be used to program Arduino using ladder language.

PLCs are often programmed in ladder logic. This is because PLCs originally replaced relay control systems, and after all those years, we still haven't quite let go. A PLC, like any microprocessor, executes a list of instructions in sequence.


Today I’m putting these tools in front of you so you can start learning them and hopefully using them efficiently.


SoapBoxSnap


SoapBox Snap is a free and open source PC-based automation platform.

The ladder editor includes standard instructions like contacts, coils, timers, counters, rising edge and falling edge, and set/reset instructions.

SoapBox Snap also comes with an Arduino Runtime, which means you can download your ladder logic programs to an Arduino (UNO, Nano or Mega board) and even do online debugging and forcing.





LDmicro

It’s a compiler that starts with a ladder diagram and generates native PIC16 or AVR code.
Features include:

-       digital inputs and outputs
-       timers (TON, TOF, RTO)
-       counters (CTU, CTD, `circular counters' for use like a sequencer)
-       analog inputs, analog (PWM) outputs integer variables and arithmetic instructions
-       easy-to-use serial communications, to a PC, LCD, or other device
-       shift registers, look-up tables
-       EEPROM variables, whose values are not forgotten when you lose power
-       simulator, to test your program before you generate PIC/AVR code
http://cq.cx/ladder.pl

I hope this article could shed some light on the subject.

Thank you for reading.




Check My books on Amazon:





Learn By Making: Embedded Systems Tutorial for Students and Beginners




Embedded Systems, Electronics: My Projects Collection From Instructables





1 comment:

Unknown said...

Greetings from Venezuela, SouthAmerica!

Thanks for sharing so much valuable and interesting information.

I have seen articles about PLC circuits but none of them explain how a circuit can be programmed using Ladder Logic.

My basic experience with programming languages always made me thought that To make a circuit programmable in any language, a compiler had to be created to translate the Source Language into the Target language that could be understood by the circuit, like Assembly language.

Now you have confirmed my suspicions.


Thanks for your contribution colleague !!!

Tank